making pens behave as on other platforms when scaling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f868f88665
commit
8e108c1ec9
@ -427,21 +427,7 @@ void wxGDIPlusContext::Translate( wxDouble dx , wxDouble dy )
|
|||||||
|
|
||||||
void wxGDIPlusContext::Scale( wxDouble xScale , wxDouble yScale )
|
void wxGDIPlusContext::Scale( wxDouble xScale , wxDouble yScale )
|
||||||
{
|
{
|
||||||
PointF penWidth( m_pen->GetWidth(), 0);
|
|
||||||
Matrix matrix ;
|
|
||||||
if ( !m_penTransparent )
|
|
||||||
{
|
|
||||||
m_context->GetTransform(&matrix);
|
|
||||||
matrix.TransformVectors(&penWidth);
|
|
||||||
}
|
|
||||||
m_context->ScaleTransform(xScale,yScale);
|
m_context->ScaleTransform(xScale,yScale);
|
||||||
if ( !m_penTransparent )
|
|
||||||
{
|
|
||||||
m_context->GetTransform(&matrix);
|
|
||||||
matrix.Invert();
|
|
||||||
matrix.TransformVectors(&penWidth) ;
|
|
||||||
m_pen->SetWidth( sqrt( penWidth.X*penWidth.X + penWidth.Y*penWidth.Y));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGDIPlusContext::PushState()
|
void wxGDIPlusContext::PushState()
|
||||||
|
Loading…
Reference in New Issue
Block a user