PolyPolygon and PolyPolyline in GDI+

Tech-Archive recommends: Fix windows errors by optimizing your registry



I have a graphics app that uses GDI. I would like to add support for color
transparency. All our GDI calls are in one place. I would like to make a
helper class that mimics all the drawing primitives: Polygon, PolyPolygon,
Rectangle, PolyLine, PolyPolyline, MoveTo, LineTo, etc. Then I could update
all our existing GDI calls to use the helper. The helper class would
determine if the primitive is using a transparent color or not and if so, use
GDI+, otherwise, continue using GDI.

The problem is that there's not a one to one correspondence between GDI
primitives and GDI+ primitives. For example, GDI+ does not support
PolyPolygon and PolyPolyline.

1) Has anyone already created a helper class that maps GDI drawing calls to
GDI+?
2) Where can I find a robust implementation of PolyPolyline and PolyPolygon
for GDI+?

John


.



Relevant Pages

  • Re: Alpha Blending Question
    ... I'd like to eneble also alpha blending, ... > I draw on a DC using Draw* primitives, but I saw that brushes do not ... Have a look at the "GDI blend" demo application on my page which demonstrates a reasonably generic method of drawing ...
    (microsoft.public.win32.programmer.gdi)
  • Alpha Blending Question
    ... I'd like to eneble also alpha blending, ... I draw on a DC using Draw* primitives, but I saw that brushes do not ... I don't use GDI directly trought C/C++ code, but I use a Python wrapper ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Is GDI+ entirely based on GDI?
    ... GDI+'s dependency on GDI is mainly for printing, ... does not support GDI+ primitives. ... Feng Yuan ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.win32.programmer.gdi)