Adding SHAPE_ARC direct plotting
This commit is contained in:
parent
3d4ce0796e
commit
cccdaddd50
|
@ -816,6 +816,7 @@ void GERBER_PLOTTER::Circle( const wxPoint& aCenter, int aDiameter, FILL_TYPE aF
|
|||
}
|
||||
|
||||
|
||||
|
||||
void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAngle,
|
||||
int aRadius, FILL_TYPE aFill, int aWidth )
|
||||
{
|
||||
|
@ -825,6 +826,14 @@ void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAn
|
|||
plotArc( aCenter, aStAngle, aEndAngle, aRadius, false );
|
||||
}
|
||||
|
||||
void GERBER_PLOTTER::Arc( const SHAPE_ARC& aArc )
|
||||
{
|
||||
SetCurrentLineWidth( aArc.GetWidth() );
|
||||
|
||||
// aFill is not used here.
|
||||
plotArc( aArc, false );
|
||||
}
|
||||
|
||||
|
||||
void GERBER_PLOTTER::plotArc( const SHAPE_ARC& aArc, bool aPlotInRegion )
|
||||
{
|
||||
|
|
|
@ -154,6 +154,13 @@ double PLOTTER::GetDashGapLenIU() const
|
|||
}
|
||||
|
||||
|
||||
void PLOTTER::Arc( const SHAPE_ARC& aArc )
|
||||
{
|
||||
Arc( wxPoint( aArc.GetCenter() ), aArc.GetStartAngle(), aArc.GetEndAngle(), aArc.GetRadius(),
|
||||
FILL_TYPE::NO_FILL, aArc.GetWidth() );
|
||||
}
|
||||
|
||||
|
||||
void PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle, int radius,
|
||||
FILL_TYPE fill, int width )
|
||||
{
|
||||
|
|
|
@ -77,6 +77,8 @@ public:
|
|||
virtual void Arc( const wxPoint& aCenter, double aStAngle, double aEndAngle,
|
||||
int aRadius, FILL_TYPE aFill, int aWidth = USE_DEFAULT_LINE_WIDTH ) override;
|
||||
|
||||
virtual void Arc( const SHAPE_ARC& aArc ) override;
|
||||
|
||||
// These functions plot an item and manage X2 gerber attributes
|
||||
virtual void ThickSegment( const wxPoint& start, const wxPoint& end, int width,
|
||||
OUTLINE_MODE tracemode, void* aData ) override;
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include <render_settings.h>
|
||||
|
||||
class COLOR_SETTINGS;
|
||||
class SHAPE_ARC;
|
||||
class SHAPE_POLY_SET;
|
||||
class SHAPE_LINE_CHAIN;
|
||||
class GBR_NETLIST_METADATA;
|
||||
|
@ -233,6 +234,7 @@ public:
|
|||
*/
|
||||
virtual void Arc( const wxPoint& centre, double StAngle, double EndAngle,
|
||||
int rayon, FILL_TYPE fill, int width = USE_DEFAULT_LINE_WIDTH );
|
||||
virtual void Arc( const SHAPE_ARC& aArc );
|
||||
|
||||
/**
|
||||
* Generic fallback: Cubic Bezier curve rendered as a polyline
|
||||
|
|
Loading…
Reference in New Issue