mono / libgdiplus

C-based implementation of the GDI+ API
http://www.mono-project.com/
MIT License
333 stars 171 forks source link

Keep GraphicsContainer/GraphicsState non-zero #561

Closed qmfrederik closed 5 years ago

qmfrederik commented 5 years ago

The current implementation of GdipSaveGraphics would set GraphicsState to the zero-based index of the current state in an array. The Windows implementation of System.Drawing asserts that GraphicsState is non-zero.

So simply increment GraphicsState by one when setting it, and substract one when reading it.

filipnavara commented 5 years ago

@monojenkins build Mono Jenkins Windows