From cc628f5e8717a87d644f74616718f5deeaf1dcfd Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sat, 9 Apr 2016 23:51:42 +0200 Subject: [PATCH] Fixed wxCairoContext::SetTransform Actual transformation is a concatenation of internal (hidden) transformation and requested one. --- src/generic/graphicc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 417b6f729b..48ff657996 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -2221,7 +2221,10 @@ void wxCairoContext::ConcatTransform( const wxGraphicsMatrix& matrix ) // sets the transform of this context void wxCairoContext::SetTransform( const wxGraphicsMatrix& matrix ) { - cairo_set_matrix(m_context,(const cairo_matrix_t*) matrix.GetNativeMatrix()); + // To get actual transformation we need to concatenate + // given transformation with internal transformation. + cairo_set_matrix(m_context, &m_internalTransform); + cairo_transform(m_context, (const cairo_matrix_t*)matrix.GetNativeMatrix()); } // gets the matrix of this context