KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EC_LINE Class Reference

EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a line (determined by 2 points). More...

#include <edit_constraints.h>

Inheritance diagram for EC_LINE:
EDIT_CONSTRAINT< EDIT_POINT >

Public Member Functions

 EC_LINE (EDIT_POINT &aConstrained, const EDIT_POINT &aConstrainer)
 Correct coordinates of the constrained edit handle.
 
virtual void Apply (EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
 Correct coordinates of the constrained edit handle.
 
void Apply (const GRID_HELPER &aGrid)
 Correct coordinates of the constrained edit handle.
 

Protected Attributes

EDIT_POINTm_constrained
 Point that is constrained by rules implemented by Apply().
 

Private Attributes

const EDIT_POINTm_constrainer
 Point that imposes the constraint.
 
VECTOR2I m_line
 Vector representing the constraining line.
 

Detailed Description

EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a line (determined by 2 points).

Definition at line 166 of file edit_constraints.h.

Constructor & Destructor Documentation

◆ EC_LINE()

EC_LINE::EC_LINE ( EDIT_POINT aConstrained,
const EDIT_POINT aConstrainer 
)

Correct coordinates of the constrained edit handle.

Definition at line 81 of file edit_constraints.cpp.

References EDIT_POINT::GetPosition(), EDIT_CONSTRAINT< EDIT_POINT >::m_constrained, m_constrainer, and m_line.

Member Function Documentation

◆ Apply() [1/2]

void EDIT_CONSTRAINT< EDIT_POINT >::Apply ( const GRID_HELPER aGrid)
inlineinherited

Correct coordinates of the constrained edit handle.

Definition at line 82 of file edit_constraints.h.

◆ Apply() [2/2]

void EC_LINE::Apply ( EDIT_POINT aHandle,
const GRID_HELPER aGrid 
)
overridevirtual

Member Data Documentation

◆ m_constrained

EDIT_POINT & EDIT_CONSTRAINT< EDIT_POINT >::m_constrained
protectedinherited

Point that is constrained by rules implemented by Apply().

Definition at line 88 of file edit_constraints.h.

◆ m_constrainer

const EDIT_POINT& EC_LINE::m_constrainer
private

Point that imposes the constraint.

Definition at line 175 of file edit_constraints.h.

Referenced by Apply(), and EC_LINE().

◆ m_line

VECTOR2I EC_LINE::m_line
private

Vector representing the constraining line.

Definition at line 176 of file edit_constraints.h.

Referenced by Apply(), and EC_LINE().


The documentation for this class was generated from the following files: