KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER Class Reference

Represent a very simple geometry manager for items that have a start and end point. More...

#include <two_point_geom_manager.h>

Public Member Functions

void SetOrigin (const VECTOR2I &aOrigin)
 < Set the origin of the ruler (the fixed end)
 
VECTOR2I GetOrigin () const
 
void SetEnd (const VECTOR2I &aEnd)
 Set the current end of the rectangle (the end that moves with the cursor.
 
VECTOR2I GetEnd () const
 
void SetAngleSnap (LEADER_MODE aSnap)
 
LEADER_MODE GetAngleSnap () const
 
bool IsReset () const
 
void Reset ()
 Reset the manager to the initial state.
 
bool IsEmpty () const
 

Private Attributes

VECTOR2I m_origin
 
VECTOR2I m_end
 
LEADER_MODE m_angleSnap = LEADER_MODE::DIRECT
 
bool m_originSet = false
 

Detailed Description

Represent a very simple geometry manager for items that have a start and end point.

Definition at line 40 of file two_point_geom_manager.h.

Member Function Documentation

◆ GetAngleSnap()

LEADER_MODE KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::GetAngleSnap ( ) const
inline

Definition at line 75 of file two_point_geom_manager.h.

References m_angleSnap.

◆ GetEnd()

VECTOR2I KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::GetEnd ( ) const
inline

◆ GetOrigin()

VECTOR2I KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::GetOrigin ( ) const
inline

◆ IsEmpty()

bool KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::IsEmpty ( ) const
inline

Definition at line 93 of file two_point_geom_manager.h.

References m_end, m_origin, and m_originSet.

Referenced by DRAWING_TOOL::drawShape().

◆ IsReset()

bool KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::IsReset ( ) const
inline
Returns
true if the manager is in the initial state

Definition at line 80 of file two_point_geom_manager.h.

References m_originSet.

Referenced by updateSegmentFromGeometryMgr().

◆ Reset()

void KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::Reset ( )
inline

Reset the manager to the initial state.

Definition at line 88 of file two_point_geom_manager.h.

References m_originSet.

Referenced by DRAWING_TOOL::drawShape(), and POSITION_RELATIVE_TOOL::PositionRelativeInteractively().

◆ SetAngleSnap()

void KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::SetAngleSnap ( LEADER_MODE aSnap)
inline

◆ SetEnd()

void KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::SetEnd ( const VECTOR2I & aEnd)
inline

◆ SetOrigin()

void KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::SetOrigin ( const VECTOR2I & aOrigin)
inline

Member Data Documentation

◆ m_angleSnap

LEADER_MODE KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::m_angleSnap = LEADER_MODE::DIRECT
private

Definition at line 101 of file two_point_geom_manager.h.

Referenced by GetAngleSnap(), SetAngleSnap(), and SetEnd().

◆ m_end

VECTOR2I KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::m_end
private

Definition at line 100 of file two_point_geom_manager.h.

Referenced by GetEnd(), IsEmpty(), and SetEnd().

◆ m_origin

VECTOR2I KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::m_origin
private

Definition at line 99 of file two_point_geom_manager.h.

Referenced by GetOrigin(), IsEmpty(), SetEnd(), and SetOrigin().

◆ m_originSet

bool KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::m_originSet = false
private

Definition at line 102 of file two_point_geom_manager.h.

Referenced by IsEmpty(), IsReset(), Reset(), and SetOrigin().


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