KiCad PCB EDA Suite
|
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 |
Simple container to manage line stroke parameters.
Definition at line 93 of file stroke_params.h.
|
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!=().
void STROKE_PARAMS::Format | ( | OUTPUTFORMATTER * | out, |
const EDA_IU_SCALE & | aIuScale ) const |
Definition at line 280 of file stroke_params.cpp.
References FormatDouble2Str(), EDA_UNIT_UTILS::FormatInternalUnits(), GetColor(), GetLineStyle(), GetLineStyleToken(), GetWidth(), KiROUND(), OUTPUTFORMATTER::Print(), TO_UTF8, and KIGFX::COLOR4D::UNSPECIFIED.
Referenced by PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::format(), formatArc(), formatBezier(), formatCircle(), formatPoly(), formatRect(), SCH_IO_KICAD_SEXPR::saveBusEntry(), SCH_IO_KICAD_SEXPR::saveLine(), SCH_IO_KICAD_SEXPR::saveSheet(), SCH_IO_KICAD_SEXPR::saveTable(), SCH_IO_KICAD_SEXPR::saveTextBox(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::saveTextBox().
|
inline |
Definition at line 110 of file stroke_params.h.
References m_color.
Referenced by KIGFX::SCH_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), fixupSchFillMode(), Format(), KIGFX::SCH_PAINTER::getRenderColor(), SCH_LINE::IsStrokeEquivalent(), SCH_LINE::operator==(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_KICAD_SEXPR_PARSER::parseSheet(), SCH_RULE_AREA::Plot(), SCH_SHAPE::Plot(), SCH_TABLE::Plot(), SCH_TEXTBOX::Plot(), SCH_IO_KICAD_LEGACY::saveLine(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_LINE::Similarity(), DIALOG_LINE_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), and DIALOG_WIRE_BUS_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 107 of file stroke_params.h.
References m_lineStyle.
Referenced by BOARD_ADAPTER::addShape(), PCB_IO_IPC2581::addShape(), KI_TEST::CheckFpShape(), EDA_SHAPE::Compare(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), Format(), SCH_LINE::GetMsgPanelInfo(), GetMsgPanelInfo(), SCH_BUS_ENTRY_BASE::GetWireStyle(), SCH_LINE::IsStrokeEquivalent(), EDA_SHAPE::operator==(), SCH_LINE::operator==(), SCH_IO_KICAD_SEXPR_PARSER::parseSchPolyLine(), SCH_RULE_AREA::Plot(), SCH_SHAPE::Plot(), SCH_TABLE::Plot(), BRDITEMS_PLOTTER::PlotShape(), BRDITEMS_PLOTTER::PlotTableBorders(), SCH_IO_KICAD_LEGACY::saveLine(), EDA_SHAPE::Similarity(), SCH_LINE::Similarity(), DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow(), and DIALOG_WIRE_BUS_PROPERTIES::TransferDataToWindow().
|
static |
Definition at line 237 of file stroke_params.cpp.
References DASH, DASHDOT, DASHDOTDOT, DEFAULT, DOT, and SOLID.
Referenced by Format(), and SCH_IO_KICAD_LEGACY::saveLine().
void STROKE_PARAMS::GetMsgPanelInfo | ( | UNITS_PROVIDER * | aUnitsProvider, |
std::vector< MSG_PANEL_ITEM > & | aList, | ||
bool | aIncludeStyle = true, | ||
bool | aIncludeWidth = true ) |
Definition at line 255 of file stroke_params.cpp.
References _, GetLineStyle(), GetWidth(), lineTypeNames, and UNITS_PROVIDER::MessageTextFromValue().
|
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(), Format(), PCB_TABLE::GetEffectiveShape(), GetMsgPanelInfo(), SCH_SHAPE::GetPenWidth(), 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(), SetLibShapeFillAndColor(), SetSchShapeFillAndColor(), EDA_SHAPE::Similarity(), SCH_LINE::Similarity(), DIALOG_LINE_PROPERTIES::TransferDataToWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow(), and DIALOG_WIRE_BUS_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 113 of file stroke_params.h.
References m_color, m_lineStyle, m_width, and STROKE_PARAMS().
|
inline |
Definition at line 111 of file stroke_params.h.
References m_color.
Referenced by SCH_EASYEDAPRO_PARSER::ApplyLineStyle(), STROKE_PARAMS_PARSER::ParseStroke(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), SetLibShapeLine(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLE_PROPERTIES::TransferDataFromWindow(), and DIALOG_TEXT_PROPERTIES::TransferDataFromWindow().
|
inline |
Definition at line 108 of file stroke_params.h.
References m_lineStyle.
Referenced by SCH_EASYEDAPRO_PARSER::ApplyLineStyle(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), SCH_IO_ALTIUM::ParsePolyline(), SCH_IO_KICAD_SEXPR_PARSER::parseSchPolyLine(), STROKE_PARAMS_PARSER::ParseStroke(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), SetLibShapeLine(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLE_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow().
|
inline |
Definition at line 105 of file stroke_params.h.
References m_width.
Referenced by SCH_EASYEDAPRO_PARSER::ApplyLineStyle(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_SHAPE(), SCH_IO_ALTIUM::ParsePolygon(), STROKE_PARAMS_PARSER::ParseStroke(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), SCH_IO_KICAD_SEXPR::saveSheet(), SetLibShapeFillAndColor(), SetLibShapeLine(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLE_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow().
|
static |
Definition at line 48 of file stroke_params.cpp.
References SEG::A, ANGLE_0, ANGLE_360, SEG::B, center, ClipLine(), EDA_ANGLE::Cos(), DASH, DASHDOT, DASHDOTDOT, DEGREES_T, DOT, end, SHAPE_ARC::GetCenter(), KIGFX::RENDER_SETTINGS::GetDashLength(), KIGFX::RENDER_SETTINGS::GetDotLength(), KIGFX::RENDER_SETTINGS::GetGapLength(), SHAPE_ARC::GetP0(), SHAPE_ARC::GetP1(), SHAPE_ARC::GetRadius(), SHAPE_SEGMENT::GetSeg(), SHAPE_LINE_CHAIN::GetSegment(), SHAPE_SIMPLE::GetSegment(), SHAPE_SIMPLE::GetSegmentCount(), KI_FALLTHROUGH, KiROUND(), lineTypeNames, M_PI, next(), BOX2< Vec >::Normalize(), EDA_ANGLE::Normalize(), SHAPE_LINE_CHAIN::SegmentCount(), SH_ARC, SH_CIRCLE, 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(), and Stroke().
|
private |
Definition at line 137 of file stroke_params.h.
Referenced by GetColor(), operator!=(), SetColor(), and STROKE_PARAMS().
|
private |
Definition at line 136 of file stroke_params.h.
Referenced by GetLineStyle(), operator!=(), SetLineStyle(), and STROKE_PARAMS().
|
private |
Definition at line 135 of file stroke_params.h.
Referenced by GetWidth(), operator!=(), SetWidth(), and STROKE_PARAMS().