Fix wxGraphicsMatrix::TransformDistance for Direct2D implementation
Current transformation matrix without translation component should be used in calculations.
This commit is contained in:
@@ -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:
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user