Restore source DC state when wxCairoContext is destroyed (wxMSW).

Since raw DC (encapsulated in source wxDC) can be modified in wxCairoContext explicitly (e.g. when context is instantiated from wxPrinterDC or wxEnhMetaFileDC) or implicitly (by some Cairo functions) we have to store its state in ctor and restore it in dtor to assure consistent state of the source wxDC.
This commit is contained in:
Artur Wieczorek
2016-04-14 20:45:42 +02:00
parent c911f737e3
commit 0ae78d608a
2 changed files with 25 additions and 4 deletions

View File

@@ -184,7 +184,9 @@
m( cairo_surface_t*, cairo_win32_surface_create, \
(HDC hdc), (hdc), NULL ) \
m( cairo_surface_t*, cairo_win32_printing_surface_create, \
(HDC hdc), (hdc), NULL )
(HDC hdc), (hdc), NULL ) \
m( HDC, cairo_win32_surface_get_dc, \
(cairo_surface_t *surface), (surface), NULL )
#else
#define wxCAIRO_PLATFORM_METHODS(m)
#endif