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) More...
 
VECTOR2I GetOrigin () const
 
void SetEnd (const VECTOR2I &aEnd)
 Set the current end of the rectangle (the end that moves with the cursor. More...
 
VECTOR2I GetEnd () const
 
void SetAngleSnap (bool aSnap)
 
bool GetAngleSnap () const
 
bool IsReset () const
 
void Reset ()
 Reset the manager to the initial state. More...
 
bool IsEmpty () const
 

Private Attributes

VECTOR2I m_origin
 
VECTOR2I m_end
 
bool m_angleSnap = false
 
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()

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

Definition at line 77 of file two_point_geom_manager.h.

References m_angleSnap.

◆ GetEnd()

◆ GetOrigin()

◆ IsEmpty()

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

Definition at line 98 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 85 of file two_point_geom_manager.h.

References m_originSet.

Referenced by updateSegmentFromGeometryMgr(), KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewBBox(), and KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewDraw().

◆ Reset()

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

Reset the manager to the initial state.

Definition at line 93 of file two_point_geom_manager.h.

References m_originSet.

Referenced by DRAWING_TOOL::drawShape().

◆ SetAngleSnap()

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

◆ SetEnd()

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

Set the current end of the rectangle (the end that moves with the cursor.

Definition at line 59 of file two_point_geom_manager.h.

References GetVectorSnapped45(), m_angleSnap, m_end, and m_origin.

Referenced by MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawShape(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), and PCB_VIEWER_TOOLS::MeasureTool().

◆ SetOrigin()

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

< Set the origin of the ruler (the fixed end)

Definition at line 45 of file two_point_geom_manager.h.

References m_origin, and m_originSet.

Referenced by MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawShape(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), and PCB_VIEWER_TOOLS::MeasureTool().

Member Data Documentation

◆ m_angleSnap

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

Definition at line 107 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 106 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 105 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 108 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: