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