KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_io_kicad_sexpr_common.h
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 (C) 2022 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 along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef SCH_IO_KICAD_SEXPR_COMMON_H_
21#define SCH_IO_KICAD_SEXPR_COMMON_H_
22
23#include <eda_shape.h>
24#include <kiid.h>
25#include <sch_pin.h>
26#include <sch_sheet_pin.h>
27#include <sch_text.h>
28
29
30//class COLOR4D;
31class KIID;
32class OUTPUTFORMATTER;
33class STROKE_PARAMS;
34
35
39extern void formatFill( OUTPUTFORMATTER* aFormatter, int aNestLevel, FILL_T aFillMode,
40 const COLOR4D& aFillColor );
41
42extern const char* getPinElectricalTypeToken( ELECTRICAL_PINTYPE aType );
43
44extern const char* getPinShapeToken( GRAPHIC_PINSHAPE aShape );
45
46extern EDA_ANGLE getPinAngle( PIN_ORIENTATION aOrientation );
47
48extern const char* getSheetPinShapeToken( LABEL_FLAG_SHAPE aShape );
49
51
52extern const char* getTextTypeToken( KICAD_T aType );
53
54extern void formatArc( OUTPUTFORMATTER* aFormatter, int aNestLevel, EDA_SHAPE* aArc,
55 bool aIsPrivate, const STROKE_PARAMS& aStroke, FILL_T aFillMode,
56 const COLOR4D& aFillColor, bool aInvertY, const KIID& aUuid = niluuid );
57
58extern void formatCircle( OUTPUTFORMATTER* aFormatter, int aNestLevel, EDA_SHAPE* aCircle,
59 bool aIsPrivate, const STROKE_PARAMS& aStroke, FILL_T aFillMode,
60 const COLOR4D& aFillColor, bool aInvertY, const KIID& aUuid = niluuid );
61
62extern void formatRect( OUTPUTFORMATTER* aFormatter, int aNestLevel, EDA_SHAPE* aRect,
63 bool aIsPrivate, const STROKE_PARAMS& aStroke, FILL_T aFillMode,
64 const COLOR4D& aFillColor, bool aInvertY, const KIID& aUuid = niluuid );
65
66extern void formatBezier( OUTPUTFORMATTER* aFormatter, int aNestLevel, EDA_SHAPE* aBezier,
67 bool aIsPrivate, const STROKE_PARAMS& aStroke, FILL_T aFillMode,
68 const COLOR4D& aFillColor, bool aInvertY, const KIID& aUuid = niluuid );
69
70extern void formatPoly( OUTPUTFORMATTER* aFormatter, int aNestLevel, EDA_SHAPE* aPolyLine,
71 bool aIsPrivate, const STROKE_PARAMS& aStroke, FILL_T aFillMode,
72 const COLOR4D& aFillColor, bool aInvertY, const KIID& aUuid = niluuid );
73
74#endif // SCH_IO_KICAD_SEXPR_COMMON_H_
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Definition: kiid.h:49
An interface used to output 8 bit text in a convenient way.
Definition: richio.h:322
Simple container to manage line stroke parameters.
Definition: stroke_params.h:81
FILL_T
Definition: eda_shape.h:55
KIID niluuid(0)
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
Definition: pin_type.h:36
PIN_ORIENTATION
The symbol library pin object orientations.
Definition: pin_type.h:77
GRAPHIC_PINSHAPE
Definition: pin_type.h:57
EDA_ANGLE getPinAngle(PIN_ORIENTATION aOrientation)
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)
const char * getSheetPinShapeToken(LABEL_FLAG_SHAPE aShape)
const char * getPinElectricalTypeToken(ELECTRICAL_PINTYPE aType)
void formatFill(OUTPUTFORMATTER *aFormatter, int aNestLevel, FILL_T aFillMode, const COLOR4D &aFillColor)
Fill token formatting helper.
const char * getTextTypeToken(KICAD_T aType)
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)
EDA_ANGLE getSheetPinAngle(SHEET_SIDE aSide)
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 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)
const char * getPinShapeToken(GRAPHIC_PINSHAPE aShape)
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)
LABEL_FLAG_SHAPE
Definition: sch_label.h:93
SHEET_SIDE
Define the edge of the sheet that the sheet pin is positioned.
Definition: sch_sheet_pin.h:46
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78