20#include <boost/test/unit_test.hpp>
103 line.
SetDragPolicy( std::make_unique<POLYGON_EDGE_DRAG_POLICY>( line, points ) );
Represent a line connecting two EDIT_POINTs.
virtual void SetPosition(const VECTOR2I &aPosition) override
Return coordinates of an EDIT_POINT.
POLYGON_EDGE_DRAG_POLICY * GetDragPolicy() const
void SetRelation(std::unique_ptr< EDIT_RELATION > aRelation)
Set a relation for an EDIT_LINE.
virtual void ApplyRelation(const GRID_HELPER &aGrid) override
Correct coordinates of an EDIT_POINT by applying its relation.
EDIT_POINT & GetEnd()
Return the end EDIT_POINT.
EDIT_POINT & GetOrigin()
Return the origin EDIT_POINT.
void SetDragPolicy(std::unique_ptr< POLYGON_EDGE_DRAG_POLICY > aPolicy)
EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them.
void AddPoint(const EDIT_POINT &aPoint)
Add an EDIT_POINT.
EDIT_LINE & Line(unsigned int aIndex)
EDIT_POINT & Point(unsigned int aIndex)
void AddLine(const EDIT_LINE &aLine)
Adds an EDIT_LINE.
Represent a single point that can be used for modifying items.
int GetY() const
Return Y coordinate of an EDIT_POINT.
EDIT_RELATION * GetRelation() const
Return the relation imposed on an EDIT_POINT.
virtual void ApplyRelation(const GRID_HELPER &aGrid)
Correct coordinates of an EDIT_POINT by applying its relation.
virtual VECTOR2I GetPosition() const
Return coordinates of an EDIT_POINT.
int GetX() const
Return X coordinate of an EDIT_POINT.
void SetRelation(std::unique_ptr< EDIT_RELATION > aRelation)
Set a relation for an EDIT_POINT.
static std::unique_ptr< EDIT_RELATION > PerpendicularTranslation(const EDIT_LINE &aLine)
static std::unique_ptr< EDIT_RELATION > SameX(const EDIT_POINT &aReference)
EDIT_RELATION_KIND Kind() const
POLYGON_LINE_MODE GetMode() const
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(PointRelationsExposeTypedSemantics)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I