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, int nestLevel) 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 78 of file stroke_params.h.
|
inline |
Definition at line 81 of file stroke_params.h.
void STROKE_PARAMS::Format | ( | OUTPUTFORMATTER * | out, |
const EDA_IU_SCALE & | aIuScale, | ||
int | nestLevel | ||
) | const |
Definition at line 279 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(), 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 95 of file stroke_params.h.
References m_color.
Referenced by KIGFX::SCH_PAINTER::draw(), Format(), SCH_TABLE::GetBorderColor(), PCB_TABLE::GetBorderColor(), SCH_BUS_ENTRY_BASE::GetBusEntryColor(), SCH_LINE::GetLineColor(), EDA_SHAPE::GetLineColor(), KIGFX::SCH_PAINTER::getRenderColor(), SCH_TABLE::GetSeparatorsColor(), PCB_TABLE::GetSeparatorsColor(), SCH_LINE::IsStrokeEquivalent(), SCH_LINE::operator==(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_KICAD_SEXPR_PARSER::parseSheet(), SCH_RULE_AREA::Plot(), SCH_SHAPE::Plot(), SCH_TEXTBOX::Plot(), SCH_SHAPE::Print(), SCH_TEXTBOX::Print(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_LINE::Similarity(), DIALOG_LINE_PROPERTIES::TransferDataToWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataToWindow(), DIALOG_TABLE_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), and DIALOG_WIRE_BUS_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 92 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(), Format(), SCH_TABLE::GetBorderStyle(), PCB_TABLE::GetBorderStyle(), SCH_LINE::GetEffectiveLineStyle(), SCH_SHAPE::GetEffectiveLineStyle(), SCH_BUS_ENTRY_BASE::GetLineStyle(), SCH_LINE::GetLineStyle(), EDA_SHAPE::GetLineStyle(), GetMsgPanelInfo(), SCH_TABLE::GetSeparatorsStyle(), PCB_TABLE::GetSeparatorsStyle(), SCH_LINE::IsStrokeEquivalent(), DIALOG_SHAPE_PROPERTIES::onFilledCheckbox(), EDA_SHAPE::operator==(), SCH_LINE::operator==(), SCH_IO_KICAD_SEXPR_PARSER::parseSchPolyLine(), SCH_RULE_AREA::Plot(), SCH_SHAPE::Plot(), SCH_TEXTBOX::Plot(), BRDITEMS_PLOTTER::PlotShape(), SCH_TEXTBOX::Print(), EDA_SHAPE::Similarity(), SCH_LINE::Similarity(), DIALOG_LINE_PROPERTIES::TransferDataToWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataToWindow(), DIALOG_TABLE_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_WIRE_BUS_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().
|
static |
Definition at line 236 of file stroke_params.cpp.
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 254 of file stroke_params.cpp.
References _, GetLineStyle(), GetWidth(), lineTypeNames, and UNITS_PROVIDER::MessageTextFromValue().
Referenced by SCH_LINE::GetMsgPanelInfo(), SCH_RULE_AREA::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), and EDA_SHAPE::ShapeGetMsgPanelInfo().
|
inline |
Definition at line 89 of file stroke_params.h.
References m_width.
Referenced by FEATURES_MANAGER::AddShape(), PCB_IO_IPC2581::addShape(), FOOTPRINT::BuildCourtyardCaches(), KI_TEST::CheckFpShape(), EDA_SHAPE::Compare(), 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(), 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().
|
inline |
Definition at line 98 of file stroke_params.h.
References m_color, m_lineStyle, and m_width.
|
inline |
Definition at line 96 of file stroke_params.h.
References m_color.
Referenced by SCH_EASYEDAPRO_PARSER::ApplyLineStyle(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::drawOneBezier(), DRAWING_TOOL::drawShape(), STROKE_PARAMS_PARSER::ParseStroke(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DRAWING_TOOL::Reset(), SCH_BUS_ENTRY_BASE::SCH_BUS_ENTRY_BASE(), SCH_LINE::SCH_LINE(), SCH_TABLE::SetBorderColor(), PCB_TABLE::SetBorderColor(), SCH_BUS_ENTRY_BASE::SetBusEntryColor(), SetLibShapeLine(), SCH_LINE::SetLineColor(), EDA_SHAPE::SetLineColor(), SCH_TABLE::SetSeparatorsColor(), PCB_TABLE::SetSeparatorsColor(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLE_PROPERTIES::TransferDataFromWindow(), and DIALOG_TEXT_PROPERTIES::TransferDataFromWindow().
|
inline |
Definition at line 93 of file stroke_params.h.
References m_lineStyle.
Referenced by SCH_EASYEDAPRO_PARSER::ApplyLineStyle(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::drawOneBezier(), DRAWING_TOOL::drawShape(), SCH_IO_ALTIUM::ParsePolyline(), SCH_IO_KICAD_SEXPR_PARSER::parseSchPolyLine(), STROKE_PARAMS_PARSER::ParseStroke(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DRAWING_TOOL::Reset(), SCH_BUS_ENTRY_BASE::SCH_BUS_ENTRY_BASE(), SCH_LINE::SCH_LINE(), SCH_TABLE::SetBorderStyle(), PCB_TABLE::SetBorderStyle(), SetLibShapeLine(), SCH_LINE::SetLineStyle(), EDA_SHAPE::SetLineStyle(), SCH_BUS_ENTRY_BASE::SetLineStyle(), SCH_TABLE::SetSeparatorsStyle(), PCB_TABLE::SetSeparatorsStyle(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_TABLE_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow().
|
inline |
Definition at line 90 of file stroke_params.h.
References m_width.
Referenced by SCH_EASYEDAPRO_PARSER::ApplyLineStyle(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawOneBezier(), DRAWING_TOOL::drawShape(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_SHAPE(), SCH_IO_ALTIUM::ParsePolygon(), STROKE_PARAMS_PARSER::ParseStroke(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DRAWING_TOOL::Reset(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), SCH_IO_KICAD_SEXPR::saveSheet(), SCH_BUS_ENTRY_BASE::SCH_BUS_ENTRY_BASE(), SCH_LINE::SCH_LINE(), PCB_TEXTBOX::SetBorderWidth(), SCH_TABLE::SetBorderWidth(), PCB_TABLE::SetBorderWidth(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_LINE::SetLineWidth(), SCH_BUS_ENTRY_BASE::SetPenWidth(), SCH_TABLE::SetSeparatorsWidth(), PCB_TABLE::SetSeparatorsWidth(), EDA_SHAPE::SetWidth(), PCB_SHAPE::StyleFromSettings(), 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, ClipLine(), EDA_ANGLE::Cos(), 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, next(), EDA_ANGLE::Normalize(), BOX2< Vec >::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(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), BRDITEMS_PLOTTER::PlotShape(), BRDITEMS_PLOTTER::PlotTableBorders(), SCH_BUS_ENTRY_BASE::Print(), SCH_LINE::Print(), SCH_SHAPE::Print(), SCH_TABLE::Print(), SCH_TEXTBOX::Print(), and Stroke().
|
private |
Definition at line 121 of file stroke_params.h.
Referenced by GetColor(), operator!=(), and SetColor().
|
private |
Definition at line 120 of file stroke_params.h.
Referenced by GetLineStyle(), operator!=(), and SetLineStyle().
|
private |
Definition at line 119 of file stroke_params.h.
Referenced by GetWidth(), operator!=(), and SetWidth().