KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_io_kicad_sexpr_common.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#include <base_units.h>
21#include <macros.h>
22#include <schematic_lexer.h>
24#include <string_utils.h>
25#include <eda_units.h>
26
27using namespace TSCHEMATIC_T;
28
29
30static const char* emptyString = "";
31
32
33void formatFill( OUTPUTFORMATTER* aFormatter, FILL_T aFillMode, const COLOR4D& aFillColor )
34{
35 const char* fillType;
36
37 switch( aFillMode )
38 {
39 default:
40 case FILL_T::NO_FILL: fillType = "none"; break;
41 case FILL_T::FILLED_SHAPE: fillType = "outline"; break;
42 case FILL_T::FILLED_WITH_BG_BODYCOLOR: fillType = "background"; break;
43 case FILL_T::FILLED_WITH_COLOR: fillType = "color"; break;
44 case FILL_T::HATCH: fillType = "hatch"; break;
45 case FILL_T::REVERSE_HATCH: fillType = "reverse_hatch"; break;
46 case FILL_T::CROSS_HATCH: fillType = "cross_hatch"; break;
47 }
48
49 if( aFillMode == FILL_T::FILLED_WITH_COLOR
50 || aFillMode == FILL_T::HATCH
51 || aFillMode == FILL_T::REVERSE_HATCH
52 || aFillMode == FILL_T::CROSS_HATCH )
53 {
54 aFormatter->Print( "(fill (type %s) (color %d %d %d %s))",
55 fillType,
56 KiROUND( aFillColor.r * 255.0 ),
57 KiROUND( aFillColor.g * 255.0 ),
58 KiROUND( aFillColor.b * 255.0 ),
59 FormatDouble2Str( aFillColor.a ).c_str() );
60 }
61 else
62 {
63 aFormatter->Print( "(fill (type %s))",
64 fillType );
65 }
66}
67
68
70{
71 switch( aType )
72 {
74 return SCHEMATIC_LEXER::TokenName( T_input );
75
77 return SCHEMATIC_LEXER::TokenName( T_output );
78
80 return SCHEMATIC_LEXER::TokenName( T_bidirectional );
81
83 return SCHEMATIC_LEXER::TokenName( T_tri_state );
84
86 return SCHEMATIC_LEXER::TokenName( T_passive );
87
89 return SCHEMATIC_LEXER::TokenName( T_free );
90
92 return SCHEMATIC_LEXER::TokenName( T_unspecified );
93
95 return SCHEMATIC_LEXER::TokenName( T_power_in );
96
98 return SCHEMATIC_LEXER::TokenName( T_power_out );
99
101 return SCHEMATIC_LEXER::TokenName( T_open_collector );
102
104 return SCHEMATIC_LEXER::TokenName( T_open_emitter );
105
107 return SCHEMATIC_LEXER::TokenName( T_no_connect );
108
109 default:
110 wxFAIL_MSG( "Missing symbol library pin connection type" );
111 }
112
113 return emptyString;
114}
115
116
118{
119 switch( aShape )
120 {
122 return SCHEMATIC_LEXER::TokenName( T_line );
123
125 return SCHEMATIC_LEXER::TokenName( T_inverted );
126
128 return SCHEMATIC_LEXER::TokenName( T_clock );
129
131 return SCHEMATIC_LEXER::TokenName( T_inverted_clock );
132
134 return SCHEMATIC_LEXER::TokenName( T_input_low );
135
137 return SCHEMATIC_LEXER::TokenName( T_clock_low );
138
140 return SCHEMATIC_LEXER::TokenName( T_output_low );
141
143 return SCHEMATIC_LEXER::TokenName( T_edge_clock_high );
144
146 return SCHEMATIC_LEXER::TokenName( T_non_logic );
147
148 default:
149 wxFAIL_MSG( "Missing symbol library pin shape type" );
150 }
151
152 return emptyString;
153}
154
155
157{
158 switch( aOrientation )
159 {
164 default: wxFAIL_MSG( "Missing symbol library pin orientation type" ); return ANGLE_0;
165 }
166}
167
168
170{
171 switch( aShape )
172 {
173 case LABEL_FLAG_SHAPE::L_INPUT: return SCHEMATIC_LEXER::TokenName( T_input );
174 case LABEL_FLAG_SHAPE::L_OUTPUT: return SCHEMATIC_LEXER::TokenName( T_output );
175 case LABEL_FLAG_SHAPE::L_BIDI: return SCHEMATIC_LEXER::TokenName( T_bidirectional );
176 case LABEL_FLAG_SHAPE::L_TRISTATE: return SCHEMATIC_LEXER::TokenName( T_tri_state );
177 case LABEL_FLAG_SHAPE::L_UNSPECIFIED: return SCHEMATIC_LEXER::TokenName( T_passive );
178 case LABEL_FLAG_SHAPE::F_DOT: return SCHEMATIC_LEXER::TokenName( T_dot );
179 case LABEL_FLAG_SHAPE::F_ROUND: return SCHEMATIC_LEXER::TokenName( T_round );
180 case LABEL_FLAG_SHAPE::F_DIAMOND: return SCHEMATIC_LEXER::TokenName( T_diamond );
181 case LABEL_FLAG_SHAPE::F_RECTANGLE: return SCHEMATIC_LEXER::TokenName( T_rectangle );
182 default: wxFAIL; return SCHEMATIC_LEXER::TokenName( T_passive );
183 }
184}
185
186
188{
189 switch( aSide )
190 {
192 case SHEET_SIDE::LEFT: return ANGLE_180;
193 case SHEET_SIDE::RIGHT: return ANGLE_0;
194 case SHEET_SIDE::TOP: return ANGLE_90;
195 case SHEET_SIDE::BOTTOM: return ANGLE_270;
196 default: wxFAIL; return ANGLE_0;
197 }
198}
199
200
201const char* getTextTypeToken( KICAD_T aType )
202{
203 switch( aType )
204 {
205 case SCH_TEXT_T: return SCHEMATIC_LEXER::TokenName( T_text );
206 case SCH_LABEL_T: return SCHEMATIC_LEXER::TokenName( T_label );
207 case SCH_GLOBAL_LABEL_T: return SCHEMATIC_LEXER::TokenName( T_global_label );
208 case SCH_HIER_LABEL_T: return SCHEMATIC_LEXER::TokenName( T_hierarchical_label );
209 case SCH_DIRECTIVE_LABEL_T: return SCHEMATIC_LEXER::TokenName( T_netclass_flag );
210 default: wxFAIL; return SCHEMATIC_LEXER::TokenName( T_text );
211 }
212}
213
214
215std::string formatIU( const int& aValue )
216{
218}
219
220
221std::string formatIU( const VECTOR2I& aPt, bool aInvertY )
222{
223 VECTOR2I pt( aPt.x, aInvertY ? -aPt.y : aPt.y );
225}
226
227
228void formatArc( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aArc, bool aIsPrivate,
229 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
230 bool aInvertY, const KIID& aUuid, bool aLocked )
231{
232 aFormatter->Print( "(arc %s (start %s) (mid %s) (end %s)",
233 aIsPrivate ? "private" : "",
234 formatIU( aArc->GetStart(), aInvertY ).c_str(),
235 formatIU( aArc->GetArcMid(), aInvertY ).c_str(),
236 formatIU( aArc->GetEnd(), aInvertY ).c_str() );
237
238 aStroke.Format( aFormatter, schIUScale );
239 aArc->GetStartEnding().Format( aFormatter, schIUScale, "start_shape" );
240 aArc->GetEndEnding().Format( aFormatter, schIUScale, "end_shape" );
241 formatFill( aFormatter, aFillMode, aFillColor );
242
243 if( aUuid != niluuid )
244 aFormatter->Print( "(uuid %s)", aFormatter->Quotew( aUuid.AsString() ).c_str() );
245
246 if( aLocked )
247 KICAD_FORMAT::FormatBool( aFormatter, "locked", true );
248
249 aFormatter->Print( ")" );
250}
251
252
253void formatCircle( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aCircle, bool aIsPrivate,
254 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
255 bool aInvertY, const KIID& aUuid, bool aLocked )
256{
257 aFormatter->Print( "(circle %s (center %s) (radius %s)",
258 aIsPrivate ? "private" : "",
259 formatIU( aCircle->GetStart(), aInvertY ).c_str(),
260 formatIU( aCircle->GetRadius() ).c_str() );
261
262 aStroke.Format( aFormatter, schIUScale );
263 formatFill( aFormatter, aFillMode, aFillColor );
264
265 if( aUuid != niluuid )
266 aFormatter->Print( "(uuid %s)", aFormatter->Quotew( aUuid.AsString() ).c_str() );
267
268 if( aLocked )
269 KICAD_FORMAT::FormatBool( aFormatter, "locked", true );
270
271 aFormatter->Print( ")" );
272}
273
274
275void formatRect( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aRect, bool aIsPrivate,
276 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
277 bool aInvertY, const KIID& aUuid, bool aLocked )
278{
279 aFormatter->Print( "(rectangle %s (start %s) (end %s)",
280 aIsPrivate ? "private" : "",
281 formatIU( aRect->GetStart(), aInvertY ).c_str(),
282 formatIU( aRect->GetEnd(), aInvertY ).c_str() );
283 if( aRect->GetCornerRadius() > 0 )
284 aFormatter->Print( "(radius %s)",
285 formatIU( aRect->GetCornerRadius() ).c_str() );
286 aStroke.Format( aFormatter, schIUScale );
287 formatFill( aFormatter, aFillMode, aFillColor );
288
289 if( aUuid != niluuid )
290 aFormatter->Print( "(uuid %s)", aFormatter->Quotew( aUuid.AsString() ).c_str() );
291
292 if( aLocked )
293 KICAD_FORMAT::FormatBool( aFormatter, "locked", true );
294
295 aFormatter->Print( ")" );
296}
297
298
299void formatBezier( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aBezier, bool aIsPrivate,
300 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
301 bool aInvertY, const KIID& aUuid, bool aLocked )
302{
303 aFormatter->Print( "(bezier %s (pts ",
304 aIsPrivate ? "private" : "" );
305
306 for( const VECTOR2I& pt : { aBezier->GetStart(), aBezier->GetBezierC1(),
307 aBezier->GetBezierC2(), aBezier->GetEnd() } )
308 {
309 aFormatter->Print( "(xy %s)", formatIU( pt, aInvertY ).c_str() );
310 }
311
312 aFormatter->Print( ")" ); // Closes pts token
313
314 aStroke.Format( aFormatter, schIUScale );
315 aBezier->GetStartEnding().Format( aFormatter, schIUScale, "start_shape" );
316 aBezier->GetEndEnding().Format( aFormatter, schIUScale, "end_shape" );
317 formatFill( aFormatter, aFillMode, aFillColor );
318
319 if( aUuid != niluuid )
320 aFormatter->Print( "(uuid %s)", aFormatter->Quotew( aUuid.AsString() ).c_str() );
321
322 if( aLocked )
323 KICAD_FORMAT::FormatBool( aFormatter, "locked", true );
324
325 aFormatter->Print( ")" );
326}
327
328
329void formatPoly( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aPolyLine, bool aIsPrivate,
330 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
331 bool aInvertY, const KIID& aUuid, bool aLocked )
332{
333 aFormatter->Print( "(polyline %s (pts ",
334 aIsPrivate ? "private" : "" );
335
336 const SHAPE_POLY_SET& aPolySet = aPolyLine->GetPolyShape();
337
338 if( aPolySet.OutlineCount() == 0 )
339 {
340 // If we've managed to get a polyline with no points, that's probably a bad thing,
341 // but at least don't dereference it and crash.
342 wxFAIL_MSG( "Polyline has no outlines" );
343 }
344 else
345 {
346 for( const VECTOR2I& pt : aPolyLine->GetPolyShape().Outline( 0 ).CPoints() )
347 aFormatter->Print( "(xy %s)", formatIU( pt, aInvertY ).c_str() );
348 }
349
350 aFormatter->Print( ")" ); // Closes pts token
351
352 aStroke.Format( aFormatter, schIUScale );
353 aPolyLine->GetStartEnding().Format( aFormatter, schIUScale, "start_shape" );
354 aPolyLine->GetEndEnding().Format( aFormatter, schIUScale, "end_shape" );
355 formatFill( aFormatter, aFillMode, aFillColor );
356
357 if( aUuid != niluuid )
358 aFormatter->Print( "(uuid %s)", aFormatter->Quotew( aUuid.AsString() ).c_str() );
359
360 if( aLocked )
361 KICAD_FORMAT::FormatBool( aFormatter, "locked", true );
362
363 aFormatter->Print( ")" );
364}
365
366
367void formatEllipse( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aEllipse, bool aIsPrivate, const STROKE_PARAMS& aStroke,
368 FILL_T aFillMode, const COLOR4D& aFillColor, bool aInvertY, const KIID& aUuid, bool aLocked )
369{
370 aFormatter->Print( "(ellipse %s (center %s) (major_radius %s) (minor_radius %s) "
371 "(rotation_angle %s)",
372 aIsPrivate ? "private" : "", formatIU( aEllipse->GetEllipseCenter(), aInvertY ).c_str(),
373 formatIU( aEllipse->GetEllipseMajorRadius() ).c_str(),
374 formatIU( aEllipse->GetEllipseMinorRadius() ).c_str(),
375 EDA_UNIT_UTILS::FormatAngle( aEllipse->GetEllipseRotation() ).c_str() );
376
377 aStroke.Format( aFormatter, schIUScale );
378 formatFill( aFormatter, aFillMode, aFillColor );
379
380 if( aUuid != niluuid )
381 aFormatter->Print( "(uuid %s)", aFormatter->Quotew( aUuid.AsString() ).c_str() );
382
383 if( aLocked )
384 KICAD_FORMAT::FormatBool( aFormatter, "locked", true );
385
386 aFormatter->Print( ")" );
387}
388
389
390void formatEllipseArc( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aEllipseArc, bool aIsPrivate,
391 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor, bool aInvertY,
392 const KIID& aUuid, bool aLocked )
393{
394 aFormatter->Print( "(ellipse_arc %s (center %s) (major_radius %s) (minor_radius %s) "
395 "(rotation_angle %s) (start_angle %s) (end_angle %s)",
396 aIsPrivate ? "private" : "", formatIU( aEllipseArc->GetEllipseCenter(), aInvertY ).c_str(),
397 formatIU( aEllipseArc->GetEllipseMajorRadius() ).c_str(),
398 formatIU( aEllipseArc->GetEllipseMinorRadius() ).c_str(),
399 EDA_UNIT_UTILS::FormatAngle( aEllipseArc->GetEllipseRotation() ).c_str(),
400 EDA_UNIT_UTILS::FormatAngle( aEllipseArc->GetEllipseStartAngle() ).c_str(),
401 EDA_UNIT_UTILS::FormatAngle( aEllipseArc->GetEllipseEndAngle() ).c_str() );
402
403 aStroke.Format( aFormatter, schIUScale );
404 formatFill( aFormatter, aFillMode, aFillColor );
405
406 if( aUuid != niluuid )
407 aFormatter->Print( "(uuid %s)", aFormatter->Quotew( aUuid.AsString() ).c_str() );
408
409 if( aLocked )
410 KICAD_FORMAT::FormatBool( aFormatter, "locked", true );
411
412 aFormatter->Print( ")" );
413}
constexpr EDA_IU_SCALE schIUScale
Definition base_units.h:123
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
Definition box2.h:995
int GetEllipseMinorRadius() const
Definition eda_shape.h:395
const VECTOR2I & GetBezierC2() const
Definition eda_shape.h:368
const VECTOR2I & GetEllipseCenter() const
Definition eda_shape.h:377
EDA_ANGLE GetEllipseEndAngle() const
Definition eda_shape.h:423
int GetEllipseMajorRadius() const
Definition eda_shape.h:386
SHAPE_POLY_SET & GetPolyShape()
EDA_ANGLE GetEllipseRotation() const
Definition eda_shape.h:404
int GetRadius() const
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
Definition eda_shape.h:325
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
Definition eda_shape.h:275
EDA_ANGLE GetEllipseStartAngle() const
Definition eda_shape.h:414
const LINE_ENDING & GetStartEnding() const
Definition eda_shape.h:177
const VECTOR2I & GetBezierC1() const
Definition eda_shape.h:365
const LINE_ENDING & GetEndEnding() const
Definition eda_shape.h:180
int GetCornerRadius() const
VECTOR2I GetArcMid() const
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
double r
Red component.
Definition color4d.h:390
double g
Green component.
Definition color4d.h:391
double a
Alpha component.
Definition color4d.h:393
double b
Blue component.
Definition color4d.h:392
Definition kiid.h:46
wxString AsString() const
Definition kiid.cpp:264
void Format(OUTPUTFORMATTER *aOut, const EDA_IU_SCALE &aIuScale, const char *aToken) const
An interface used to output 8 bit text in a convenient way.
Definition richio.h:294
std::string Quotew(const wxString &aWrapee) const
Definition richio.cpp:505
int PRINTF_FUNC_N Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition richio.cpp:432
const std::vector< VECTOR2I > & CPoints() const
Represent a set of closed polygons.
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
int OutlineCount() const
Return the number of outlines in the set.
Simple container to manage line stroke parameters.
void Format(OUTPUTFORMATTER *out, const EDA_IU_SCALE &aIuScale) const
static constexpr EDA_ANGLE ANGLE_0
Definition eda_angle.h:422
static constexpr EDA_ANGLE ANGLE_90
Definition eda_angle.h:424
static constexpr EDA_ANGLE ANGLE_270
Definition eda_angle.h:427
static constexpr EDA_ANGLE ANGLE_180
Definition eda_angle.h:426
FILL_T
Definition eda_fill.h:29
@ FILLED_WITH_COLOR
Definition eda_fill.h:33
@ NO_FILL
Definition eda_fill.h:30
@ REVERSE_HATCH
Definition eda_fill.h:35
@ HATCH
Definition eda_fill.h:34
@ FILLED_WITH_BG_BODYCOLOR
Definition eda_fill.h:32
@ FILLED_SHAPE
Fill with object color.
Definition eda_fill.h:31
@ CROSS_HATCH
Definition eda_fill.h:36
KIID niluuid(0)
This file contains miscellaneous commonly used macros and functions.
KICOMMON_API std::string FormatAngle(const EDA_ANGLE &aAngle)
Convert aAngle from board units to a string appropriate for writing to file.
KICOMMON_API std::string FormatInternalUnits(const EDA_IU_SCALE &aIuScale, int aValue, EDA_DATA_TYPE aDataType=EDA_DATA_TYPE::DISTANCE)
Converts aValue from internal units to a string appropriate for writing to file.
void FormatBool(OUTPUTFORMATTER *aOut, const wxString &aKey, bool aValue)
Writes a boolean to the formatter, in the style (aKey [yes|no])
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
Definition pin_type.h:32
@ PT_INPUT
usual pin input: must be connected
Definition pin_type.h:33
@ PT_NC
not connected (must be left open)
Definition pin_type.h:46
@ PT_OUTPUT
usual output
Definition pin_type.h:34
@ PT_TRISTATE
tri state bus pin
Definition pin_type.h:36
@ PT_NIC
not internally connected (may be connected to anything)
Definition pin_type.h:40
@ PT_BIDI
input or output (like port for a microprocessor)
Definition pin_type.h:35
@ PT_OPENEMITTER
pin type open emitter
Definition pin_type.h:45
@ PT_POWER_OUT
output of a regulator: intended to be connected to power input pins
Definition pin_type.h:43
@ PT_OPENCOLLECTOR
pin type open collector
Definition pin_type.h:44
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
Definition pin_type.h:42
@ PT_UNSPECIFIED
unknown electrical properties: creates always a warning when connected
Definition pin_type.h:41
@ PT_PASSIVE
pin for passive symbols: must be connected, and can be connected to any pin.
Definition pin_type.h:39
PIN_ORIENTATION
The symbol library pin object orientations.
Definition pin_type.h:101
@ PIN_UP
The pin extends upwards from the connection point: Probably on the bottom side of the symbol.
Definition pin_type.h:123
@ PIN_RIGHT
The pin extends rightwards from the connection point.
Definition pin_type.h:107
@ PIN_LEFT
The pin extends leftwards from the connection point: Probably on the right side of the symbol.
Definition pin_type.h:114
@ PIN_DOWN
The pin extends downwards from the connection: Probably on the top side of the symbol.
Definition pin_type.h:131
GRAPHIC_PINSHAPE
Definition pin_type.h:80
EDA_ANGLE getPinAngle(PIN_ORIENTATION aOrientation)
void formatArc(OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aArc, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid, bool aLocked)
void formatEllipseArc(OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aEllipseArc, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid, bool aLocked)
void formatCircle(OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aCircle, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid, bool aLocked)
const char * getSheetPinShapeToken(LABEL_FLAG_SHAPE aShape)
void formatRect(OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aRect, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid, bool aLocked)
const char * getPinElectricalTypeToken(ELECTRICAL_PINTYPE aType)
const char * getTextTypeToken(KICAD_T aType)
void formatBezier(OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aBezier, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid, bool aLocked)
void formatEllipse(OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aEllipse, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid, bool aLocked)
std::string formatIU(const int &aValue)
void formatPoly(OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aPolyLine, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid, bool aLocked)
EDA_ANGLE getSheetPinAngle(SHEET_SIDE aSide)
void formatFill(OUTPUTFORMATTER *aFormatter, FILL_T aFillMode, const COLOR4D &aFillColor)
Fill token formatting helper.
const char * getPinShapeToken(GRAPHIC_PINSHAPE aShape)
static const char * emptyString
LABEL_FLAG_SHAPE
Definition sch_label.h:97
@ L_BIDI
Definition sch_label.h:100
@ L_TRISTATE
Definition sch_label.h:101
@ L_UNSPECIFIED
Definition sch_label.h:102
@ F_DOT
Definition sch_label.h:105
@ F_ROUND
Definition sch_label.h:106
@ L_OUTPUT
Definition sch_label.h:99
@ F_DIAMOND
Definition sch_label.h:107
@ L_INPUT
Definition sch_label.h:98
@ F_RECTANGLE
Definition sch_label.h:108
SHEET_SIDE
Define the edge of the sheet that the sheet pin is positioned.
std::string FormatDouble2Str(double aValue)
Print a float number without using scientific notation and no trailing 0 This function is intended in...
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:70
@ SCH_DIRECTIVE_LABEL_T
Definition typeinfo.h:167
@ SCH_LABEL_T
Definition typeinfo.h:163
@ SCH_HIER_LABEL_T
Definition typeinfo.h:165
@ SCH_TEXT_T
Definition typeinfo.h:147
@ SCH_GLOBAL_LABEL_T
Definition typeinfo.h:164
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683