Fixed reporting transformation settings for wxGraphicsContext with Cairo renderer.
When wxGraphicsContext is created from "native" Cairo context (cairo_t*) then transformation settings applied initially to the underlying source Cairo context need to be stored (in a dedicated variable) to make possible determining what transformations were applied to wxGC instance since its creation. Only these explicitly applied transformations are reported by GetTransform().
This commit is contained in:
@@ -2099,8 +2099,11 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, cairo_t *context )
|
||||
m_mswStateSavedDC = 0;
|
||||
#endif // __WXMSW__
|
||||
Init( context );
|
||||
m_width =
|
||||
m_width = 0;
|
||||
m_height = 0;
|
||||
// Store transformation settings of the underlying source context.
|
||||
if ( m_context )
|
||||
cairo_get_matrix(m_context, &m_internalTransform);
|
||||
}
|
||||
|
||||
wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, wxWindow *window)
|
||||
|
Reference in New Issue
Block a user