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, FILL_T aFillMode, const COLOR4D& aFillColor );
40
41extern const char* getPinElectricalTypeToken( ELECTRICAL_PINTYPE aType );
42
43extern const char* getPinShapeToken( GRAPHIC_PINSHAPE aShape );
44
45extern EDA_ANGLE getPinAngle( PIN_ORIENTATION aOrientation );
46
47extern const char* getSheetPinShapeToken( LABEL_FLAG_SHAPE aShape );
48
50
51extern const char* getTextTypeToken( KICAD_T aType );
52
53extern void formatArc( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aArc, bool aIsPrivate,
54 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
55 bool aInvertY, const KIID& aUuid = niluuid );
56
57extern void formatCircle( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aCircle, bool aIsPrivate,
58 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
59 bool aInvertY, const KIID& aUuid = niluuid );
60
61extern void formatRect( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aRect, bool aIsPrivate,
62 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
63 bool aInvertY, const KIID& aUuid = niluuid );
64
65extern void formatBezier( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aBezier, bool aIsPrivate,
66 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
67 bool aInvertY, const KIID& aUuid = niluuid );
68
69extern void formatPoly( OUTPUTFORMATTER* aFormatter, EDA_SHAPE* aPolyLine, bool aIsPrivate,
70 const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
71 bool aInvertY, const KIID& aUuid = niluuid );
72
73#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:79
FILL_T
Definition: eda_shape.h:56
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:78
GRAPHIC_PINSHAPE
Definition: pin_type.h:57
void formatArc(OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aArc, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid)
EDA_ANGLE getPinAngle(PIN_ORIENTATION aOrientation)
const char * getSheetPinShapeToken(LABEL_FLAG_SHAPE aShape)
const char * getPinElectricalTypeToken(ELECTRICAL_PINTYPE aType)
const char * getTextTypeToken(KICAD_T aType)
void formatCircle(OUTPUTFORMATTER *aFormatter, 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, EDA_SHAPE *aPolyLine, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid)
void formatBezier(OUTPUTFORMATTER *aFormatter, 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 formatFill(OUTPUTFORMATTER *aFormatter, FILL_T aFillMode, const COLOR4D &aFillColor)
Fill token formatting helper.
const char * getPinShapeToken(GRAPHIC_PINSHAPE 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=niluuid)
LABEL_FLAG_SHAPE
Definition: sch_label.h:98
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