KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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.

Member Function Documentation

◆ Format()

◆ GetColor()

◆ GetLineStyle()

◆ GetLineStyleToken()

wxString STROKE_PARAMS::GetLineStyleToken ( LINE_STYLE  aStyle)
static

Definition at line 237 of file stroke_params.cpp.

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()

int STROKE_PARAMS::GetWidth ( ) const
inline

Definition at line 104 of file stroke_params.h.

References m_width.

Referenced by PCB_IO_IPC2581::addShape(), BOARD_ADAPTER::addTable(), FOOTPRINT::BuildCourtyardCaches(), EXPORTER_STEP::buildGraphic3DShape(), KI_TEST::CheckFpShape(), EDA_SHAPE::Compare(), BOARD_ADAPTER::createLayers(), CONVERT_TOOL::CreatePolys(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawOneBezier(), DRAWING_TOOL::drawShape(), EDA_SHAPE::flip(), Format(), SCH_TABLE::GetBorderWidth(), PCB_TABLE::GetBorderWidth(), PCB_TEXTBOX::GetBorderWidth(), PCB_TABLE::GetEffectiveShape(), SCH_LINE::GetLineWidth(), GetMsgPanelInfo(), SCH_BUS_WIRE_ENTRY::GetPenWidth(), SCH_BUS_BUS_ENTRY::GetPenWidth(), SCH_LINE::GetPenWidth(), SCH_SHAPE::GetPenWidth(), SCH_TABLE::GetSeparatorsWidth(), PCB_TABLE::GetSeparatorsWidth(), EDA_SHAPE::GetWidth(), SCH_LINE::IsStrokeEquivalent(), EDA_SHAPE::operator==(), SCH_LINE::operator==(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_SHAPE(), SCH_IO_KICAD_SEXPR_PARSER::parseSheet(), PCB_IO_KICAD_SEXPR_PARSER::parseTextBoxContent(), SCH_TABLE::Plot(), BRDITEMS_PLOTTER::PlotTableBorders(), SCH_IO_KICAD_LEGACY::saveLine(), EDA_SHAPE::scale(), SetLibShapeFillAndColor(), SetSchShapeFillAndColor(), EDA_SHAPE::Similarity(), SCH_LINE::Similarity(), DIALOG_LINE_PROPERTIES::TransferDataToWindow(), DIALOG_TABLE_PROPERTIES::TransferDataToWindow(), DIALOG_WIRE_BUS_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().

◆ 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, and m_width.

◆ SetColor()

◆ SetLineStyle()

◆ SetWidth()

◆ Stroke()

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!=(), and SetColor().

◆ m_lineStyle

LINE_STYLE STROKE_PARAMS::m_lineStyle
private

Definition at line 136 of file stroke_params.h.

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

◆ m_width

int STROKE_PARAMS::m_width
private

Definition at line 135 of file stroke_params.h.

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


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