Fixed applying transformation to wxGraphicsPath with GDI+ renderer.

Auxiliary points as well as the native path points have to be the subject of the transformation.
This commit is contained in:
Artur Wieczorek
2016-05-12 21:16:51 +02:00
parent 08cb54c4c1
commit 5ffbc7c175

View File

@@ -1344,7 +1344,13 @@ void wxGDIPlusPathData::AddPath( const wxGraphicsPathData* path )
// transforms each point of this path by the matrix
void wxGDIPlusPathData::Transform( const wxGraphicsMatrixData* matrix )
{
m_path->Transform( (Matrix*) matrix->GetNativeMatrix() );
const Matrix* m = static_cast<const Matrix*>(matrix->GetNativeMatrix());
m_path->Transform(m);
// Transform also auxiliary points.
if ( m_logCurrentPointSet )
m->TransformPoints(&m_logCurrentPoint, 1);
if ( m_figureOpened )
m->TransformPoints(&m_figureStart, 1);
}
// gets the bounding box enclosing all points (possibly including control points)