Fix saving/restoring drawing state for wxGraphicsContext with Direct2D

Native ID2D1RenderTarget::SaveDrawingState method stores in ID2D1DrawingStateBlock only transform, antialiasing mode, text-rendering options and tags but not currently set ID2D1Layers (which are used in wxD2DContext for clipping purposes). Therefore current stack of layers has to be stored "manually" alongside ID2D1DrawingStateBlock in a dedicated data structure (LayerData) in PushState() and restored also "manually" in PopState().

Closes #17626.
This commit is contained in:
Artur Wieczorek
2016-08-12 21:23:02 +02:00
parent 7d9d5934b5
commit d9193d5368
2 changed files with 93 additions and 14 deletions

View File

@@ -954,8 +954,8 @@ public:
virtual void EndLayer() = 0;
/**
Push the current state of the context (eg. transformation matrix) on a
stack.
Push the current state (like transformations, clipping region and quality
settings) of the context on a stack.
Multiple balanced calls to PushState() and PopState() can be nested.
@see PopState()