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" <
[email protected]>
| Sender: "Valery Polyakov" <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
| Subject: RE: intercepting lines
| Date: Wed, 5 Nov 2003 04:48:26 -0800
| Lines: 60
| Message-ID: <
[email protected]>
| 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" <
[email protected]>
| >| Sender: "Valery Polyakov" <
[email protected]>
| >| Subject: intercepting lines
| >| Date: Tue, 4 Nov 2003 07:35:05 -0800
| >| Lines: 7
| >| Message-ID: <
[email protected]>
| >| 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.
| >|
| >|
| >
| >.
| >
|