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.
The current implementation of
GdipSaveGraphics
would setGraphicsState
to the zero-based index of the current state in an array. The Windows implementation of System.Drawing asserts thatGraphicsState
is non-zero.So simply increment
GraphicsState
by one when setting it, and substract one when reading it.