Plots function: fix a bug about virtual PLOTTER::Text, which was not virtual for derived classes due to a missing parameter in ::Text in these classes. Noticeable only in SVG plot.

SVG plot, fix a missing reinitialization in plot lines, which could define a filled polyline, instead of a simple polyline
(these fixes solve Bug #1313084 )
This commit is contained in:
jean-pierre charras
2014-04-28 18:13:18 +02:00
parent a990c9f047
commit 7b843ecac8
6 changed files with 63 additions and 32 deletions
+12 -2
View File
@@ -478,6 +478,15 @@ void SVG_PLOTTER::PenTo( const wxPoint& pos, char plume )
if( penState == 'Z' ) // here plume = 'D' or 'U'
{
DPOINT pos_dev = userToDeviceCoordinates( pos );
// Ensure we do not use a fill mode when moving tne pen,
// in SVG mode (i;e. we are plotting only basic lines, not a filled area
if( m_fillMode != NO_FILL )
{
setFillMode( NO_FILL );
setSVGPlotStyle();
}
fprintf( outputFile, "<path d=\"M%d %d\n",
(int) pos_dev.x, (int) pos_dev.y );
}
@@ -572,7 +581,8 @@ void SVG_PLOTTER::Text( const wxPoint& aPos,
enum EDA_TEXT_VJUSTIFY_T aV_justify,
int aWidth,
bool aItalic,
bool aBold )
bool aBold,
bool aMultilineAllowed )
{
setFillMode( NO_FILL );
SetColor( aColor );
@@ -581,5 +591,5 @@ void SVG_PLOTTER::Text( const wxPoint& aPos,
// TODO: see if the postscript native text code can be used in SVG plotter
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold );
aWidth, aItalic, aBold, aMultilineAllowed );
}