SVG plotter: fix an issue with mirrored texts. Mirrored texts have a size < 0. Of course, the actual value for the plotter is the absolute value.
This commit is contained in:
parent
e2492f773d
commit
683c01b301
|
@ -777,8 +777,10 @@ void SVG_PLOTTER::Text( const wxPoint& aPos,
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSize text_size;
|
wxSize text_size;
|
||||||
text_size.x = GraphicTextWidth( aText, aSize, aItalic, width );
|
// aSize.x or aSize.y is < 0 for mirrored texts.
|
||||||
text_size.y = aSize.x * 4/3; // Hershey font height to em size conversion
|
// The actual text size value is the absolue value
|
||||||
|
text_size.x = std::abs( GraphicTextWidth( aText, aSize, aItalic, width ) );
|
||||||
|
text_size.y = std::abs( aSize.x * 4/3 ); // Hershey font height to em size conversion
|
||||||
DPOINT anchor_pos_dev = userToDeviceCoordinates( aPos );
|
DPOINT anchor_pos_dev = userToDeviceCoordinates( aPos );
|
||||||
DPOINT text_pos_dev = userToDeviceCoordinates( text_pos );
|
DPOINT text_pos_dev = userToDeviceCoordinates( text_pos );
|
||||||
DPOINT sz_dev = userToDeviceSize( text_size );
|
DPOINT sz_dev = userToDeviceSize( text_size );
|
||||||
|
|
Loading…
Reference in New Issue