20#ifndef EDIT_RELATIONS_H_
21#define EDIT_RELATIONS_H_
71 static std::unique_ptr<EDIT_RELATION>
SameX(
const EDIT_POINT& aReference );
72 static std::unique_ptr<EDIT_RELATION>
SameY(
const EDIT_POINT& aReference );
Represent a line connecting two EDIT_POINTs.
EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them.
Represent a single point that can be used for modifying items.
static std::unique_ptr< EDIT_RELATION > Angle90(const EDIT_POINT &aReference)
const VECTOR2I & Origin() const
static std::unique_ptr< EDIT_RELATION > Angle45(const EDIT_POINT &aReference)
EDIT_RELATION(EDIT_RELATION_KIND aKind)
const EDIT_POINT * m_secondaryReference
static std::unique_ptr< EDIT_RELATION > SameY(const EDIT_POINT &aReference)
static std::unique_ptr< EDIT_RELATION > PerpendicularTranslation(const EDIT_LINE &aLine)
const EDIT_POINT * m_reference
const EDIT_POINT * Reference() const
EDIT_RELATION_KIND m_kind
void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) const
const VECTOR2I & Direction() const
static std::unique_ptr< EDIT_RELATION > PointOnCircle(const EDIT_POINT &aCenter, const EDIT_POINT &aEnd)
static std::unique_ptr< EDIT_RELATION > SameX(const EDIT_POINT &aReference)
static std::unique_ptr< EDIT_RELATION > make(EDIT_RELATION_KIND aKind, const EDIT_POINT &aReference)
static std::unique_ptr< EDIT_RELATION > PointOnLine(const EDIT_POINT &aConstrained, const EDIT_POINT &aReference)
const EDIT_POINT * SecondaryReference() const
EDIT_RELATION_KIND Kind() const
void SetMode(POLYGON_LINE_MODE aMode)
void Apply(EDIT_LINE &aHandle, const GRID_HELPER &aGrid)
EDIT_POINTS & m_editPoints
VECTOR2I m_endSideDirection
void applyFixedLength(EDIT_LINE &aHandle)
VECTOR2I m_originalCenter
POLYGON_EDGE_DRAG_POLICY(EDIT_LINE &aLine, EDIT_POINTS &aPoints, POLYGON_LINE_MODE aMode=POLYGON_LINE_MODE::CONVERGING)
VECTOR2I m_originSideDirection
EDIT_POINT * m_prevOrigin
POLYGON_LINE_MODE GetMode() const
VECTOR2I m_convergencePoint
const VECTOR2I & GetOriginalCenter() const
void applyConverging(EDIT_LINE &aHandle)
const VECTOR2I & GetPerpVector() const
@ PERPENDICULAR_TRANSLATION
VECTOR2< int32_t > VECTOR2I