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

Simple container to manage line stroke parameters. More...

#include <stroke_params.h>

Public Member Functions

 STROKE_PARAMS (int aWidth=0, LINE_STYLE aLineStyle=LINE_STYLE::DEFAULT, const KIGFX::COLOR4D &aColor=KIGFX::COLOR4D::UNSPECIFIED)
 
int GetWidth () const
 
void SetWidth (int aWidth)
 
LINE_STYLE GetLineStyle () const
 
void SetLineStyle (LINE_STYLE aLineStyle)
 
KIGFX::COLOR4D GetColor () const
 
void SetColor (const KIGFX::COLOR4D &aColor)
 
bool operator!= (const STROKE_PARAMS &aOther) const
 
void Format (OUTPUTFORMATTER *out, const EDA_IU_SCALE &aIuScale) const
 
void GetMsgPanelInfo (UNITS_PROVIDER *aUnitsProvider, std::vector< MSG_PANEL_ITEM > &aList, bool aIncludeStyle=true, bool aIncludeWidth=true)
 

Static Public Member Functions

static wxString GetLineStyleToken (LINE_STYLE aStyle)
 
static void Stroke (const SHAPE *aShape, LINE_STYLE aLineStyle, int aWidth, const KIGFX::RENDER_SETTINGS *aRenderSettings, const std::function< void(const VECTOR2I &a, const VECTOR2I &b)> &aStroker)
 

Private Attributes

int m_width
 
LINE_STYLE m_lineStyle
 
KIGFX::COLOR4D m_color
 

Detailed Description

Simple container to manage line stroke parameters.

Definition at line 93 of file stroke_params.h.

Constructor & Destructor Documentation

◆ STROKE_PARAMS()

STROKE_PARAMS::STROKE_PARAMS ( int aWidth = 0,
LINE_STYLE aLineStyle = LINE_STYLE::DEFAULT,
const KIGFX::COLOR4D & aColor = KIGFX::COLOR4D::UNSPECIFIED )
inline

Definition at line 96 of file stroke_params.h.

References DEFAULT, m_color, m_lineStyle, m_width, and KIGFX::COLOR4D::UNSPECIFIED.

Referenced by operator!=().

Member Function Documentation

◆ Format()

◆ GetColor()

◆ GetLineStyle()

◆ GetLineStyleToken()

wxString STROKE_PARAMS::GetLineStyleToken ( LINE_STYLE aStyle)
static

Definition at line 364 of file stroke_params.cpp.

References DASH, DASHDOT, DASHDOTDOT, DEFAULT, DOT, and SOLID.

Referenced by Format(), and SCH_IO_KICAD_LEGACY::saveLine().

◆ GetMsgPanelInfo()

void STROKE_PARAMS::GetMsgPanelInfo ( UNITS_PROVIDER * aUnitsProvider,
std::vector< MSG_PANEL_ITEM > & aList,
bool aIncludeStyle = true,
bool aIncludeWidth = true )

◆ GetWidth()

◆ operator!=()

bool STROKE_PARAMS::operator!= ( const STROKE_PARAMS & aOther) const
inline

Definition at line 113 of file stroke_params.h.

References m_color, m_lineStyle, m_width, and STROKE_PARAMS().

◆ SetColor()

◆ SetLineStyle()

◆ SetWidth()

◆ Stroke()

void STROKE_PARAMS::Stroke ( const SHAPE * aShape,
LINE_STYLE aLineStyle,
int aWidth,
const KIGFX::RENDER_SETTINGS * aRenderSettings,
const std::function< void(const VECTOR2I &a, const VECTOR2I &b)> & aStroker )
static

Definition at line 49 of file stroke_params.cpp.

References SEG::A, ANGLE_0, ANGLE_360, SHAPE_LINE_CHAIN::Arc(), SHAPE_LINE_CHAIN::ArcCount(), SHAPE_LINE_CHAIN::ArcIndex(), EDA_ANGLE::AsRadians(), SEG::B, center, ClipLine(), EDA_ANGLE::Cos(), DASH, DASHDOT, DASHDOTDOT, DEGREES_T, DOT, end, SHAPE_ARC::GetCenter(), SHAPE_ELLIPSE::GetCenter(), KIGFX::RENDER_SETTINGS::GetDashLength(), KIGFX::RENDER_SETTINGS::GetDotLength(), SHAPE_ELLIPSE::GetEndAngle(), KIGFX::RENDER_SETTINGS::GetGapLength(), SHAPE_ELLIPSE::GetMajorRadius(), SHAPE_ELLIPSE::GetMinorRadius(), SHAPE_ARC::GetP0(), SHAPE_ARC::GetP1(), SHAPE_ARC::GetRadius(), SHAPE_ELLIPSE::GetRotation(), SHAPE_SEGMENT::GetSeg(), SHAPE_LINE_CHAIN::GetSegment(), SHAPE_SIMPLE::GetSegment(), SHAPE_SIMPLE::GetSegmentCount(), SHAPE_ELLIPSE::GetStartAngle(), SHAPE_ELLIPSE::IsArc(), SHAPE_LINE_CHAIN::IsArcSegment(), KI_FALLTHROUGH, KiROUND(), lineTypeNames, M_PI, next(), BOX2< Vec >::Normalize(), EDA_ANGLE::Normalize(), RADIANS_T, SHAPE_LINE_CHAIN::SegmentCount(), SH_ARC, SH_CIRCLE, SH_ELLIPSE, SH_RECT, SH_SEGMENT, SH_SIMPLE, SHAPE_TYPE_asString(), EDA_ANGLE::Sin(), Stroke(), SHAPE_BASE::Type(), UNIMPLEMENTED_FOR, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BOARD_ADAPTER::addShape(), EXPORTER_STEP::buildGraphic3DShape(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::SCH_PAINTER::drawLine(), BRDITEMS_PLOTTER::PlotShape(), BRDITEMS_PLOTTER::PlotTableBorders(), Stroke(), and PCB_TABLE::TransformGraphicItemsToPolySet().

Member Data Documentation

◆ m_color

KIGFX::COLOR4D STROKE_PARAMS::m_color
private

Definition at line 137 of file stroke_params.h.

Referenced by GetColor(), operator!=(), SetColor(), and STROKE_PARAMS().

◆ m_lineStyle

LINE_STYLE STROKE_PARAMS::m_lineStyle
private

Definition at line 136 of file stroke_params.h.

Referenced by GetLineStyle(), operator!=(), SetLineStyle(), and STROKE_PARAMS().

◆ m_width

int STROKE_PARAMS::m_width
private

Definition at line 135 of file stroke_params.h.

Referenced by GetWidth(), operator!=(), SetWidth(), and STROKE_PARAMS().


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