macbirdie
macbirdie

Reputation: 16193

Polygon fill modes in GDI and GDI+

The system default polygon fill mode in current device context is ALTERNATE (as I've learned from the Petzold book on Windows programming) and this one is used in Polygon Win32 function unless you change the mode with SetPolyFillMode.

My question is: Does the GDI+ Graphics::FillPolygon (without the FillMode parameter in its signature) method also use the current device context fill mode or sets the well-known-default and then sets back the mode set before it was called?

Thanks!

Upvotes: 1

Views: 3603

Answers (2)

mjcopple
mjcopple

Reputation: 1600

I looked at the reference source and FillPolygon without a fill mode simply calls FillPolygon with a fill mode of alternate.

FillPolygone with a fill mode calls a method named GdipFillPolygonI, but I can't find anything about that method.

Upvotes: 0

Mark Ingram
Mark Ingram

Reputation: 73673

I don't know the answer off the top of my head, but you could try finding out by retrieving the fill mode before and after the call. If it's not different, it's either not been changed, or was changed then changed back.

Upvotes: 1

Related Questions