Fixed inheriting wxWindowDC transformation settings by wxGraphicsContext with Cairo renderer (GTK+ 2).
When wxGraphicsContext is created from wxWindowDC then transformation settings already applied to the source wxWindowDC are not passed directly to the Cairo context through underlying GdkDrawable and therefore they need to be passed to the context explicitly. These inherited transformation settings should be used only internally by wxGraphicsContext object and shouldn't be exposed through e.g. GetTransform() function and hence they are stored separately (in a dedicated variable) and "subtracted" from actual transformation settings for reporting purposes. See #17491.
This commit is contained in:
parent
5368c72d37
commit
ac49e3829a
@ -1782,21 +1782,8 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC&
|
||||
wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl();
|
||||
Init( gdk_cairo_create( impldc->GetGDKWindow() ) );
|
||||
|
||||
#if 0
|
||||
wxGraphicsMatrix matrix = CreateMatrix();
|
||||
|
||||
wxPoint org = dc.GetDeviceOrigin();
|
||||
matrix.Translate( org.x, org.y );
|
||||
|
||||
org = dc.GetLogicalOrigin();
|
||||
matrix.Translate( -org.x, -org.y );
|
||||
|
||||
double sx,sy;
|
||||
dc.GetUserScale( &sx, &sy );
|
||||
matrix.Scale( sx, sy );
|
||||
|
||||
ConcatTransform( matrix );
|
||||
#endif
|
||||
// Transfer transformation settings from source DC to Cairo context on our own.
|
||||
ApplyTransformFromDC(dc);
|
||||
#endif
|
||||
|
||||
#ifdef __WXX11__
|
||||
|
Loading…
Reference in New Issue
Block a user