KiCad PCB EDA Suite
pcb_text.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 (C) 2012 Jean-Pierre Charras, [email protected]
5 * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
6 * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#include <pcb_edit_frame.h>
27#include <base_units.h>
28#include <bitmaps.h>
29#include <board.h>
31#include <core/mirror.h>
32#include <footprint.h>
33#include <pcb_text.h>
34#include <pcb_painter.h>
35#include <trigo.h>
36#include <string_utils.h>
38#include <callback_gal.h>
40
41
43 BOARD_ITEM( parent, idtype ),
45{
46 SetMultilineAllowed( true );
47}
48
49
51{
52}
53
54
55wxString PCB_TEXT::GetShownText( int aDepth, bool aAllowExtraText ) const
56{
57 BOARD* board = dynamic_cast<BOARD*>( GetParent() );
58
59 std::function<bool( wxString* )> pcbTextResolver =
60 [&]( wxString* token ) -> bool
61 {
62 if( token->IsSameAs( wxT( "LAYER" ) ) )
63 {
64 *token = GetLayerName();
65 return true;
66 }
67
68 if( board->ResolveTextVar( token, aDepth + 1 ) )
69 {
70 return true;
71 }
72
73 return false;
74 };
75
76 wxString text = EDA_TEXT::GetShownText();
77
78 if( board && HasTextVars() && aDepth < 10 )
79 text = ExpandTextVars( text, &pcbTextResolver );
80
81 return text;
82}
83
84
85double PCB_TEXT::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
86{
87 constexpr double HIDE = std::numeric_limits<double>::max();
88
89 KIGFX::PCB_PAINTER* painter = static_cast<KIGFX::PCB_PAINTER*>( aView->GetPainter() );
90 KIGFX::PCB_RENDER_SETTINGS* renderSettings = painter->GetSettings();
91
92 if( aLayer == LAYER_LOCKED_ITEM_SHADOW )
93 {
94 // Hide shadow if the main layer is not shown
95 if( !aView->IsLayerVisible( m_layer ) )
96 return HIDE;
97
98 // Hide shadow on dimmed tracks
99 if( renderSettings->GetHighContrast() )
100 {
101 if( m_layer != renderSettings->GetPrimaryHighContrastLayer() )
102 return HIDE;
103 }
104 }
105
106 return 0.0;
107}
108
109
110void PCB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
111{
112 // Don't use GetShownText() here; we want to show the user the variable references
113 aList.emplace_back( _( "PCB Text" ), KIUI::EllipsizeStatusText( aFrame, GetText() ) );
114
115 if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
116 aList.emplace_back( _( "Status" ), _( "Locked" ) );
117
118 aList.emplace_back( _( "Layer" ), GetLayerName() );
119
120 aList.emplace_back( _( "Mirror" ), IsMirrored() ? _( "Yes" ) : _( "No" ) );
121
122 aList.emplace_back( _( "Angle" ), wxString::Format( wxT( "%g" ), GetTextAngle().AsDegrees() ) );
123
124 aList.emplace_back( _( "Font" ), GetFont() ? GetFont()->GetName() : _( "Default" ) );
125 aList.emplace_back( _( "Thickness" ), aFrame->MessageTextFromValue( GetTextThickness() ) );
126 aList.emplace_back( _( "Width" ), aFrame->MessageTextFromValue( GetTextWidth() ) );
127 aList.emplace_back( _( "Height" ), aFrame->MessageTextFromValue( GetTextHeight() ) );
128}
129
130
132{
133 VECTOR2I textSize( GetTextWidth(), GetTextHeight() );
134 int thickness = GetTextThickness();
135
136 return thickness * 1.5 + GetKnockoutTextMargin( textSize, thickness );
137}
138
139
141{
142 BOX2I rect = GetTextBox();
143
144 if( IsKnockout() )
145 rect.Inflate( getKnockoutMargin() );
146
147 if( !GetTextAngle().IsZero() )
149
150 return rect;
151}
152
153
154bool PCB_TEXT::TextHitTest( const VECTOR2I& aPoint, int aAccuracy ) const
155{
156 if( IsKnockout() )
157 {
158 SHAPE_POLY_SET poly;
159
161
162 return poly.Collide( aPoint, aAccuracy );
163 }
164 else
165 {
166 return EDA_TEXT::TextHitTest( aPoint, aAccuracy );
167 }
168}
169
170
171bool PCB_TEXT::TextHitTest( const BOX2I& aRect, bool aContains, int aAccuracy ) const
172{
173 BOX2I rect = aRect;
174
175 rect.Inflate( aAccuracy );
176
177 if( aContains )
178 return rect.Contains( GetBoundingBox() );
179
180 return rect.Intersects( GetBoundingBox() );
181}
182
183
184void PCB_TEXT::Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle )
185{
186 VECTOR2I pt = GetTextPos();
187 RotatePoint( pt, aRotCentre, aAngle );
188 SetTextPos( pt );
189
190 EDA_ANGLE new_angle = GetTextAngle() + aAngle;
191 new_angle.Normalize180();
192 SetTextAngle( new_angle );
193}
194
195
196void PCB_TEXT::Mirror( const VECTOR2I& aCentre, bool aMirrorAroundXAxis )
197{
198 // the position and justification are mirrored, but not the text itself
199
200 if( aMirrorAroundXAxis )
201 {
204
205 SetTextY( MIRRORVAL( GetTextPos().y, aCentre.y ) );
206 }
207 else
208 {
211
212 SetTextX( MIRRORVAL( GetTextPos().x, aCentre.x ) );
213 }
214}
215
216
217void PCB_TEXT::Flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
218{
219 if( aFlipLeftRight )
220 {
221 SetTextX( MIRRORVAL( GetTextPos().x, aCentre.x ) );
223 }
224 else
225 {
226 SetTextY( MIRRORVAL( GetTextPos().y, aCentre.y ) );
228 }
229
230 SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
231
232 if( ( GetLayerSet() & LSET::SideSpecificMask() ).any() )
234}
235
236
237wxString PCB_TEXT::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
238{
239 return wxString::Format( _( "PCB Text '%s' on %s"),
241 GetLayerName() );
242}
243
244
246{
247 return BITMAPS::text;
248}
249
250
252{
253 return new PCB_TEXT( *this );
254}
255
256
258{
259 assert( aImage->Type() == PCB_TEXT_T );
260
261 std::swap( *((PCB_TEXT*) this), *((PCB_TEXT*) aImage) );
262}
263
264
265std::shared_ptr<SHAPE> PCB_TEXT::GetEffectiveShape( PCB_LAYER_ID aLayer, FLASHING aFlash ) const
266{
267 if( IsKnockout() )
268 {
269 SHAPE_POLY_SET knockouts;
270
271 TransformTextToPolySet( knockouts, aLayer, 0, GetBoard()->GetDesignSettings().m_MaxError,
272 ERROR_INSIDE );
273
274 SHAPE_POLY_SET finalPoly;
275 int strokeWidth = GetEffectiveTextPenWidth();
276 VECTOR2I fontSize = GetTextSize();
277 int margin = strokeWidth * 1.5 + GetKnockoutTextMargin( fontSize, strokeWidth );
278
279 TransformBoundingBoxToPolygon( &finalPoly, margin );
280 finalPoly.BooleanSubtract( knockouts, SHAPE_POLY_SET::PM_FAST );
282
283 return std::make_shared<SHAPE_POLY_SET>( finalPoly );
284 }
285
286 return GetEffectiveTextShape();
287}
288
289
291 int aClearance, int aError, ERROR_LOC aErrorLoc ) const
292{
294 KIFONT::FONT* font = getDrawFont();
295 int penWidth = GetEffectiveTextPenWidth();
296
297 // The polygonal shape of a text can have many basic shapes, so combining these shapes can
298 // be very useful to create a final shape with a lot less vertices to speedup calculations.
299 // Simplify shapes is not usually always efficient, but in this case it is.
300 SHAPE_POLY_SET buffer;
301
302 CALLBACK_GAL callback_gal( empty_opts,
303 // Stroke callback
304 [&]( const VECTOR2I& aPt1, const VECTOR2I& aPt2 )
305 {
306 TransformOvalToPolygon( aBuffer, aPt1, aPt2, penWidth + ( 2 * aClearance ),
307 aError, ERROR_INSIDE );
308 },
309 // Triangulation callback
310 [&]( const VECTOR2I& aPt1, const VECTOR2I& aPt2, const VECTOR2I& aPt3 )
311 {
312 buffer.NewOutline();
313
314 for( const VECTOR2I& point : { aPt1, aPt2, aPt3 } )
315 buffer.Append( point.x, point.y );
316 } );
317
318 font->Draw( &callback_gal, GetShownText(), GetTextPos(), GetAttributes() );
319
321 aBuffer.Append( buffer );
322}
323
324
326 int aClearance, int aError, ERROR_LOC aErrorLoc,
327 bool aIgnoreLineWidth ) const
328{
329 EDA_TEXT::TransformBoundingBoxToPolygon( &aBuffer, aClearance );
330}
331
332
333static struct PCB_TEXT_DESC
334{
336 {
343
344 propMgr.AddProperty( new PROPERTY<PCB_TEXT, bool, BOARD_ITEM>( _HKI( "Knockout" ),
346 _HKI( "Text Properties" ) );
347
348 auto isFootprintText =
349 []( INSPECTABLE* aItem ) -> bool
350 {
351 if( PCB_TEXT* text = dynamic_cast<PCB_TEXT*>( aItem ) )
352 return text->GetParentFootprint();
353
354 return false;
355 };
356
358 _HKI( "Visible" ), isFootprintText );
359
361 _HKI( "Hyperlink" ),
362 []( INSPECTABLE* aItem ) { return false; } );
363 }
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:109
BITMAPS
A list of all bitmap identifiers.
Definition: bitmaps_list.h:33
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:70
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition: board_item.h:192
PCB_LAYER_ID m_layer
Definition: board_item.h:341
virtual bool IsKnockout() const
Definition: board_item.h:262
virtual void SetIsKnockout(bool aKnockout)
Definition: board_item.h:263
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition: board_item.h:226
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
Definition: board_item.cpp:43
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
Definition: board_item.h:197
virtual bool IsLocked() const
Definition: board_item.cpp:71
BOARD_ITEM_CONTAINER * GetParent() const
Definition: board_item.h:175
wxString GetLayerName() const
Return the name of the PCB layer on which the item resides.
Definition: board_item.cpp:94
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:269
bool ResolveTextVar(wxString *token, int aDepth) const
Definition: board.cpp:350
bool Intersects(const BOX2< Vec > &aRect) const
Definition: box2.h:269
bool Contains(const Vec &aPoint) const
Definition: box2.h:141
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
Definition: box2.h:506
const BOX2< Vec > GetBoundingBoxRotated(const VECTOR2I &aRotCenter, const EDA_ANGLE &aAngle) const
Useful to calculate bounding box of rotated items, when rotation is not cardinal.
Definition: box2.h:650
EDA_ANGLE Normalize180()
Definition: eda_angle.h:288
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:85
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition: eda_text.h:72
void TransformBoundingBoxToPolygon(SHAPE_POLY_SET *aBuffer, int aClearance) const
Convert the text bounding box to a rectangular polygon depending on the text orientation,...
Definition: eda_text.cpp:947
int GetTextHeight() const
Definition: eda_text.h:202
BOX2I GetTextBox(int aLine=-1, bool aInvertY=false) const
Useful in multiline texts to calculate the full text or a line area (for zones filling,...
Definition: eda_text.cpp:505
const VECTOR2I & GetTextPos() const
Definition: eda_text.h:208
const EDA_ANGLE & GetTextAngle() const
Definition: eda_text.h:120
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:87
void SetTextPos(const VECTOR2I &aPoint)
Definition: eda_text.cpp:373
void SetTextX(int aX)
Definition: eda_text.cpp:379
KIFONT::FONT * GetFont() const
Definition: eda_text.h:188
void SetMirrored(bool isMirrored)
Definition: eda_text.cpp:226
void SetTextY(int aY)
Definition: eda_text.cpp:385
int GetTextWidth() const
Definition: eda_text.h:199
GR_TEXT_H_ALIGN_T GetHorizJustify() const
Definition: eda_text.h:149
bool HasTextVars() const
Indicates the ShownText has text var references which need to be processed.
Definition: eda_text.h:103
virtual KIFONT::FONT * getDrawFont() const
Definition: eda_text.cpp:428
virtual bool TextHitTest(const VECTOR2I &aPoint, int aAccuracy=0) const
Test if aPoint is within the bounds of this object.
Definition: eda_text.cpp:625
const TEXT_ATTRIBUTES & GetAttributes() const
Definition: eda_text.h:172
bool IsMirrored() const
Definition: eda_text.h:139
int GetEffectiveTextPenWidth(int aDefaultPenWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth.
Definition: eda_text.cpp:299
std::shared_ptr< SHAPE_COMPOUND > GetEffectiveTextShape(bool aTriangulate=true, bool aUseTextRotation=true) const
build a list of segments (SHAPE_SEGMENT) to describe a text shape.
Definition: eda_text.cpp:855
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
Definition: eda_text.cpp:195
int GetTextThickness() const
Definition: eda_text.h:112
virtual wxString GetShownText(int aDepth=0, bool aAllowExtraText=true) const
Return the string actually shown after processing of the base text.
Definition: eda_text.h:98
void SetMultilineAllowed(bool aAllow)
Definition: eda_text.cpp:234
VECTOR2I GetTextSize() const
Definition: eda_text.h:196
void SetHorizJustify(GR_TEXT_H_ALIGN_T aType)
Definition: eda_text.cpp:242
Class that other classes need to inherit from, in order to be inspectable.
Definition: inspectable.h:36
FONT is an abstract base class for both outline and stroke fonts.
Definition: font.h:105
void Draw(KIGFX::GAL *aGal, const wxString &aText, const VECTOR2I &aPosition, const VECTOR2I &aCursor, const TEXT_ATTRIBUTES &aAttrs) const
Draw a string.
Definition: font.cpp:232
Contains methods for drawing PCB-specific items.
Definition: pcb_painter.h:158
virtual PCB_RENDER_SETTINGS * GetSettings() override
Return a pointer to current settings that are going to be used when drawing items.
Definition: pcb_painter.h:163
PCB specific render settings.
Definition: pcb_painter.h:72
PCB_LAYER_ID GetPrimaryHighContrastLayer() const
Return the board layer which is in high-contrast mode.
bool GetHighContrast() const
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition: view.h:69
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
Definition: view.h:410
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Definition: view.h:213
static LSET SideSpecificMask()
Definition: lset.cpp:908
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
Definition: pcb_text.cpp:110
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool aIgnoreLineWidth=false) const override
Convert the item shape to a closed polygon.
Definition: pcb_text.cpp:325
virtual void swapData(BOARD_ITEM *aImage) override
Definition: pcb_text.cpp:257
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
Definition: pcb_text.cpp:265
void Flip(const VECTOR2I &aCentre, bool aFlipLeftRight) override
Flip this object, i.e.
Definition: pcb_text.cpp:217
~PCB_TEXT()
Definition: pcb_text.cpp:50
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
Definition: pcb_text.cpp:237
wxString GetShownText(int aDepth=0, bool aAllowExtraText=true) const override
Return the string actually shown after processing of the base text.
Definition: pcb_text.cpp:55
PCB_TEXT(BOARD_ITEM *parent, KICAD_T idtype=PCB_TEXT_T)
Definition: pcb_text.cpp:42
double ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
Definition: pcb_text.cpp:85
int getKnockoutMargin() const
Definition: pcb_text.cpp:131
void Mirror(const VECTOR2I &aCentre, bool aMirrorAroundXAxis)
Definition: pcb_text.cpp:196
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: pcb_text.cpp:140
bool TextHitTest(const VECTOR2I &aPoint, int aAccuracy=0) const override
Test if aPoint is within the bounds of this object.
Definition: pcb_text.cpp:154
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition: pcb_text.cpp:251
void TransformTextToPolySet(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc) const
Function TransformTextToPolySet Convert the text to a polygonSet describing the actual character stro...
Definition: pcb_text.cpp:290
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
Definition: pcb_text.cpp:184
BITMAPS GetMenuImage() const override
Definition: pcb_text.cpp:245
Provide class metadata.Helper macro to map type hashes to names.
Definition: property_mgr.h:74
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
Definition: property_mgr.h:76
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
void OverrideAvailability(TYPE_ID aDerived, TYPE_ID aBase, const wxString &aName, std::function< bool(INSPECTABLE *)> aFunc)
Sets an override availability functor for a base class property of a given derived class.
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
Represent a set of closed polygons.
void BooleanSubtract(const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode)
Perform boolean polyset intersection For aFastMode meaning, see function booleanOp.
void Fracture(POLYGON_MODE aFastMode)
Convert a single outline slitted ("fractured") polygon into a set ouf outlines with holes.
bool Collide(const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance,...
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Add a new vertex to the contour indexed by aOutline and aHole (defaults to the outline of the last po...
void Simplify(POLYGON_MODE aFastMode)
int NewOutline()
Creates a new hole in a given outline.
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A lower-precision version of StringFromValue().
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject)
Definition: common.cpp:58
void TransformOvalToPolygon(SHAPE_POLY_SET &aBuffer, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, int aError, ERROR_LOC aErrorLoc, int aMinSegCount=0)
Convert a oblong shape to a polygon, using multiple segments.
#define _HKI(x)
#define _(s)
static constexpr EDA_ANGLE & ANGLE_180
Definition: eda_angle.h:433
static constexpr EDA_ANGLE & ANGLE_HORIZONTAL
Definition: eda_angle.h:425
static constexpr EDA_ANGLE & ANGLE_VERTICAL
Definition: eda_angle.h:426
#define PCB_EDIT_FRAME_NAME
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
@ ERROR_INSIDE
int GetKnockoutTextMargin(const VECTOR2I &aSize, int aThickness)
Returns the margin for knocking out text.
Definition: gr_text.h:104
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition: layer_ids.h:147
@ LAYER_LOCKED_ITEM_SHADOW
shadow layer for locked items
Definition: layer_ids.h:239
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:59
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
Definition: lset.cpp:544
T MIRRORVAL(T aPoint, T aMirrorRef)
Returns the mirror of aPoint relative to the aMirrorRef.
Definition: mirror.h:31
wxString EllipsizeMenuText(const wxString &aString)
Ellipsize text (at the end) to be no more than 36 characters.
Definition: ui_common.cpp:215
wxString EllipsizeStatusText(wxWindow *aWindow, const wxString &aString)
Ellipsize text (at the end) to be no more than 1/3 of the window width.
Definition: ui_common.cpp:197
static struct PCB_TEXT_DESC _PCB_TEXT_DESC
#define TYPE_HASH(x)
Definition: property.h:63
#define REGISTER_TYPE(x)
Definition: property_mgr.h:328
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
GR_TEXT_H_ALIGN_T
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Definition: trigo.cpp:183
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
Definition: typeinfo.h:90