27#ifndef EDIT_CONSTRAINTS_H_
28#define EDIT_CONSTRAINTS_H_
61template<
class EDIT_TYPE>
EDIT_CONSTRAINT that imposes a constraint that two points have to be located at angle of 45 degree mu...
const EDIT_POINT & m_constrainer
Point that imposes the constraint.
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
EC_45DEGREE(EDIT_POINT &aConstrained, const EDIT_POINT &aConstrainer)
EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a circle.
EC_CIRCLE(EDIT_POINT &aConstrained, const EDIT_POINT &aCenter, const EDIT_POINT &aEnd)
const EDIT_POINT & m_center
< Point that imposes the constraint (center of the circle).
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
EDIT_CONSTRAINT for 3 segments: dragged and two adjacent ones, enforcing to keep their slopes and all...
EDIT_CONSTRAINT< EDIT_POINT > * m_endSideConstraint
Additional constraint, applied when at least two points are collinear.
virtual ~EC_CONVERGING()
Correct coordinates of the constrained edit handle.
EDIT_CONSTRAINT< EDIT_POINT > * m_colinearConstraint
EDIT_POINTS instance that stores currently modified lines.
VECTOR2I m_draggedVector
Flags to indicate when dragged and neighbouring lines are (almost) collinear.
EDIT_CONSTRAINT< EDIT_POINT > * m_originSideConstraint
< Constraint for origin side segment.
EDIT_POINTS & m_editPoints
Vector that represents the initial direction of the dragged segment.
virtual void Apply(EDIT_LINE &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
EDIT_CONSTRAINT that imposes a constraint that two points have to have the same Y coordinate.
EC_HORIZONTAL(EDIT_POINT &aConstrained, const EDIT_POINT &aConstrainer)
const EDIT_POINT & m_constrainer
Point that imposes the constraint.
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a line (determined by 2 points).
const EDIT_POINT & m_constrainer
Point that imposes the constraint.
VECTOR2I m_line
Vector representing the constraining line.
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
EDIT_CONSTRAINT for a EDIT_LINE, that constrains the line to move perpendicular to the line itself.
virtual ~EC_PERPLINE()
Correct coordinates of the constrained edit handle.
virtual void Apply(EDIT_LINE &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
EDIT_CONSTRAINT that imposes a constraint that two points have to have the same X coordinate.
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
EC_VERTICAL(EDIT_POINT &aConstrained, const EDIT_POINT &aConstrainer)
const EDIT_POINT & m_constrainer
Point that imposes the constraint.
Describe constraints between two edit handles.
void Apply(const GRID_HELPER &aGrid)
Correct coordinates of the constrained edit handle.
EDIT_TYPE & m_constrained
Point that is constrained by rules implemented by Apply().
EDIT_CONSTRAINT(EDIT_TYPE &aConstrained)
virtual void Apply(EDIT_TYPE &aHandle, const GRID_HELPER &aGrid)=0
Correct coordinates of the constrained edit handle.
virtual ~EDIT_CONSTRAINT()
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.