KiCad PCB EDA Suite
|
#include <eda_shape.h>
#include <kiid.h>
#include <sch_pin.h>
#include <sch_sheet_pin.h>
#include <sch_text.h>
Go to the source code of this file.
Functions | |
void | formatFill (OUTPUTFORMATTER *aFormatter, int aNestLevel, FILL_T aFillMode, const COLOR4D &aFillColor) |
Fill token formatting helper. | |
const char * | getPinElectricalTypeToken (ELECTRICAL_PINTYPE aType) |
const char * | getPinShapeToken (GRAPHIC_PINSHAPE aShape) |
EDA_ANGLE | getPinAngle (PIN_ORIENTATION aOrientation) |
const char * | getSheetPinShapeToken (LABEL_FLAG_SHAPE aShape) |
EDA_ANGLE | getSheetPinAngle (SHEET_SIDE aSide) |
const char * | getTextTypeToken (KICAD_T aType) |
void | formatArc (OUTPUTFORMATTER *aFormatter, int aNestLevel, EDA_SHAPE *aArc, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid) |
void | formatCircle (OUTPUTFORMATTER *aFormatter, int aNestLevel, EDA_SHAPE *aCircle, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid) |
void | formatRect (OUTPUTFORMATTER *aFormatter, int aNestLevel, EDA_SHAPE *aRect, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid) |
void | formatBezier (OUTPUTFORMATTER *aFormatter, int aNestLevel, EDA_SHAPE *aBezier, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid) |
void | formatPoly (OUTPUTFORMATTER *aFormatter, int aNestLevel, EDA_SHAPE *aPolyLine, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid) |
void formatArc | ( | OUTPUTFORMATTER * | aFormatter, |
int | aNestLevel, | ||
EDA_SHAPE * | aArc, | ||
bool | aIsPrivate, | ||
const STROKE_PARAMS & | aStroke, | ||
FILL_T | aFillMode, | ||
const COLOR4D & | aFillColor, | ||
bool | aInvertY, | ||
const KIID & | aUuid = niluuid |
||
) |
Definition at line 224 of file sch_io_kicad_sexpr_common.cpp.
References KIID::AsString(), STROKE_PARAMS::Format(), formatFill(), formatIU(), EDA_SHAPE::GetArcMid(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), niluuid, OUTPUTFORMATTER::Print(), schIUScale, and TO_UTF8.
Referenced by SCH_IO_KICAD_SEXPR::saveShape(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::saveSymbolDrawItem().
void formatBezier | ( | OUTPUTFORMATTER * | aFormatter, |
int | aNestLevel, | ||
EDA_SHAPE * | aBezier, | ||
bool | aIsPrivate, | ||
const STROKE_PARAMS & | aStroke, | ||
FILL_T | aFillMode, | ||
const COLOR4D & | aFillColor, | ||
bool | aInvertY, | ||
const KIID & | aUuid = niluuid |
||
) |
Definition at line 287 of file sch_io_kicad_sexpr_common.cpp.
References KIID::AsString(), STROKE_PARAMS::Format(), formatFill(), formatIU(), EDA_SHAPE::GetBezierC1(), EDA_SHAPE::GetBezierC2(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), niluuid, OUTPUTFORMATTER::Print(), schIUScale, and TO_UTF8.
Referenced by SCH_IO_KICAD_SEXPR::saveShape(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::saveSymbolDrawItem().
void formatCircle | ( | OUTPUTFORMATTER * | aFormatter, |
int | aNestLevel, | ||
EDA_SHAPE * | aCircle, | ||
bool | aIsPrivate, | ||
const STROKE_PARAMS & | aStroke, | ||
FILL_T | aFillMode, | ||
const COLOR4D & | aFillColor, | ||
bool | aInvertY, | ||
const KIID & | aUuid = niluuid |
||
) |
Definition at line 246 of file sch_io_kicad_sexpr_common.cpp.
References KIID::AsString(), STROKE_PARAMS::Format(), formatFill(), formatIU(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetStart(), niluuid, OUTPUTFORMATTER::Print(), schIUScale, and TO_UTF8.
Referenced by SCH_IO_KICAD_SEXPR::saveShape(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::saveSymbolDrawItem().
void formatFill | ( | OUTPUTFORMATTER * | aFormatter, |
int | aNestLevel, | ||
FILL_T | aFillMode, | ||
const COLOR4D & | aFillColor | ||
) |
Fill token formatting helper.
Definition at line 34 of file sch_io_kicad_sexpr_common.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, FILLED_SHAPE, FILLED_WITH_BG_BODYCOLOR, FILLED_WITH_COLOR, FormatDouble2Str(), KIGFX::COLOR4D::g, KiROUND(), NO_FILL, OUTPUTFORMATTER::Print(), and KIGFX::COLOR4D::r.
Referenced by formatArc(), formatBezier(), formatCircle(), formatPoly(), formatRect(), SCH_IO_KICAD_SEXPR::saveTextBox(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::saveTextBox().
void formatPoly | ( | OUTPUTFORMATTER * | aFormatter, |
int | aNestLevel, | ||
EDA_SHAPE * | aPolyLine, | ||
bool | aIsPrivate, | ||
const STROKE_PARAMS & | aStroke, | ||
FILL_T | aFillMode, | ||
const COLOR4D & | aFillColor, | ||
bool | aInvertY, | ||
const KIID & | aUuid = niluuid |
||
) |
Definition at line 315 of file sch_io_kicad_sexpr_common.cpp.
References KIID::AsString(), SHAPE_LINE_CHAIN::CPoints(), STROKE_PARAMS::Format(), formatFill(), formatIU(), ADVANCED_CFG::GetCfg(), EDA_SHAPE::GetPolyShape(), niluuid, SHAPE_POLY_SET::Outline(), OUTPUTFORMATTER::Print(), schIUScale, and TO_UTF8.
Referenced by SCH_IO_KICAD_SEXPR::saveShape(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::saveSymbolDrawItem().
void formatRect | ( | OUTPUTFORMATTER * | aFormatter, |
int | aNestLevel, | ||
EDA_SHAPE * | aRect, | ||
bool | aIsPrivate, | ||
const STROKE_PARAMS & | aStroke, | ||
FILL_T | aFillMode, | ||
const COLOR4D & | aFillColor, | ||
bool | aInvertY, | ||
const KIID & | aUuid = niluuid |
||
) |
Definition at line 267 of file sch_io_kicad_sexpr_common.cpp.
References KIID::AsString(), STROKE_PARAMS::Format(), formatFill(), formatIU(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), niluuid, OUTPUTFORMATTER::Print(), schIUScale, and TO_UTF8.
Referenced by SCH_IO_KICAD_SEXPR::saveShape(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::saveSymbolDrawItem().
EDA_ANGLE getPinAngle | ( | PIN_ORIENTATION | aOrientation | ) |
const char * getPinElectricalTypeToken | ( | ELECTRICAL_PINTYPE | aType | ) |
Definition at line 65 of file sch_io_kicad_sexpr_common.cpp.
References emptyString, PT_BIDI, PT_INPUT, PT_NC, PT_NIC, PT_OPENCOLLECTOR, PT_OPENEMITTER, PT_OUTPUT, PT_PASSIVE, PT_POWER_IN, PT_POWER_OUT, PT_TRISTATE, and PT_UNSPECIFIED.
Referenced by SCH_IO_KICAD_SEXPR_LIB_CACHE::savePin().
const char * getPinShapeToken | ( | GRAPHIC_PINSHAPE | aShape | ) |
Definition at line 113 of file sch_io_kicad_sexpr_common.cpp.
References CLOCK, CLOCK_LOW, emptyString, FALLING_EDGE_CLOCK, INPUT_LOW, INVERTED, INVERTED_CLOCK, LINE, NONLOGIC, and OUTPUT_LOW.
Referenced by SCH_IO_KICAD_SEXPR_LIB_CACHE::savePin().
EDA_ANGLE getSheetPinAngle | ( | SHEET_SIDE | aSide | ) |
const char * getSheetPinShapeToken | ( | LABEL_FLAG_SHAPE | aShape | ) |
Definition at line 165 of file sch_io_kicad_sexpr_common.cpp.
References F_DIAMOND, F_DOT, F_RECTANGLE, F_ROUND, L_BIDI, L_INPUT, L_OUTPUT, L_TRISTATE, and L_UNSPECIFIED.
Referenced by SCH_IO_KICAD_SEXPR::saveSheet(), and SCH_IO_KICAD_SEXPR::saveText().
const char * getTextTypeToken | ( | KICAD_T | aType | ) |
Definition at line 197 of file sch_io_kicad_sexpr_common.cpp.
References SCH_DIRECTIVE_LABEL_T, SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T, SCH_LABEL_T, and SCH_TEXT_T.
Referenced by SCH_IO_KICAD_SEXPR::saveText().