473,385 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

intercepting lines

I am drawing lines with a semi-transparent color
(alpha=100). When these lines intercept, the color
becomes more intense. Is there a way to avoid this, so
that I would get the same intensity of color?

Thanks a lot.

Nov 15 '05 #1
6 1771
"Valery Polyakov" <va*************@aventis.com> wrote in news:069801c3a2e9
$3****************@phx.gbl:
I am drawing lines with a semi-transparent color
(alpha=100). When these lines intercept, the color
becomes more intense. Is there a way to avoid this, so
that I would get the same intensity of color?

Thanks a lot.


not with an easy drawing method.
you have to modify the drawing to don't draw any point twice.

--
------ooo---OOO---ooo------

Peter Koen - www.kema.at
MCAD CAI/RS CASE/RS IAT

------ooo---OOO---ooo------
Nov 15 '05 #2

Hi Valery,

Thanks for posting in this group.
Are your 2 lines the same color and alpha value?
If it is(and it should be the same), you can give up the drawline method,
but treat the 2 lines as a region, then you can combine these 2 regions
into a big region, finally, you can fill it with what you want.(And it
color will not be intense in intercepting region)

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Valery Polyakov" <va*************@aventis.com>
| Sender: "Valery Polyakov" <va*************@aventis.com>
| Subject: intercepting lines
| Date: Tue, 4 Nov 2003 07:35:05 -0800
| Lines: 7
| Message-ID: <06****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOi6Tivlu1vBQxXRquUBkYjRh61Fg==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:196612
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| I am drawing lines with a semi-transparent color
| (alpha=100). When these lines intercept, the color
| becomes more intense. Is there a way to avoid this, so
| that I would get the same intensity of color?
|
| Thanks a lot.
|
|

Nov 15 '05 #3
How can i do this?
-----Original Message-----
"Valery Polyakov" <va*************@aventis.com> wrote in news:069801c3a2e9$3****************@phx.gbl:
I am drawing lines with a semi-transparent color
(alpha=100). When these lines intercept, the color
becomes more intense. Is there a way to avoid this, so
that I would get the same intensity of color?

Thanks a lot.
not with an easy drawing method.
you have to modify the drawing to don't draw any point

twice.
--
------ooo---OOO---ooo------

Peter Koen - www.kema.at
MCAD CAI/RS CASE/RS IAT

------ooo---OOO---ooo------
.

Nov 15 '05 #4
Yes, My lines are of the same color.

How do I treat them as a region?
-----Original Message-----

Hi Valery,

Thanks for posting in this group.
Are your 2 lines the same color and alpha value?
If it is(and it should be the same), you can give up the drawline method,but treat the 2 lines as a region, then you can combine these 2 regionsinto a big region, finally, you can fill it with what you want.(And itcolor will not be intense in intercepting region)

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Valery Polyakov" <va*************@aventis.com>
| Sender: "Valery Polyakov" <va*************@aventis.com>
| Subject: intercepting lines
| Date: Tue, 4 Nov 2003 07:35:05 -0800
| Lines: 7
| Message-ID: <06****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300| Thread-Index: AcOi6Tivlu1vBQxXRquUBkYjRh61Fg==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:196612| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| I am drawing lines with a semi-transparent color
| (alpha=100). When these lines intercept, the color
| becomes more intense. Is there a way to avoid this, so
| that I would get the same intensity of color?
|
| Thanks a lot.
|
|

.

Nov 15 '05 #5
You could draw the lines on a Bitmap (with no transparency and hence points
of intersection are the same color as the line) and then draw the bitmap to
the destination Graphics with the appropriate transparency. I'm not sure
what the background is that you want to "show through". If you want to see
the desktop through a Form, you can use the Opacity property of the form.
If the background is some bitmap you have drawn to another Graphics, you
will need to combine the lines' Bitmap with that. You can set the
transparent color of the bitmap you drew the lines on to its background
(initial) color.

"Valery Polyakov" <Va*************@aventis.com> wrote in message
news:0a****************************@phx.gbl...
How can i do this?
-----Original Message-----
"Valery Polyakov" <va*************@aventis.com> wrote in

news:069801c3a2e9
$3****************@phx.gbl:
I am drawing lines with a semi-transparent color
(alpha=100). When these lines intercept, the color
becomes more intense. Is there a way to avoid this, so
that I would get the same intensity of color?

Thanks a lot.


not with an easy drawing method.
you have to modify the drawing to don't draw any point

twice.

--
------ooo---OOO---ooo------

Peter Koen - www.kema.at
MCAD CAI/RS CASE/RS IAT

------ooo---OOO---ooo------
.

Nov 15 '05 #6

Hi Valery,

You can first construct a GraphicsPath object, then you can pass it as
parameter to the Region class's constructor.
At last, you can use Region.Union method to combine these 2 regions.

Btw: if your 2 lines are not vertical or horizontal, you have to calculate
the coordinates of the region yourself.( which may be complex)

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Valery Polyakov" <Va*************@aventis.com>
| Sender: "Valery Polyakov" <Va*************@aventis.com>
| References: <06****************************@phx.gbl>
<78**************@cpmsftngxa06.phx.gbl>
| Subject: RE: intercepting lines
| Date: Wed, 5 Nov 2003 04:48:26 -0800
| Lines: 60
| Message-ID: <0a****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOjmxr+hTIipKdNS3Sat+Rx+luaLg==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:196891
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Yes, My lines are of the same color.
|
| How do I treat them as a region?
| >-----Original Message-----
| >
| >Hi Valery,
| >
| >Thanks for posting in this group.
| >Are your 2 lines the same color and alpha value?
| >If it is(and it should be the same), you can give up the
| drawline method,
| >but treat the 2 lines as a region, then you can combine
| these 2 regions
| >into a big region, finally, you can fill it with what
| you want.(And it
| >color will not be intense in intercepting region)
| >
| >Hope this helps,
| >
| >Best regards,
| >Jeffrey Tan
| >Microsoft Online Partner Support
| >Get Secure! - www.microsoft.com/security
| >This posting is provided "as is" with no warranties and
| confers no rights.
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Valery Polyakov" <va*************@aventis.com>
| >| Sender: "Valery Polyakov" <va*************@aventis.com>
| >| Subject: intercepting lines
| >| Date: Tue, 4 Nov 2003 07:35:05 -0800
| >| Lines: 7
| >| Message-ID: <06****************************@phx.gbl>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE
| V5.50.4910.0300
| >| Thread-Index: AcOi6Tivlu1vBQxXRquUBkYjRh61Fg==
| >| Newsgroups: microsoft.public.dotnet.languages.csharp
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:196612
| >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| >| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| >|
| >| I am drawing lines with a semi-transparent color
| >| (alpha=100). When these lines intercept, the color
| >| becomes more intense. Is there a way to avoid this, so
| >| that I would get the same intensity of color?
| >|
| >| Thanks a lot.
| >|
| >|
| >
| >.
| >
|

Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: John | last post by:
Hi, Can anyone point me out how to intercept the keystrokes from a c# application that's not a active window? - intercepting the system wide keystrokes before it hits the target active window? ...
0
by: VMI | last post by:
My Windows datagrid has two columns: one with the data that the user will see (col_X) and the other one (a hidden one: col_sort) that'll be used to sort data. When a user clicks on col_X's column...
5
by: Brian | last post by:
Hello all.. Am working on an Air Hockey game... have an table loaded into a picture box. The borders of the table are slightly slanted. Am using hit testing lines with GDI+ to manipulate the...
4
by: Curious Coder | last post by:
I have been tasked with a project that I do not think can be accomplished. Our company has an application that runs as an unmanaged ActiveX control on user desktops. It is designed to work with...
5
by: aaa | last post by:
Is there a simple straight forward tool out there for intercepting my SOAP requests so that I can debug the XML that I am sending?
3
by: pamelafluente | last post by:
I am new to asp.net. I have an asp page with a submit button which sends out some information. Instead of having IIS to respond and deal with this information, I would like to have a .NET...
19
by: Pavan | last post by:
Hi, I want to know if there is any software for measuring lines of code of my c++ application. I found out a tool, sloccount, but it gives only physical lines of code. I found out one more...
0
by: Gabriel Genellina | last post by:
En Thu, 18 Sep 2008 19:24:26 -0300, Robert Dailey <rcdailey@gmail.com> escribió: Why don't you try it yourself? You may replace builtins.print with your own function too. It's not exactly the...
8
by: K Viltersten | last post by:
I've seen some people calling a stored procedure on MS SQL Server and intercepting an invalid parameter list by a switch statement, demanding that each of the parameters names is exactly as the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.