KiCad PCB EDA Suite
Loading...
Searching...
No Matches
graphics_importer_sch.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) 2016 CERN
5 * Copyright (C) 2018-2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * @author Maciej Suminski <[email protected]>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, you may find one here:
21 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22 * or you may search the http://www.gnu.org website for the version 2 license,
23 * or you may write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25 */
26
27#ifndef GRAPHICS_IMPORTER_SCH_H_
28#define GRAPHICS_IMPORTER_SCH_H_
29
31
32class SCH_SCREEN;
33
34
36{
37public:
39
40 void AddLine( const VECTOR2D& aStart, const VECTOR2D& aEnd,
41 const IMPORTED_STROKE& aStroke ) override;
42
43 void AddCircle( const VECTOR2D& aCenter, double aRadius, const IMPORTED_STROKE& aStroke,
44 bool aFilled, const COLOR4D& aFillColor = COLOR4D::UNSPECIFIED ) override;
45
46 void AddArc( const VECTOR2D& aCenter, const VECTOR2D& aStart, const EDA_ANGLE& aAngle,
47 const IMPORTED_STROKE& aStroke ) override;
48
49 void AddPolygon( const std::vector<VECTOR2D>& aVertices, const IMPORTED_STROKE& aStroke,
50 bool aFilled, const COLOR4D& aFillColor = COLOR4D::UNSPECIFIED ) override;
51
52 void AddText( const VECTOR2D& aOrigin, const wxString& aText, double aHeight, double aWidth,
53 double aThickness, double aOrientation, GR_TEXT_H_ALIGN_T aHJustify,
54 GR_TEXT_V_ALIGN_T aVJustify,
55 const COLOR4D& aColor = COLOR4D::UNSPECIFIED ) override;
56
57 void AddSpline( const VECTOR2D& aStart, const VECTOR2D& aBezierControl1,
58 const VECTOR2D& aBezierControl2, const VECTOR2D& aEnd,
59 const IMPORTED_STROKE& aStroke ) override;
60
67 VECTOR2I MapCoordinate( const VECTOR2D& aCoordinate );
68
75 int MapLineWidth( double aLineWidth );
76
78};
79
80#endif /* GRAPHICS_IMPORTER_SCH_H_ */
void AddText(const VECTOR2D &aOrigin, const wxString &aText, double aHeight, double aWidth, double aThickness, double aOrientation, GR_TEXT_H_ALIGN_T aHJustify, GR_TEXT_V_ALIGN_T aVJustify, const COLOR4D &aColor=COLOR4D::UNSPECIFIED) override
Create an object representing a text.
void AddArc(const VECTOR2D &aCenter, const VECTOR2D &aStart, const EDA_ANGLE &aAngle, const IMPORTED_STROKE &aStroke) override
Create an object representing an arc.
int MapLineWidth(double aLineWidth)
If aLineWidth < 0, the default line thickness value is returned.
VECTOR2I MapCoordinate(const VECTOR2D &aCoordinate)
Convert an imported coordinate to a board coordinate, according to the internal units,...
STROKE_PARAMS MapStrokeParams(const IMPORTED_STROKE &aStroke)
void AddCircle(const VECTOR2D &aCenter, double aRadius, const IMPORTED_STROKE &aStroke, bool aFilled, const COLOR4D &aFillColor=COLOR4D::UNSPECIFIED) override
Create an object representing a circle.
void AddPolygon(const std::vector< VECTOR2D > &aVertices, const IMPORTED_STROKE &aStroke, bool aFilled, const COLOR4D &aFillColor=COLOR4D::UNSPECIFIED) override
Create an object representing a polygon.
void AddLine(const VECTOR2D &aStart, const VECTOR2D &aEnd, const IMPORTED_STROKE &aStroke) override
Create an object representing a line segment.
void AddSpline(const VECTOR2D &aStart, const VECTOR2D &aBezierControl1, const VECTOR2D &aBezierControl2, const VECTOR2D &aEnd, const IMPORTED_STROKE &aStroke) override
Create an object representing an arc.
Interface that creates objects representing shapes for a given data model.
A clone of IMPORTED_STROKE, but with floating-point width.
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Simple container to manage line stroke parameters.
Definition: stroke_params.h:81
GR_TEXT_H_ALIGN_T
GR_TEXT_V_ALIGN_T