Apply workaround in creating wxGraphicContext from native DC only for Cairo < 1.15.12 (wxMSW).
Cairo bug 96482 was fixed in 1.15.12 so the workaround needs to be applied only for older Cairo versions.
This commit is contained in:
@@ -2013,9 +2013,10 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC&
|
|||||||
// bug 96482) so in this case we would need to pass non-transformed
|
// bug 96482) so in this case we would need to pass non-transformed
|
||||||
// DC to Cairo and to apply original DC transformation to the Cairo
|
// DC to Cairo and to apply original DC transformation to the Cairo
|
||||||
// context operations on our own.
|
// context operations on our own.
|
||||||
// We believe this bug will be fixed in the next Cairo version.
|
// Bug 96482 was fixed in Cairo 1.15.12 so this workaround needs
|
||||||
#if CAIRO_VERSION <= CAIRO_VERSION_ENCODE(1, 15, 2)
|
// to be applied only for older Cairo versions.
|
||||||
if ( cairo_version() <= CAIRO_VERSION_ENCODE(1, 15, 2) )
|
#if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 15, 12)
|
||||||
|
if ( cairo_version() < CAIRO_VERSION_ENCODE(1, 15, 12) )
|
||||||
{
|
{
|
||||||
wxCoord orgX, orgY;
|
wxCoord orgX, orgY;
|
||||||
dc.GetDeviceOrigin(&orgX, &orgY);
|
dc.GetDeviceOrigin(&orgX, &orgY);
|
||||||
@@ -2028,7 +2029,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC&
|
|||||||
adjustTransformFromDC = true;
|
adjustTransformFromDC = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // Cairo <= 1.15.2
|
#endif // Cairo < 1.15.12
|
||||||
|
|
||||||
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 15, 4)
|
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 15, 4)
|
||||||
if ( cairo_version() >= CAIRO_VERSION_ENCODE(1, 15, 4) )
|
if ( cairo_version() >= CAIRO_VERSION_ENCODE(1, 15, 4) )
|
||||||
|
Reference in New Issue
Block a user