diff --git a/docs/changes.txt b/docs/changes.txt index 851bf2b8a4..7c911fd9f5 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -120,6 +120,7 @@ wxMSW: - Fix background colour returned by wxTextCtrl::GetStyle() (Andreas Falkenhahn). - Revert to using equally-sized buttons in wxToolBar by default. - Restore dispatching wxThreadEvent while resizing the window broken in 3.1.0. +- Fix wxGraphicsMatrix::TransformDistance for Direct2D renderer. wxOSX: diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index 41745c2a2b..b240715b96 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -979,7 +979,7 @@ void wxD2DMatrixData::TransformDistance(wxDouble* dx, wxDouble* dy) const D2D1::Matrix3x2F noTranslationMatrix = m_matrix; noTranslationMatrix._31 = 0; noTranslationMatrix._32 = 0; - D2D1_POINT_2F result = m_matrix.TransformPoint(D2D1::Point2F(*dx, *dy)); + D2D1_POINT_2F result = noTranslationMatrix.TransformPoint(D2D1::Point2F(*dx, *dy)); *dx = result.x; *dy = result.y; }