43 m_lines.push_back( { aStart, aEnd } );
47 bool aFilled,
const COLOR4D& aFillColor )
override {}
53 bool aFilled,
const COLOR4D& aFillColor )
override {}
55 void AddText(
const VECTOR2D& aOrigin,
const wxString& aText,
double aHeight,
double aWidth,
63 std::vector<std::pair<VECTOR2D, VECTOR2D>>
m_lines;
100 BOOST_CHECK_MESSAGE( offset.
x < 0,
"X offset should be negative to shift large coords down" );
103 if( !importer.
m_lines.empty() )
109 double maxCoord =
static_cast<double>( std::numeric_limits<int>::max() )
112 BOOST_CHECK_MESSAGE( ( importedStart.
x + offset.
x ) < maxCoord,
113 "Imported X coord should be within valid range" );
114 BOOST_CHECK_MESSAGE( ( importedStart.
y + offset.
y ) < maxCoord,
115 "Imported Y coord should be within valid range" );
140 BOOST_CHECK_MESSAGE( offset ==
VECTOR2D( 0, 0 ),
141 "Normal coordinates should not trigger auto-offset" );
constexpr double PCB_IU_PER_MM
Pcbnew IU is 1 nanometer.
void AddLine(const VECTOR2D &aStart, const VECTOR2D &aEnd, const IMPORTED_STROKE &aStroke) override
Create an object representing a line segment.
void ImportTo(GRAPHICS_IMPORTER &aImporter)
double GetMillimeterToIuFactor()
double m_millimeterToIu
Factor to convert millimeters to Internal Units.
const VECTOR2D & GetImportOffsetMM() const
A clone of IMPORTED_STROKE, but with floating-point width.
A color representation with 4 components: red, green, blue, alpha.
void AddLine(const VECTOR2D &aStart, const VECTOR2D &aEnd, const IMPORTED_STROKE &aStroke) override
Create an object representing a line segment.
void AddCircle(const VECTOR2D &aCenter, double aRadius, const IMPORTED_STROKE &aStroke, bool aFilled, const COLOR4D &aFillColor) override
Create an object representing a circle.
void AddText(const VECTOR2D &aOrigin, const wxString &aText, double aHeight, double aWidth, double aThickness, double aOrientation, GR_TEXT_H_ALIGN_T aHJustify, GR_TEXT_V_ALIGN_T aVJustify, const COLOR4D &aColor) override
Create an object representing a text.
std::vector< std::pair< VECTOR2D, VECTOR2D > > m_lines
void AddPolygon(const std::vector< VECTOR2D > &aVertices, const IMPORTED_STROKE &aStroke, bool aFilled, const COLOR4D &aFillColor) override
Create an object representing a polygon.
void AddSpline(const VECTOR2D &aStart, const VECTOR2D &aBezierControl1, const VECTOR2D &aBezierControl2, const VECTOR2D &aEnd, const IMPORTED_STROKE &aStroke) override
Create an object representing an arc.
void AddArc(const VECTOR2D &aCenter, const VECTOR2D &aStart, const EDA_ANGLE &aAngle, const IMPORTED_STROKE &aStroke) override
Create an object representing an arc.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(LargeCoordinatesAutoOffset)
Test that large coordinates that would overflow when converted to internal units are automatically of...
BOOST_AUTO_TEST_SUITE_END()
GR_TEXT_H_ALIGN_T
This is API surface mapped to common.types.HorizontalAlignment.
GR_TEXT_V_ALIGN_T
This is API surface mapped to common.types.VertialAlignment.
VECTOR2< double > VECTOR2D