54 if( aLineWidth <= 0.0 )
72 static_cast<FP_SHAPE*>( line.get() )->SetLocalCoord();
82 circle->SetFilled( aFilled );
89 static_cast<FP_SHAPE*>( circle.get() )->SetLocalCoord();
96 double aAngle,
double aWidth )
117 static_cast<FP_SHAPE*>( arc.get() )->SetLocalCoord();
125 std::vector< wxPoint > convertedPoints;
126 convertedPoints.reserve( convertedPoints.size() );
128 for(
const VECTOR2D& precisePoint : aVertices )
129 convertedPoints.emplace_back(
MapCoordinate( precisePoint ) );
135 polygon->SetPolyPoints( convertedPoints );
138 static_cast<FP_SHAPE*>( polygon.get() )->SetLocalCoord();
141 addItem( std::move( polygon ) );
146 double aHeight,
double aWidth,
double aThickness,
double aOrientation,
149 std::unique_ptr<BOARD_ITEM> boardItem;
163 static_cast<FP_TEXT*>( boardItem.get() )->SetLocalCoord();
165 addItem( std::move( boardItem ) );
180 spline->RebuildBezierToSegmentsPointsList( aWidth );
183 static_cast<FP_SHAPE*>( spline.get() )->SetLocalCoord();
185 addItem( std::move( spline ) );
191 return std::make_unique<PCB_SHAPE>(
m_board );
198 return make_pair( std::unique_ptr<BOARD_ITEM>(
text ), static_cast<EDA_TEXT*>(
text ) );
211 return make_pair( std::unique_ptr<BOARD_ITEM>(
text ), static_cast<EDA_TEXT*>(
text ) );
std::pair< std::unique_ptr< BOARD_ITEM >, EDA_TEXT * > createText() override
Target layer for the imported shapes.
void AddCircle(const VECTOR2D &aOrigin, double aRadius, double aWidth, bool aFilled) override
Create an object representing a circle.
double ImportScalingFactor() const
class FP_TEXT, text in a footprint
PCB_LAYER_ID GetLayer() const
Return the target layer for the imported shapes.
virtual std::unique_ptr< PCB_SHAPE > createDrawing()=0
< Create an object representing a graphical shape.
void AddArc(const VECTOR2D &aCenter, const VECTOR2D &aStart, double aAngle, double aWidth) override
Create an object representing an arc.
void SetTextPos(const wxPoint &aPoint)
std::unique_ptr< PCB_SHAPE > createDrawing() override
< Create an object representing a graphical shape.
class FP_SHAPE, a footprint edge
wxPoint MapCoordinate(const VECTOR2D &aCoordinate)
Convert an imported coordinate to a board coordinate, according to the internal units,...
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
double m_millimeterToIu
Offset (in mm) for imported coordinates.
int MapLineWidth(double aLineWidth)
If aLineWidth < 0, the default line thickness value is returned.
virtual void SetText(const wxString &aText)
VECTOR2< double > VECTOR2D
void SetVertJustify(EDA_TEXT_VJUSTIFY_T aType)
void AddSpline(const VECTOR2D &aStart, const VECTOR2D &aBezierControl1, const VECTOR2D &aBezierControl2, const VECTOR2D &aEnd, double aWidth) override
Create an object representing an arc.
void AddText(const VECTOR2D &aOrigin, const wxString &aText, double aHeight, double aWidth, double aThickness, double aOrientation, EDA_TEXT_HJUSTIFY_T aHJustify, EDA_TEXT_VJUSTIFY_T aVJustify) override
Create an object representing a text.
void SetTextWidth(int aWidth)
VECTOR2< T > Rotate(double aAngle) const
Rotate the vector by a given angle.
void addItem(std::unique_ptr< EDA_ITEM > aItem)
< Add an item to the imported shapes list.
double DEG2RAD(double deg)
double GetLineWidthMM() const
Return the line width used for importing the outlines (in mm).
void SetHorizJustify(EDA_TEXT_HJUSTIFY_T aType)
void SetTextHeight(int aHeight)
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
virtual std::pair< std::unique_ptr< BOARD_ITEM >, EDA_TEXT * > createText()=0
Target layer for the imported shapes.
const VECTOR2D & GetImportOffsetMM() const
void AddPolygon(const std::vector< VECTOR2D > &aVertices, double aWidth) override
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
virtual void SetTextAngle(double aAngle)
void AddLine(const VECTOR2D &aOrigin, const VECTOR2D &aEnd, double aWidth) override
Create an object representing a line segment.
static constexpr int Millimeter2iu(double mm)
GRAPHICS_IMPORTER_PCBNEW()