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

Class to help update the text position of a dimension when the crossbar changes. More...

Public Member Functions

 DIM_ALIGNED_TEXT_UPDATER (PCB_DIM_ALIGNED &aDimension)
 
void UpdateTextAfterChange ()
 

Private Member Functions

VECTOR2I getDimensionNewTextPosition ()
 

Private Attributes

PCB_DIM_ALIGNEDm_dimension
 
const VECTOR2I m_originalTextPos
 
const SEG m_oldCrossBar
 

Detailed Description

Class to help update the text position of a dimension when the crossbar changes.

Choosing the right way to update the text position requires some care, and needs to hold some state from the original dimension position so the text can be placed in a similar position relative to the new crossbar. This class handles that state and the logic to find the new text position.

Definition at line 1258 of file pcb_point_editor.cpp.

Constructor & Destructor Documentation

◆ DIM_ALIGNED_TEXT_UPDATER()

DIM_ALIGNED_TEXT_UPDATER::DIM_ALIGNED_TEXT_UPDATER ( PCB_DIM_ALIGNED aDimension)
inline

Definition at line 1261 of file pcb_point_editor.cpp.

Member Function Documentation

◆ getDimensionNewTextPosition()

◆ UpdateTextAfterChange()

Member Data Documentation

◆ m_dimension

PCB_DIM_ALIGNED& DIM_ALIGNED_TEXT_UPDATER::m_dimension
private

Definition at line 1360 of file pcb_point_editor.cpp.

Referenced by getDimensionNewTextPosition(), and UpdateTextAfterChange().

◆ m_oldCrossBar

const SEG DIM_ALIGNED_TEXT_UPDATER::m_oldCrossBar
private

Definition at line 1362 of file pcb_point_editor.cpp.

Referenced by getDimensionNewTextPosition(), and UpdateTextAfterChange().

◆ m_originalTextPos

const VECTOR2I DIM_ALIGNED_TEXT_UPDATER::m_originalTextPos
private

Definition at line 1361 of file pcb_point_editor.cpp.

Referenced by getDimensionNewTextPosition(), and UpdateTextAfterChange().


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