Hello,
I would like to draw a filled polygon that has "holes" in it, the
borders of the holes should be drawn with the current pen. How can I
acomplish this? I went though the painting sample, but couldn't find
what I need.
Regards.
_______________________________________________
wx-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wx-users
On Thu, Jul 10, 2008 at 17:34, personaje <[email protected]> wrote:
> Hello,
>
> I would like to draw a filled polygon that has "holes" in it, the
> borders of the holes should be drawn with the current pen. How can I
> acomplish this? I went though the painting sample, but couldn't find
> what I need.
>
> Regards.
>
bump!
anyone? please?
_______________________________________________
wx-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wx-users
>>>>> "personaje" == personaje <[email protected]> writes:
personaje> On Thu, Jul 10, 2008 at 17:34, personaje
personaje> <[email protected]> wrote:
>> Hello,
>>
>> I would like to draw a filled polygon that has "holes" in it, the
>> borders of the holes should be drawn with the current pen. How can
>> I acomplish this? I went though the painting sample, but couldn't
>> find what I need.
The book mentions the "fill_style" argument, which defaults to the
"even/odd winding rule". There's a good description of that in your
typical computer graphics or PostScript book (it's not documented in
the wx book, at least not the somewhat out of date rev I have).
You need DrawPolyPolygon. The polygons are (a) the "big" polygon and
(b) the holes (one polygon per hole). Use the default fill_rule.
Even/odd winding rule means (roughly speaking) that if a line from
infinity to some point on your screen crosses an odd number of polygon
boundaries, it's filled in; if an even number, it's not. The area
inside the "hole" polygons is two boundaries away from infinity, so
it's unfilled.
paul
_______________________________________________
wx-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wx-users
"personaje" <[email protected]> a écrit dans le message de news:
mailman.652.1215790109.17800.wx-users@lists.wxwidgets.org...
> On Thu, Jul 10, 2008 at 17:34, personaje <[email protected]> wrote:
>> Hello,
>>
>> I would like to draw a filled polygon that has "holes" in it, the
>> borders of the holes should be drawn with the current pen. How can I
>> acomplish this? I went though the painting sample, but couldn't find
>> what I need.
>>
>> Regards.
>>
>
> bump!
>
> anyone? please?
I presume that the only way to do this is to draw the filled polygon on RGBA
DC, then to draw 'for transparency' the inner polygons==holes, then blit all
of that on your target DC
Armel
_______________________________________________
wx-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wx-users