Discussion:
GDI+ Region Union Problem
(too old to reply)
MichaelTPaul
2004-06-01 12:26:04 UTC
Permalink
Does anyone know of a workaround or solution for the Region Union Problem in .NET framework

I am writing an application that needs to use unions of graphics paths and this function flat out does not work. I think it should be an absolute embarassment to have a product out with this kind of hole in it

Link to site below that demonstrates the bug
http://www.opac.ch/bugs
Frank Hileman
2004-06-01 16:14:29 UTC
Permalink
Hello Michael,

The work around is to use a GraphicsPath, and convert that to a region.

Regards,
Frank Hileman

check out VG.net: www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor
Post by MichaelTPaul
Does anyone know of a workaround or solution for the Region Union Problem
in .NET framework?
Post by MichaelTPaul
I am writing an application that needs to use unions of graphics paths and
this function flat out does not work. I think it should be an absolute
embarassment to have a product out with this kind of hole in it.
Post by MichaelTPaul
http://www.opac.ch/bugs/
Bob Powell [MVP]
2004-06-01 20:04:20 UTC
Permalink
You should be able to transform the GraphicsPath objects before you convert
them to a region and then get the union of the resulting regions.
--
Bob Powell [MVP]
Visual C#, System.Drawing

Image transition effects, snap-to-grid and Layered Windows are
all discussed in May's edition of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml
I am already using a graphics path and converting it to a region.
What I am trying to do is union 2 regions that come from different graphics
paths (with different translations and rotations). I create a region from
the 1st graphics path and union it to the second. The union does not equate
to the union of the 2 regions.
----- Frank Hileman wrote: -----
Hello Michael,
The work around is to use a GraphicsPath, and convert that to a region.
Regards,
Frank Hileman
check out VG.net: www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor
Post by MichaelTPaul
Does anyone know of a workaround or solution for the Region Union Problem
in .NET framework?
Post by MichaelTPaul
Post by MichaelTPaul
I am writing an application that needs to use unions of graphics paths and
this function flat out does not work. I think it should be an absolute
embarassment to have a product out with this kind of hole in it.
Post by MichaelTPaul
http://www.opac.ch/bugs/
frank
2004-06-01 20:27:13 UTC
Permalink
Bob's idea might work for you. Once it is converted to a region, you are
stuck with the bug -- that is the only workaround I know of.

- Frank
I am already using a graphics path and converting it to a region.
What I am trying to do is union 2 regions that come from different graphics
paths (with different translations and rotations). I create a region from
the 1st graphics path and union it to the second. The union does not equate
to the union of the 2 regions.

Loading...