KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcad_footprint.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) 2007, 2008 Lubo Racko <[email protected]>
5 * Copyright (C) 2007, 2008, 2012-2013 Alexander Lunev <[email protected]>
6 * Copyright The 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 <pcad/pcad_arc.h>
28#include <pcad/pcad_cutout.h>
29#include <pcad/pcad_plane.h>
30#include <pcad/pcad_line.h>
31#include <pcad/pcad_footprint.h>
32#include <pcad/pcad_pad.h>
33#include <pcad/pcad_polygon.h>
34#include <pcad/pcad_text.h>
35#include <pcad/pcad_via.h>
36
37#include <board.h>
38#include <footprint.h>
39#include <pcb_text.h>
40#include <trigo.h>
41#include <xnode.h>
42
43#include <wx/string.h>
44
45namespace PCAD2KICAD {
46
47
49 PCAD_PCB_COMPONENT( aCallbacks, aBoard )
50{
52 m_Mirror = 0;
53 m_ObjType = wxT( 'M' ); // FOOTPRINT
54 m_KiCadLayer = F_SilkS; // default
55}
56
57
59{
60 for( int i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
61 delete m_FootprintItems[i];
62}
63
64
65XNODE* PCAD_FOOTPRINT::FindModulePatternDefName( XNODE* aNode, const wxString& aName )
66{
67 XNODE* result, * lNode;
68 wxString propValue1, propValue2;
69
70 result = nullptr;
71 lNode = FindNode( aNode, wxT( "patternDef" ) );
72
73 while( lNode )
74 {
75 if( lNode->GetName() == wxT( "patternDef" ) )
76 {
77 lNode->GetAttribute( wxT( "Name" ), &propValue1 );
78 if( XNODE* originalNameNode = FindNode( lNode, wxT( "originalName" ) ) )
79 originalNameNode->GetAttribute( wxT( "Name" ), &propValue2 );
80
81 if( ValidateName( propValue1 ) == aName || ValidateName( propValue2 ) == aName )
82 {
83 result = lNode;
84 lNode = nullptr;
85 }
86 }
87
88 if( lNode )
89 lNode = lNode->GetNext();
90 }
91
92 if( result == nullptr )
93 {
94 lNode = FindNode( aNode, wxT( "patternDefExtended" ) ); // New file format
95
96 while( lNode )
97 {
98 if( lNode->GetName() == wxT( "patternDefExtended" ) )
99 {
100 lNode->GetAttribute( wxT( "Name" ), &propValue1 );
101
102 if( ValidateName( propValue1 ) == aName )
103 {
104 result = lNode;
105 lNode = nullptr;
106 }
107 }
108
109 if( lNode )
110 lNode = lNode->GetNext();
111 }
112 }
113
114 return result;
115}
116
117
118XNODE* PCAD_FOOTPRINT::FindPatternMultilayerSection( XNODE* aNode, wxString* aPatGraphRefName )
119{
120 XNODE* result, * pNode, * lNode;
121 wxString propValue, patName;
122
123 result = nullptr;
124 pNode = aNode; // pattern;
125 lNode = aNode;
126
127 // calling from library conversion we need to find pattern
128 if( lNode->GetName() == wxT( "compDef" ) )
129 {
130 lNode->GetAttribute( wxT( "Name" ), &propValue );
131 propValue.Trim( false );
132 patName = ValidateName( propValue );
133
134 if( XNODE* patternNode = FindNode( lNode, wxT( "attachedPattern" ) ) )
135 {
136 if( XNODE* patternNameNode = FindNode( patternNode, wxT( "patternName" ) ) )
137 patternNameNode->GetAttribute( wxT( "Name" ), &propValue );
138
139 propValue.Trim( false );
140 propValue.Trim( true );
141 patName = ValidateName( propValue );
142 }
143
144 lNode = FindModulePatternDefName( lNode->GetParent(), patName );
145 pNode = lNode; // pattern;
146 }
147
148 lNode = nullptr;
149
150 if( pNode )
151 lNode = FindNode( pNode, wxT( "multiLayer" ) ); // Old file format
152
153 if( lNode )
154 {
155 *aPatGraphRefName = wxEmptyString; // default
156 result = lNode;
157 }
158 else
159 {
160 // New file format
161
162 if( *aPatGraphRefName == wxEmptyString ) // default
163 {
164 if( XNODE* nameRefNode = FindNode( aNode, wxT( "patternGraphicsNameRef" ) ) )
165 nameRefNode->GetAttribute( wxT( "Name" ), aPatGraphRefName );
166 }
167
168 if( FindNode( aNode, wxT( "patternGraphicsDef" ) ) )
169 lNode = FindNode( aNode, wxT( "patternGraphicsDef" ) );
170 else if( pNode )
171 lNode = FindNode( pNode, wxT( "patternGraphicsDef" ) );
172
173 if( *aPatGraphRefName == wxEmptyString ) // no pattern detection, the first is actual...
174 {
175 if( lNode )
176 {
177 result = FindNode( lNode, wxT( "multiLayer" ) );
178 lNode = nullptr;
179 }
180 }
181
182 while( lNode ) // selected by name
183 {
184 if( lNode->GetName() == wxT( "patternGraphicsDef" ) )
185 {
186 if( XNODE* nameDefNode = FindNode( lNode, wxT( "patternGraphicsNameDef" ) ) )
187 nameDefNode->GetAttribute( wxT( "Name" ), &propValue );
188
189 if( propValue == *aPatGraphRefName )
190 {
191 result = FindNode( lNode, wxT( "multiLayer" ) );
192 lNode = nullptr;
193 }
194 else
195 {
196 lNode = lNode->GetNext();
197 }
198 }
199 else
200 {
201 lNode = lNode->GetNext();
202 }
203 }
204 }
205
206 return result;
207}
208
209
211 PCAD_COMPONENTS_ARRAY* aList, wxStatusBar* aStatusBar,
212 const wxString& aDefaultMeasurementUnit,
213 const wxString& aActualConversion )
214{
215 PCAD_ARC* arc = nullptr;
216 PCAD_POLYGON* polygon = nullptr;
217 PCAD_POLYGON* plane_layer = nullptr;
218 PCAD_COPPER_POUR* copperPour = nullptr;
219 PCAD_CUTOUT* cutout = nullptr;
220 PCAD_PLANE* plane = nullptr;
221 VERTICES_ARRAY* plane_layer_polygon = nullptr;
222 PCAD_LINE* line = nullptr;
223 PCAD_TEXT* text = nullptr;
224 XNODE* lNode = nullptr;
225 XNODE* tNode = nullptr;
226 wxString propValue;
227 long long i = 0;
228 int PCadLayer = 0;
229 long num = 0;
230
231 // aStatusBar->SetStatusText( wxT( "Processing LAYER CONTENT OBJECTS " ) );
232 if( FindNode( aNode, wxT( "layerNumRef" ) ) )
233 FindNode( aNode, wxT( "layerNumRef" ) )->GetNodeContent().ToLong( &num );
234
235 PCadLayer = (int) num;
236
237 if( m_callbacks->GetLayerType( PCadLayer ) == LAYER_TYPE_PLANE )
238 {
239 plane_layer = new PCAD_POLYGON( m_callbacks, m_board, PCadLayer );
240 plane_layer->AssignNet( m_callbacks->GetLayerNetNameRef( PCadLayer ) );
241 plane_layer->SetOutline( &m_BoardOutline );
242 aList->Add( plane_layer );
243
244 // fill the polygon with the same contour as its outline is
245 //plane_layer->AddIsland( &m_boardOutline );
246 }
247
248 lNode = aNode->GetChildren();
249
250 while( lNode )
251 {
252 i++;
253
254 if( lNode->GetName() == wxT( "line" ) )
255 {
256 line = new PCAD_LINE( m_callbacks, m_board );
257 line->Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
258 aList->Add( line );
259 }
260
261 if( lNode->GetName() == wxT( "text" ) )
262 {
264 text->Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
265 aList->Add( text );
266 }
267
268 // added as Sergeys request 02/2008
269 if( lNode->GetName() == wxT( "attr" ) )
270 {
271 // assign fonts to Module Name,Value,Type,....s
272 lNode->GetAttribute( wxT( "Name" ), &propValue );
273 propValue.Trim( false );
274 propValue.Trim( true );
275
276 if( propValue == wxT( "RefDes" ) )
277 {
278 tNode = FindNode( lNode, wxT( "textStyleRef" ) );
279
280 if( tNode && aFootprint )
281 {
282 // TODO: to understand and may be repair
283 // Alexander Lunev: originally in Delphi version of the project there was
284 // a strange access to pcbModule->m_Name (it was global variable). This access
285 // is necessary when the function DoLayerContentsObjects() is called from
286 // function CreatePCBModule(). However it is not clear whether the access is
287 // required when the function DoLayerContentsObjects() is called from
288 // function ProcessXMLtoPCBLib().
289 SetFontProperty( tNode, &aFootprint->m_Name, aDefaultMeasurementUnit,
290 aActualConversion );
291 }
292 }
293 }
294
295 // added as Sergeys request 02/2008
296 if( lNode->GetName() == wxT( "arc" ) || lNode->GetName() == wxT( "triplePointArc" ) )
297 {
298 arc = new PCAD_ARC( m_callbacks, m_board );
299 arc->Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
300 aList->Add( arc );
301 }
302
303 if( lNode->GetName() == wxT( "pcbPoly" ) )
304 {
305 if( m_callbacks->GetLayerType( PCadLayer ) == LAYER_TYPE_PLANE )
306 {
307 if( plane_layer )
308 {
309 plane_layer_polygon = new VERTICES_ARRAY;
310 plane_layer->FormPolygon( lNode, plane_layer_polygon, aDefaultMeasurementUnit,
311 aActualConversion );
312 plane_layer->m_Cutouts.Add( plane_layer_polygon );
313 }
314 }
315 else
316 {
317 polygon = new PCAD_POLYGON( m_callbacks, m_board, PCadLayer );
318
319 if( polygon->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
320 aList->Add( polygon );
321 else
322 delete polygon;
323 }
324 }
325
326 if( lNode->GetName() == wxT( "copperPour95" ) )
327 {
328 copperPour = new PCAD_COPPER_POUR( m_callbacks, m_board, PCadLayer );
329
330 if( copperPour->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
331 aList->Add( copperPour );
332 else
333 delete copperPour;
334 }
335
336 if( lNode->GetName() == wxT( "polyCutOut" ) )
337 {
338 cutout = new PCAD_CUTOUT( m_callbacks, m_board, PCadLayer );
339
340 if( cutout->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
341 aList->Add( cutout );
342 else
343 delete cutout;
344 }
345
346 if( lNode->GetName() == wxT( "planeObj" ) )
347 {
348 plane = new PCAD_PLANE( m_callbacks, m_board, PCadLayer );
349
350 if( plane->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
351 aList->Add( plane );
352 else
353 delete plane;
354 }
355
356 lNode = lNode->GetNext();
357 }
358}
359
360
361void PCAD_FOOTPRINT::SetName( const wxString& aPin, const wxString& aName )
362{
363 long num;
364 aPin.ToLong( &num );
365
366 for( int i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
367 {
368 if( m_FootprintItems[i]->m_ObjType == wxT( 'P' ) )
369 {
370 if( ( (PCAD_PAD*) m_FootprintItems[i] )->m_Number == num )
371 ( (PCAD_PAD*) m_FootprintItems[i] )->m_Name.text = aName;
372 }
373 }
374}
375
376
377void PCAD_FOOTPRINT::Parse( XNODE* aNode, wxStatusBar* aStatusBar,
378 const wxString& aDefaultMeasurementUnit,
379 const wxString& aActualConversion )
380{
381 XNODE* lNode = nullptr;
382 XNODE* tNode = nullptr;;
383 XNODE* mNode = nullptr;
384 PCAD_PAD* pad = nullptr;
385 PCAD_VIA* via = nullptr;
386 wxString propValue, str;
387
388 FindNode( aNode, wxT( "originalName" ) )->GetAttribute( wxT( "Name" ), &propValue );
389 propValue.Trim( false );
390 m_Name.text = propValue;
391
392 // aStatusBar->SetStatusText( wxT( "Creating Component : " ) + m_Name.text );
393 lNode = aNode;
395
396 if( lNode )
397 {
398 tNode = lNode;
399 tNode = tNode->GetChildren();
400
401 while( tNode )
402 {
403 if( tNode->GetName() == wxT( "pad" ) )
404 {
406 pad->Parse( tNode, aDefaultMeasurementUnit, aActualConversion );
407 m_FootprintItems.Add( pad );
408 }
409
410 if( tNode->GetName() == wxT( "via" ) )
411 {
413 via->Parse( tNode, aDefaultMeasurementUnit, aActualConversion );
414 m_FootprintItems.Add( via );
415 }
416
417 tNode = tNode->GetNext();
418 }
419
420 lNode = lNode->GetParent();
421 }
422
423 if( lNode )
424 lNode = FindNode( lNode, wxT( "layerContents" ) );
425
426 while( lNode )
427 {
428 if( lNode->GetName() == wxT( "layerContents" ) )
429 {
430 DoLayerContentsObjects( lNode, this, &m_FootprintItems, aStatusBar,
431 aDefaultMeasurementUnit, aActualConversion );
432 }
433
434 lNode = lNode->GetNext();
435 }
436
437 // map pins
438 lNode = FindPinMap( aNode );
439
440 if( lNode )
441 {
442 mNode = lNode->GetChildren();
443
444 while( mNode )
445 {
446 if( mNode->GetName() == wxT( "padNum" ) )
447 {
448 str = mNode->GetNodeContent();
449 mNode = mNode->GetNext();
450
451 if( !mNode )
452 break;
453
454 mNode->GetAttribute( wxT( "Name" ), &propValue );
455 SetName( str, propValue );
456 mNode = mNode->GetNext();
457 }
458 else
459 {
460 mNode = mNode->GetNext();
461
462 if( !mNode )
463 break;
464
465 mNode = mNode->GetNext();
466 }
467 }
468 }
469}
470
471
473{
474 // No nested footprints....
475 wxCHECK( aFootprint == nullptr, /* void */ );
476
477 EDA_ANGLE r;
478
479 // transform text positions
482
485
486 FOOTPRINT* footprint = new FOOTPRINT( m_board );
487 m_board->Add( footprint, ADD_MODE::APPEND );
488
490 footprint->SetLayer( m_Mirror ? B_Cu : F_Cu );
491 footprint->SetOrientation( m_Rotation );
492
493 LIB_ID fpID;
494 fpID.Parse( m_CompRef, true );
495 footprint->SetFPID( fpID );
496
497 // reference text
498 PCB_FIELD* ref_text = &footprint->Reference();
499
500 ref_text->SetText( ValidateReference( m_Name.text ) );
501
504
505 if( m_Name.isTrueType )
507 else
509
511 ref_text->SetTextAngle( r );
512 ref_text->SetKeepUpright( false );
513
514 ref_text->SetItalic( m_Name.isItalic );
516
517 ref_text->SetMirrored( m_Name.mirror );
518 ref_text->SetVisible( m_Name.textIsVisible );
519
521
522 // value text
523 PCB_FIELD* val_text = &footprint->Value();
524
525 val_text->SetText( m_Value.text );
526
529
530 if( m_Value.isTrueType )
532 else
534
536 val_text->SetTextAngle( r );
537 val_text->SetKeepUpright( false );
538
539 val_text->SetItalic( m_Value.isItalic );
541
542 val_text->SetMirrored( m_Value.mirror );
543 val_text->SetVisible( m_Value.textIsVisible );
544
546
547 // TEXTS
548 for( int i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
549 {
550 if( m_FootprintItems[i]->m_ObjType == wxT( 'T' ) )
551 m_FootprintItems[ i ]->AddToBoard( footprint );
552 }
553
554 // FOOTPRINT LINES
555 for( int i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
556 {
557 if( m_FootprintItems[i]->m_ObjType == wxT( 'L' ) )
558 m_FootprintItems[ i ]->AddToBoard( footprint );
559 }
560
561 // FOOTPRINT ARCS
562 for( int i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
563 {
564 if( m_FootprintItems[i]->m_ObjType == wxT( 'A' ) )
565 m_FootprintItems[ i ]->AddToBoard( footprint );
566 }
567
568 // FOOTPRINT POLYGONS
569 for( int i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
570 {
571 if( m_FootprintItems[i]->m_ObjType == wxT( 'Z' ) )
572 m_FootprintItems[ i ]->AddToBoard( footprint );
573 }
574
575 // PADS
576 for( int i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
577 {
578 if( m_FootprintItems[i]->m_ObjType == wxT( 'P' ) )
579 ((PCAD_PAD*) m_FootprintItems[ i ] )->AddToFootprint( footprint, m_Rotation, false );
580 }
581
582 // VIAS
583 for( int i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
584 {
585 if( m_FootprintItems[i]->m_ObjType == wxT( 'V' ) )
586 ((PCAD_VIA*) m_FootprintItems[ i ] )->AddToFootprint( footprint, m_Rotation, false );
587 }
588}
589
590
592{
593 if( m_Mirror == 1 )
594 {
596
597 for( int i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
598 {
599 if( m_FootprintItems[i]->m_ObjType == wxT( 'L' ) || // lines
600 m_FootprintItems[i]->m_ObjType == wxT( 'A' ) || // arcs
601 m_FootprintItems[i]->m_ObjType == wxT( 'Z' ) || // polygons
602 m_FootprintItems[i]->m_ObjType == wxT( 'P' ) || // pads
603 m_FootprintItems[i]->m_ObjType == wxT( 'V' ) ) // vias
604 {
605 m_FootprintItems[i]->Flip();
606 }
607 }
608 }
609}
610
611} // namespace PCAD2KICAD
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition: board_item.h:280
void SetFPRelativePosition(const VECTOR2I &aPos)
Definition: board_item.cpp:360
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:317
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
Definition: board.cpp:1147
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayer) const
Definition: board.cpp:852
void SetMirrored(bool isMirrored)
Definition: eda_text.cpp:393
virtual void SetVisible(bool aVisible)
Definition: eda_text.cpp:386
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
Definition: eda_text.cpp:284
void SetKeepUpright(bool aKeepUpright)
Definition: eda_text.cpp:425
virtual void SetText(const wxString &aText)
Definition: eda_text.cpp:270
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
Definition: eda_text.cpp:299
void SetItalic(bool aItalic)
Set the text to be italic - this will also update the font if needed.
Definition: eda_text.cpp:307
void SetPosition(const VECTOR2I &aPos) override
Definition: footprint.cpp:2513
void SetFPID(const LIB_ID &aFPID)
Definition: footprint.h:252
void SetOrientation(const EDA_ANGLE &aNewAngle)
Definition: footprint.cpp:2595
PCB_FIELD & Value()
read/write accessors:
Definition: footprint.h:663
PCB_FIELD & Reference()
Definition: footprint.h:664
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:49
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
Definition: lib_id.cpp:52
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultUnits, const wxString &aActualConversion)
Definition: pcad_arc.cpp:55
virtual LAYER_TYPE_T GetLayerType(int aPCadLayer) const =0
virtual wxString GetLayerNetNameRef(int aPCadLayer) const =0
virtual bool Parse(XNODE *aNode, const wxString &aDefaultUnits, const wxString &aActualConversion) override
virtual bool Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &actualConversion) override
Definition: pcad_cutout.cpp:51
PCAD_FOOTPRINT(PCAD_CALLBACKS *aCallbacks, BOARD *aBoard)
void DoLayerContentsObjects(XNODE *aNode, PCAD_FOOTPRINT *aFootprint, PCAD_COMPONENTS_ARRAY *aList, wxStatusBar *aStatusBar, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
PCAD_COMPONENTS_ARRAY m_FootprintItems
XNODE * FindPatternMultilayerSection(XNODE *aNode, wxString *aPatGraphRefName)
virtual void Flip() override
void AddToBoard(FOOTPRINT *aFootprint=nullptr) override
XNODE * FindModulePatternDefName(XNODE *aNode, const wxString &aName)
VERTICES_ARRAY m_BoardOutline
void SetName(const wxString &aPin, const wxString &aName)
virtual void Parse(XNODE *aNode, wxStatusBar *aStatusBar, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultUnits, const wxString &aActualConversion)
Definition: pcad_line.cpp:54
virtual bool Parse(XNODE *aNode, const wxString &aDefaultUnits, const wxString &aActualConversion) override
Definition: pcad_plane.cpp:46
void SetOutline(VERTICES_ARRAY *aOutline)
virtual bool Parse(XNODE *aNode, const wxString &aDefaultUnits, const wxString &aActualConversion)
ISLANDS_ARRAY m_Cutouts
Definition: pcad_polygon.h:67
void FormPolygon(XNODE *aNode, VERTICES_ARRAY *aPolygon, const wxString &aDefaultUnits, const wxString &actualConversion)
void AssignNet(const wxString &aNetName)
Hold an XML or S-expression element.
Definition: xnode.h:43
XNODE * GetParent() const
Definition: xnode.h:71
XNODE * GetChildren() const
Definition: xnode.h:61
XNODE * GetNext() const
Definition: xnode.h:66
@ B_Cu
Definition: layer_ids.h:65
@ F_SilkS
Definition: layer_ids.h:100
@ F_Cu
Definition: layer_ids.h:64
wxString ValidateName(const wxString &aName)
XNODE * FindNode(XNODE *aChild, const wxString &aTag)
wxString ValidateReference(const wxString &aRef)
void SetTextSizeFromStrokeFontHeight(EDA_TEXT *aText, int aTextHeight)
XNODE * FindPinMap(XNODE *aNode)
void CorrectTextPosition(TTEXTVALUE *aValue)
void SetFontProperty(XNODE *aNode, TTEXTVALUE *aTextValue, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
void InitTTextValue(TTEXTVALUE *aTextValue)
void SetTextSizeFromTrueTypeFontHeight(EDA_TEXT *aText, int aTextHeight)
@ LAYER_TYPE_PLANE
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
Definition: trigo.cpp:229
VECTOR2< int32_t > VECTOR2I
Definition: vector2d.h:695