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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user