By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,909 Members | 2,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,909 IT Pros & Developers. It's quick & easy.

intercepting lines

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
"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

P: n/a

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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

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 discussion thread is closed

Replies have been disabled for this discussion.