Loading common/common_plotPS_functions.cpp +0 −1 Original line number Original line Diff line number Diff line Loading @@ -430,7 +430,6 @@ void PS_PLOTTER::SetCurrentLineWidth( int width ) currentPenWidth = pen_width; currentPenWidth = pen_width; } } void PS_PLOTTER::emitSetRGBColor( double r, double g, double b ) void PS_PLOTTER::emitSetRGBColor( double r, double g, double b ) { { wxASSERT( outputFile ); wxASSERT( outputFile ); Loading common/common_plotSVG_functions.cpp +9 −3 Original line number Original line Diff line number Diff line Loading @@ -228,15 +228,21 @@ void SVG_PLOTTER::Rect( const wxPoint& p1, const wxPoint& p2, FILL_T fill, int w { { EDA_RECT rect( p1, wxSize( p2.x -p1.x, p2.y -p1.y ) ); EDA_RECT rect( p1, wxSize( p2.x -p1.x, p2.y -p1.y ) ); rect.Normalize(); rect.Normalize(); DPOINT pos_dev = userToDeviceCoordinates( rect.GetOrigin() ); DPOINT org_dev = userToDeviceCoordinates( rect.GetOrigin() ); DPOINT size_dev = userToDeviceSize( rect.GetSize() ); DPOINT end_dev = userToDeviceCoordinates( rect.GetEnd() ); DSIZE size_dev = end_dev - org_dev; // Ensure size of rect in device coordinates is > 0 // Inkscape has problems with negative values for width and/or height DBOX rect_dev( org_dev, size_dev); rect_dev.Normalize(); setFillMode( fill ); setFillMode( fill ); SetCurrentLineWidth( width ); SetCurrentLineWidth( width ); fprintf( outputFile, fprintf( outputFile, "<rect x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" rx=\"%g\" />\n", "<rect x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" rx=\"%g\" />\n", pos_dev.x, pos_dev.y, size_dev.x, size_dev.y, rect_dev.GetPosition().x, rect_dev.GetPosition().y, rect_dev.GetSize().x, rect_dev.GetSize().y, 0.0 // radius of rounded corners 0.0 // radius of rounded corners ); ); } } Loading include/pad_shapes.h +0 −3 Original line number Original line Diff line number Diff line Loading @@ -17,9 +17,6 @@ enum PAD_SHAPE_T PAD_RECT, PAD_RECT, PAD_OVAL, PAD_OVAL, PAD_TRAPEZOID, PAD_TRAPEZOID, PAD_RRECT, PAD_OCTAGON, PAD_SQUARE, }; }; Loading include/plot_common.h +2 −36 Original line number Original line Diff line number Diff line Loading @@ -119,21 +119,6 @@ public: virtual void SetDash( bool dashed ) = 0; virtual void SetDash( bool dashed ) = 0; /** PLEASE NOTE: the plot width adjustment is actually done by the * pcbnew routines, the plotter class only carry it along! * XXX In fact it's only used during postscript plot, I'd move this * variable as a static in pcbnew/plot_rtn.cpp. Also: why it's double? * it's added to pad/track size and it's specified in IU, so it should * be an int */ virtual void SetPlotWidthAdj( double width ) { } virtual double GetPlotWidthAdj() { return 0.; } virtual void SetCreator( const wxString& _creator ) virtual void SetCreator( const wxString& _creator ) { { creator = _creator; creator = _creator; Loading Loading @@ -452,7 +437,7 @@ protected: class PSLIKE_PLOTTER : public PLOTTER class PSLIKE_PLOTTER : public PLOTTER { { public: public: PSLIKE_PLOTTER() : plotScaleAdjX( 1 ), plotScaleAdjY( 1 ), plotWidthAdj( 0 ), PSLIKE_PLOTTER() : plotScaleAdjX( 1 ), plotScaleAdjY( 1 ), m_textMode( PLOTTEXTMODE_PHANTOM ) m_textMode( PLOTTEXTMODE_PHANTOM ) { { } } Loading @@ -476,20 +461,6 @@ public: plotScaleAdjY = scaleY; plotScaleAdjY = scaleY; } } /** * Set the 'width adjustment' for the postscript engine * (useful for controlling toner bleeding during direct transfer) */ virtual void SetPlotWidthAdj( double width ) { plotWidthAdj = width; } virtual double GetPlotWidthAdj() const { return plotWidthAdj; } // Pad routines are handled with lower level primitives // Pad routines are handled with lower level primitives virtual void FlashPadCircle( const wxPoint& pos, int diametre, virtual void FlashPadCircle( const wxPoint& pos, int diametre, EDA_DRAW_MODE_T trace_mode ); EDA_DRAW_MODE_T trace_mode ); Loading Loading @@ -538,14 +509,9 @@ protected: int returnPostscriptTextWidth( const wxString& aText, int aXSize, int returnPostscriptTextWidth( const wxString& aText, int aXSize, bool aItalic, bool aBold ); bool aItalic, bool aBold ); /// Fine user scale /// Fine user scale adjust ( = 1.0 if no correction) double plotScaleAdjX, plotScaleAdjY; double plotScaleAdjX, plotScaleAdjY; /** Plot width adjust XXX should be moved in the PCB plotting * routines! */ double plotWidthAdj; /// How to draw text /// How to draw text PlotTextMode m_textMode; PlotTextMode m_textMode; }; }; Loading pcbnew/dialogs/dialog_SVG_print.cpp +5 −4 Original line number Original line Diff line number Diff line Loading @@ -248,7 +248,11 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName ) PCB_PLOT_PARAMS m_plotOpts; PCB_PLOT_PARAMS m_plotOpts; m_plotOpts.SetPlotFrameRef( PrintPageRef() ); m_plotOpts.SetPlotFrameRef( PrintPageRef() ); // Adding drill marks m_plotOpts.SetDrillMarksType( PCB_PLOT_PARAMS::FULL_DRILL_SHAPE ); m_plotOpts.SetDrillMarksType( PCB_PLOT_PARAMS::FULL_DRILL_SHAPE ); m_plotOpts.SetSkipPlotNPTH_Pads( false ); m_plotOpts.SetMirror( m_printMirror ); m_plotOpts.SetMirror( m_printMirror ); m_plotOpts.SetFormat( PLOT_FORMAT_SVG ); m_plotOpts.SetFormat( PLOT_FORMAT_SVG ); EDA_COLOR_T color = UNSPECIFIED_COLOR; // Used layer color to plot ref and value EDA_COLOR_T color = UNSPECIFIED_COLOR; // Used layer color to plot ref and value Loading Loading @@ -278,10 +282,7 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName ) if( plotter ) if( plotter ) { { plotter->SetColorMode( m_ModeColorOption->GetSelection() == 0 ); plotter->SetColorMode( m_ModeColorOption->GetSelection() == 0 ); PlotStandardLayer( brd, plotter, m_PrintMaskLayer, m_plotOpts, true, false ); PlotStandardLayer( brd, plotter, m_PrintMaskLayer, m_plotOpts ); // Adding drill marks, if required and if the plotter is able to plot them: if( m_plotOpts.GetDrillMarksType() != PCB_PLOT_PARAMS::NO_DRILL_SHAPE ) PlotDrillMarks( brd, plotter, m_plotOpts ); } } plotter->EndPlot(); plotter->EndPlot(); Loading Loading
common/common_plotPS_functions.cpp +0 −1 Original line number Original line Diff line number Diff line Loading @@ -430,7 +430,6 @@ void PS_PLOTTER::SetCurrentLineWidth( int width ) currentPenWidth = pen_width; currentPenWidth = pen_width; } } void PS_PLOTTER::emitSetRGBColor( double r, double g, double b ) void PS_PLOTTER::emitSetRGBColor( double r, double g, double b ) { { wxASSERT( outputFile ); wxASSERT( outputFile ); Loading
common/common_plotSVG_functions.cpp +9 −3 Original line number Original line Diff line number Diff line Loading @@ -228,15 +228,21 @@ void SVG_PLOTTER::Rect( const wxPoint& p1, const wxPoint& p2, FILL_T fill, int w { { EDA_RECT rect( p1, wxSize( p2.x -p1.x, p2.y -p1.y ) ); EDA_RECT rect( p1, wxSize( p2.x -p1.x, p2.y -p1.y ) ); rect.Normalize(); rect.Normalize(); DPOINT pos_dev = userToDeviceCoordinates( rect.GetOrigin() ); DPOINT org_dev = userToDeviceCoordinates( rect.GetOrigin() ); DPOINT size_dev = userToDeviceSize( rect.GetSize() ); DPOINT end_dev = userToDeviceCoordinates( rect.GetEnd() ); DSIZE size_dev = end_dev - org_dev; // Ensure size of rect in device coordinates is > 0 // Inkscape has problems with negative values for width and/or height DBOX rect_dev( org_dev, size_dev); rect_dev.Normalize(); setFillMode( fill ); setFillMode( fill ); SetCurrentLineWidth( width ); SetCurrentLineWidth( width ); fprintf( outputFile, fprintf( outputFile, "<rect x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" rx=\"%g\" />\n", "<rect x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" rx=\"%g\" />\n", pos_dev.x, pos_dev.y, size_dev.x, size_dev.y, rect_dev.GetPosition().x, rect_dev.GetPosition().y, rect_dev.GetSize().x, rect_dev.GetSize().y, 0.0 // radius of rounded corners 0.0 // radius of rounded corners ); ); } } Loading
include/pad_shapes.h +0 −3 Original line number Original line Diff line number Diff line Loading @@ -17,9 +17,6 @@ enum PAD_SHAPE_T PAD_RECT, PAD_RECT, PAD_OVAL, PAD_OVAL, PAD_TRAPEZOID, PAD_TRAPEZOID, PAD_RRECT, PAD_OCTAGON, PAD_SQUARE, }; }; Loading
include/plot_common.h +2 −36 Original line number Original line Diff line number Diff line Loading @@ -119,21 +119,6 @@ public: virtual void SetDash( bool dashed ) = 0; virtual void SetDash( bool dashed ) = 0; /** PLEASE NOTE: the plot width adjustment is actually done by the * pcbnew routines, the plotter class only carry it along! * XXX In fact it's only used during postscript plot, I'd move this * variable as a static in pcbnew/plot_rtn.cpp. Also: why it's double? * it's added to pad/track size and it's specified in IU, so it should * be an int */ virtual void SetPlotWidthAdj( double width ) { } virtual double GetPlotWidthAdj() { return 0.; } virtual void SetCreator( const wxString& _creator ) virtual void SetCreator( const wxString& _creator ) { { creator = _creator; creator = _creator; Loading Loading @@ -452,7 +437,7 @@ protected: class PSLIKE_PLOTTER : public PLOTTER class PSLIKE_PLOTTER : public PLOTTER { { public: public: PSLIKE_PLOTTER() : plotScaleAdjX( 1 ), plotScaleAdjY( 1 ), plotWidthAdj( 0 ), PSLIKE_PLOTTER() : plotScaleAdjX( 1 ), plotScaleAdjY( 1 ), m_textMode( PLOTTEXTMODE_PHANTOM ) m_textMode( PLOTTEXTMODE_PHANTOM ) { { } } Loading @@ -476,20 +461,6 @@ public: plotScaleAdjY = scaleY; plotScaleAdjY = scaleY; } } /** * Set the 'width adjustment' for the postscript engine * (useful for controlling toner bleeding during direct transfer) */ virtual void SetPlotWidthAdj( double width ) { plotWidthAdj = width; } virtual double GetPlotWidthAdj() const { return plotWidthAdj; } // Pad routines are handled with lower level primitives // Pad routines are handled with lower level primitives virtual void FlashPadCircle( const wxPoint& pos, int diametre, virtual void FlashPadCircle( const wxPoint& pos, int diametre, EDA_DRAW_MODE_T trace_mode ); EDA_DRAW_MODE_T trace_mode ); Loading Loading @@ -538,14 +509,9 @@ protected: int returnPostscriptTextWidth( const wxString& aText, int aXSize, int returnPostscriptTextWidth( const wxString& aText, int aXSize, bool aItalic, bool aBold ); bool aItalic, bool aBold ); /// Fine user scale /// Fine user scale adjust ( = 1.0 if no correction) double plotScaleAdjX, plotScaleAdjY; double plotScaleAdjX, plotScaleAdjY; /** Plot width adjust XXX should be moved in the PCB plotting * routines! */ double plotWidthAdj; /// How to draw text /// How to draw text PlotTextMode m_textMode; PlotTextMode m_textMode; }; }; Loading
pcbnew/dialogs/dialog_SVG_print.cpp +5 −4 Original line number Original line Diff line number Diff line Loading @@ -248,7 +248,11 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName ) PCB_PLOT_PARAMS m_plotOpts; PCB_PLOT_PARAMS m_plotOpts; m_plotOpts.SetPlotFrameRef( PrintPageRef() ); m_plotOpts.SetPlotFrameRef( PrintPageRef() ); // Adding drill marks m_plotOpts.SetDrillMarksType( PCB_PLOT_PARAMS::FULL_DRILL_SHAPE ); m_plotOpts.SetDrillMarksType( PCB_PLOT_PARAMS::FULL_DRILL_SHAPE ); m_plotOpts.SetSkipPlotNPTH_Pads( false ); m_plotOpts.SetMirror( m_printMirror ); m_plotOpts.SetMirror( m_printMirror ); m_plotOpts.SetFormat( PLOT_FORMAT_SVG ); m_plotOpts.SetFormat( PLOT_FORMAT_SVG ); EDA_COLOR_T color = UNSPECIFIED_COLOR; // Used layer color to plot ref and value EDA_COLOR_T color = UNSPECIFIED_COLOR; // Used layer color to plot ref and value Loading Loading @@ -278,10 +282,7 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName ) if( plotter ) if( plotter ) { { plotter->SetColorMode( m_ModeColorOption->GetSelection() == 0 ); plotter->SetColorMode( m_ModeColorOption->GetSelection() == 0 ); PlotStandardLayer( brd, plotter, m_PrintMaskLayer, m_plotOpts, true, false ); PlotStandardLayer( brd, plotter, m_PrintMaskLayer, m_plotOpts ); // Adding drill marks, if required and if the plotter is able to plot them: if( m_plotOpts.GetDrillMarksType() != PCB_PLOT_PARAMS::NO_DRILL_SHAPE ) PlotDrillMarks( brd, plotter, m_plotOpts ); } } plotter->EndPlot(); plotter->EndPlot(); Loading