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 967 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 970 of file pcb_point_editor.cpp.

References m_dimension, m_oldCrossBar, and m_originalTextPos.

Member Function Documentation

◆ getDimensionNewTextPosition()

◆ UpdateTextAfterChange()

Member Data Documentation

◆ m_dimension

PCB_DIM_ALIGNED& DIM_ALIGNED_TEXT_UPDATER::m_dimension
private

◆ m_oldCrossBar

const SEG DIM_ALIGNED_TEXT_UPDATER::m_oldCrossBar
private

◆ m_originalTextPos

const VECTOR2I DIM_ALIGNED_TEXT_UPDATER::m_originalTextPos
private

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