KiCad PCB EDA Suite
class_dimension.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, jean-pierre.charras@ujf-grenoble.fr
5  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
6  * Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
7  * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
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 #include <fctsys.h>
28 #include <gr_basic.h>
29 #include <bitmaps.h>
30 #include <pcb_edit_frame.h>
31 #include <base_units.h>
32 #include <class_board.h>
33 #include <class_dimension.h>
34 #include <class_pcb_text.h>
37 
38 
40  : BOARD_ITEM( aParent, PCB_DIMENSION_T ),
41  m_Width( Millimeter2iu( 0.2 ) ),
42  m_Unit( EDA_UNITS::INCHES ),
43  m_UseMils( false ),
44  m_Value( 0 ),
45  m_Height( 0 ),
46  m_Text( this )
47 {
49  m_Shape = 0;
50 }
51 
52 
54 {
55 }
56 
57 
58 void DIMENSION::SetPosition( const wxPoint& aPos )
59 {
60  m_Text.SetTextPos( aPos );
61 }
62 
63 
65 {
66  return m_Text.GetTextPos();
67 }
68 
69 
70 void DIMENSION::SetText( const wxString& aNewText )
71 {
72  m_Text.SetText( aNewText );
73 }
74 
75 
76 const wxString DIMENSION::GetText() const
77 {
78  return m_Text.GetText();
79 }
80 
81 
83 {
84  m_Layer = aLayer;
85  m_Text.SetLayer( aLayer );
86 }
87 
88 
89 void DIMENSION::Move( const wxPoint& offset )
90 {
91  m_Text.Offset( offset );
92 
93  m_crossBarO += offset;
94  m_crossBarF += offset;
95  m_featureLineGO += offset;
96  m_featureLineGF += offset;
97  m_featureLineDO += offset;
98  m_featureLineDF += offset;
99  m_arrowG1F += offset;
100  m_arrowG2F += offset;
101  m_arrowD1F += offset;
102  m_arrowD2F += offset;
103 }
104 
105 
106 void DIMENSION::Rotate( const wxPoint& aRotCentre, double aAngle )
107 {
108  wxPoint tmp = m_Text.GetTextPos();
109  RotatePoint( &tmp, aRotCentre, aAngle );
110  m_Text.SetTextPos( tmp );
111 
112  double newAngle = m_Text.GetTextAngle() + aAngle;
113 
114  if( newAngle >= 3600 )
115  newAngle -= 3600;
116 
117  if( newAngle > 900 && newAngle < 2700 )
118  newAngle -= 1800;
119 
120  m_Text.SetTextAngle( newAngle );
121 
122  RotatePoint( &m_crossBarO, aRotCentre, aAngle );
123  RotatePoint( &m_crossBarF, aRotCentre, aAngle );
124  RotatePoint( &m_featureLineGO, aRotCentre, aAngle );
125  RotatePoint( &m_featureLineGF, aRotCentre, aAngle );
126  RotatePoint( &m_featureLineDO, aRotCentre, aAngle );
127  RotatePoint( &m_featureLineDF, aRotCentre, aAngle );
128  RotatePoint( &m_arrowG1F, aRotCentre, aAngle );
129  RotatePoint( &m_arrowG2F, aRotCentre, aAngle );
130  RotatePoint( &m_arrowD1F, aRotCentre, aAngle );
131  RotatePoint( &m_arrowD2F, aRotCentre, aAngle );
132 }
133 
134 
135 void DIMENSION::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
136 {
137  Mirror( aCentre );
138 
139  // DIMENSION items are not usually on copper layers, so
140  // copper layers count is not taken in accoun in Flip transform
141  SetLayer( FlipLayer( GetLayer() ) );
142 }
143 
144 
145 void DIMENSION::Mirror( const wxPoint& axis_pos, bool aMirrorLeftRight )
146 {
147  int axis = aMirrorLeftRight ? axis_pos.x : axis_pos.y;
148  wxPoint newPos = m_Text.GetTextPos();
149 
150 #define INVERT( pos ) (pos) = axis - ( (pos) - axis )
151 
152  if( aMirrorLeftRight )
153  INVERT( newPos.x );
154  else
155  INVERT( newPos.y );
156 
157  m_Text.SetTextPos( newPos );
158 
159  // invert angle
161 
162  if( aMirrorLeftRight )
163  {
164  INVERT( m_crossBarO.y );
165  INVERT( m_crossBarF.y );
170  INVERT( m_arrowG1F.y );
171  INVERT( m_arrowG2F.y );
172  INVERT( m_arrowD1F.y );
173  INVERT( m_arrowD2F.y );
174  }
175  else
176  {
177  INVERT( m_crossBarO.y );
178  INVERT( m_crossBarF.y );
183  INVERT( m_arrowG1F.y );
184  INVERT( m_arrowG2F.y );
185  INVERT( m_arrowD1F.y );
186  INVERT( m_arrowD2F.y );
187  }
188 }
189 
190 
191 void DIMENSION::SetOrigin( const wxPoint& aOrigin, int aPrecision )
192 {
193  m_featureLineGO = aOrigin;
194 
195  AdjustDimensionDetails( aPrecision );
196 }
197 
198 
199 void DIMENSION::SetEnd( const wxPoint& aEnd, int aPrecision )
200 {
201  m_featureLineDO = aEnd;
202 
203  AdjustDimensionDetails( aPrecision );
204 }
205 
206 
207 void DIMENSION::SetHeight( int aHeight, int aPrecision )
208 {
209  m_Height = aHeight;
210 
211  AdjustDimensionDetails( aPrecision );
212 }
213 
214 
216 {
217  VECTOR2D featureLine( m_crossBarO - m_featureLineGO );
219 
220  if( featureLine.Cross( crossBar ) > 0 )
221  m_Height = -featureLine.EuclideanNorm();
222  else
223  m_Height = featureLine.EuclideanNorm();
224 }
225 
226 
227 void DIMENSION::AdjustDimensionDetails( int aPrecision )
228 {
229  const int arrowz = Mils2iu( 50 ); // size of arrows
230  int ii;
231  int measure, deltax, deltay; // value of the measure on X and Y axes
232  int arrow_up_X = 0, arrow_up_Y = 0; // coordinates of arrow line /
233  int arrow_dw_X = 0, arrow_dw_Y = 0; // coordinates of arrow line '\'
234  int hx, hy; // dimension line interval
235  double angle, angle_f;
236 
237  // Init layer :
238  m_Text.SetLayer( GetLayer() );
239 
240  // calculate the size of the dimension (text + line above the text)
242 
243  deltax = m_featureLineDO.x - m_featureLineGO.x;
244  deltay = m_featureLineDO.y - m_featureLineGO.y;
245 
246  // Calculate dimension value
247  measure = KiROUND( hypot( deltax, deltay ) );
248 
249  angle = atan2( (double)deltay, (double)deltax );
250 
251  // Calculation of parameters X and Y dimensions of the arrows and lines.
252  hx = hy = ii;
253 
254  // Taking into account the slope of the side lines.
255  if( measure )
256  {
257  hx = abs( KiROUND( ( (double) deltay * hx ) / measure ) );
258  hy = abs( KiROUND( ( (double) deltax * hy ) / measure ) );
259 
261  hx = -hx;
262 
263  if( m_featureLineGO.x == m_crossBarO.x )
264  hx = 0;
265 
267  hy = -hy;
268 
269  if( m_featureLineGO.y == m_crossBarO.y )
270  hy = 0;
271 
272  angle_f = angle + DEG2RAD( 27.5 );
273  arrow_up_X = wxRound( arrowz * cos( angle_f ) );
274  arrow_up_Y = wxRound( arrowz * sin( angle_f ) );
275  angle_f = angle - DEG2RAD( 27.5 );
276  arrow_dw_X = wxRound( arrowz * cos( angle_f ) );
277  arrow_dw_Y = wxRound( arrowz * sin( angle_f ) );
278  }
279 
280  int dx = KiROUND( m_Height * cos( angle + M_PI / 2 ) );
281  int dy = KiROUND( m_Height * sin( angle + M_PI / 2 ) );
286 
287  m_arrowG1F.x = m_crossBarO.x + arrow_up_X;
288  m_arrowG1F.y = m_crossBarO.y + arrow_up_Y;
289 
290  m_arrowG2F.x = m_crossBarO.x + arrow_dw_X;
291  m_arrowG2F.y = m_crossBarO.y + arrow_dw_Y;
292 
293  /* The right arrow is symmetrical to the left.
294  * / = -\ and \ = -/
295  */
296  m_arrowD1F.x = m_crossBarF.x - arrow_dw_X;
297  m_arrowD1F.y = m_crossBarF.y - arrow_dw_Y;
298 
299  m_arrowD2F.x = m_crossBarF.x - arrow_up_X;
300  m_arrowD2F.y = m_crossBarF.y - arrow_up_Y;
301 
302  // Length of feature lines
303  double radius = ( m_Height +
304  ( std::copysign( 1.0, m_Height ) *
305  arrowz * sin( DEG2RAD( 27.5 ) ) ) );
306 
307  m_featureLineGF.x = m_featureLineGO.x - wxRound( radius * sin( angle ) );
308  m_featureLineGF.y = m_featureLineGO.y + wxRound( radius * cos( angle ) );
309 
310  m_featureLineDF.x = m_featureLineDO.x - wxRound( radius * sin( angle ) );
311  m_featureLineDF.y = m_featureLineDO.y + wxRound( radius * cos( angle ) );
312 
313  // Calculate the better text position and orientation:
314  radius = ( std::copysign( 1.0, m_Height ) * ii );
315 
316  wxPoint textPos;
317  textPos.x = ( m_crossBarF.x + m_crossBarO.x ) / 2;
318  textPos.y = ( m_crossBarF.y + m_crossBarO.y ) / 2;
319 
320  textPos.x -= KiROUND( radius * sin( angle ) );
321  textPos.y += KiROUND( radius * cos( angle ) );
322 
323  m_Text.SetTextPos( textPos );
324 
325  double newAngle = -RAD2DECIDEG( angle );
326 
327  NORMALIZE_ANGLE_POS( newAngle );
328 
329  if( newAngle > 900 && newAngle < 2700 )
330  newAngle -= 1800;
331 
332  m_Text.SetTextAngle( newAngle );
333 
334  m_Value = measure;
335 
337  aPrecision += 2;
338  else if( !m_UseMils )
339  aPrecision += 3;
340 
341  wxString text;
342  wxString format = wxT( "%." ) + wxString::Format( "%i", aPrecision ) + wxT( "f" );
343 
344  text.Printf( format, To_User_Unit( m_Unit, m_Value, m_UseMils ) );
345  text += " ";
347 
348  SetText( text );
349 }
350 
351 
352 // see class_cotation.h
353 void DIMENSION::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
354 {
355  // for now, display only the text within the DIMENSION using class TEXTE_PCB.
356  m_Text.GetMsgPanelInfo( aFrame, aList );
357 }
358 
359 
360 bool DIMENSION::HitTest( const wxPoint& aPosition, int aAccuracy ) const
361 {
362  if( m_Text.TextHitTest( aPosition ) )
363  return true;
364 
365  int dist_max = aAccuracy + ( m_Width / 2 );
366 
367  // Locate SEGMENTS
368 
369  if( TestSegmentHit( aPosition, m_crossBarO, m_crossBarF, dist_max ) )
370  return true;
371 
372  if( TestSegmentHit( aPosition, m_featureLineGO, m_featureLineGF, dist_max ) )
373  return true;
374 
375  if( TestSegmentHit( aPosition, m_featureLineDO, m_featureLineDF, dist_max ) )
376  return true;
377 
378  if( TestSegmentHit( aPosition, m_crossBarF, m_arrowD1F, dist_max ) )
379  return true;
380 
381  if( TestSegmentHit( aPosition, m_crossBarF, m_arrowD2F, dist_max ) )
382  return true;
383 
384  if( TestSegmentHit( aPosition, m_crossBarO, m_arrowG1F, dist_max ) )
385  return true;
386 
387  if( TestSegmentHit( aPosition, m_crossBarO, m_arrowG2F, dist_max ) )
388  return true;
389 
390  return false;
391 }
392 
393 
394 bool DIMENSION::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
395 {
396  EDA_RECT arect = aRect;
397  arect.Inflate( aAccuracy );
398 
399  EDA_RECT rect = GetBoundingBox();
400  if( aAccuracy )
401  rect.Inflate( aAccuracy );
402 
403  if( aContained )
404  return arect.Contains( rect );
405 
406  return arect.Intersects( rect );
407 }
408 
409 
411 {
412  EDA_RECT bBox;
413  int xmin, xmax, ymin, ymax;
414 
415  bBox = m_Text.GetTextBox();
416  xmin = bBox.GetX();
417  xmax = bBox.GetRight();
418  ymin = bBox.GetY();
419  ymax = bBox.GetBottom();
420 
421  xmin = std::min( xmin, m_crossBarO.x );
422  xmin = std::min( xmin, m_crossBarF.x );
423  ymin = std::min( ymin, m_crossBarO.y );
424  ymin = std::min( ymin, m_crossBarF.y );
425  xmax = std::max( xmax, m_crossBarO.x );
426  xmax = std::max( xmax, m_crossBarF.x );
427  ymax = std::max( ymax, m_crossBarO.y );
428  ymax = std::max( ymax, m_crossBarF.y );
429 
430  xmin = std::min( xmin, m_featureLineGO.x );
431  xmin = std::min( xmin, m_featureLineGF.x );
432  ymin = std::min( ymin, m_featureLineGO.y );
433  ymin = std::min( ymin, m_featureLineGF.y );
434  xmax = std::max( xmax, m_featureLineGO.x );
435  xmax = std::max( xmax, m_featureLineGF.x );
436  ymax = std::max( ymax, m_featureLineGO.y );
437  ymax = std::max( ymax, m_featureLineGF.y );
438 
439  xmin = std::min( xmin, m_featureLineDO.x );
440  xmin = std::min( xmin, m_featureLineDF.x );
441  ymin = std::min( ymin, m_featureLineDO.y );
442  ymin = std::min( ymin, m_featureLineDF.y );
443  xmax = std::max( xmax, m_featureLineDO.x );
444  xmax = std::max( xmax, m_featureLineDF.x );
445  ymax = std::max( ymax, m_featureLineDO.y );
446  ymax = std::max( ymax, m_featureLineDF.y );
447 
448  bBox.SetX( xmin );
449  bBox.SetY( ymin );
450  bBox.SetWidth( xmax - xmin + 1 );
451  bBox.SetHeight( ymax - ymin + 1 );
452 
453  bBox.Normalize();
454 
455  return bBox;
456 }
457 
458 
459 wxString DIMENSION::GetSelectMenuText( EDA_UNITS aUnits ) const
460 {
461  return wxString::Format( _( "Dimension \"%s\" on %s" ), GetText(), GetLayerName() );
462 }
463 
464 
466 {
467  return add_dimension_xpm;
468 }
469 
470 
472 {
473  BOX2I dimBBox = BOX2I( VECTOR2I( GetBoundingBox().GetPosition() ),
474  VECTOR2I( GetBoundingBox().GetSize() ) );
475  dimBBox.Merge( m_Text.ViewBBox() );
476 
477  return dimBBox;
478 }
479 
480 
482 {
483  return new DIMENSION( *this );
484 }
485 
487 {
488  assert( aImage->Type() == PCB_DIMENSION_T );
489 
490  std::swap( *((DIMENSION*) this), *((DIMENSION*) aImage) );
491 }
double To_User_Unit(EDA_UNITS aUnit, double aValue, bool aUseMils)
Function To_User_Unit convert aValue in internal units to the appropriate user units defined by aUnit...
Definition: base_units.cpp:92
EDA_UNITS
Definition: common.h:198
extended_type Cross(const VECTOR2< T > &aVector) const
Function Cross() computes cross product of self with aVector.
Definition: vector2d.h:484
void SetTextAngle(double aAngle) override
void Offset(const wxPoint &aOffset)
Definition: eda_text.h:252
BOX2< VECTOR2I > BOX2I
Definition: box2.h:521
void SetPosition(const wxPoint &aPos) override
PNG memory record (file in memory).
Definition: bitmap_def.h:29
TEXTE_PCB class definition.
void SetText(const wxString &NewText)
virtual void SetLayer(PCB_LAYER_ID aLayer)
Function SetLayer sets the layer this item is on.
Implementation of conversion functions that require both schematic and board internal units.
wxPoint m_crossBarF
int m_Height
length of feature lines
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
wxPoint m_arrowD1F
int GetX() const
Definition: eda_rect.h:111
DIMENSION(BOARD_ITEM *aParent)
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
Function FlippedLayerNumber.
Definition: lset.cpp:485
EDA_RECT 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:217
void SetTextPos(const wxPoint &aPoint)
Definition: eda_text.h:246
virtual const BOX2I ViewBBox() const override
Function ViewBBox() returns the bounding box of the item covering all its layers.
double GetTextAngle() const
Definition: eda_text.h:173
double RAD2DECIDEG(double rad)
Definition: trigo.h:219
TEXTE_PCB m_Text
void SetHeight(int aHeight, int aPrecision)
Function SetHeight Sets the length of feature lines.
int m_Shape
Currently always 0.
wxPoint m_featureLineDF
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:208
void NORMALIZE_ANGLE_POS(T &Angle)
Definition: trigo.h:257
void Mirror(const wxPoint &axis_pos, bool aMirrorLeftRight=false)
Function Mirror Mirror the Dimension , relative to a given horizontal axis the text is not mirrored.
The base class for create windows for drawing purpose.
wxString GetAbbreviatedUnitsLabel(EDA_UNITS aUnit, bool aUseMils, EDA_DATA_TYPE aType)
Get the units string for a given units type.
Definition: base_units.cpp:495
VECTOR2< int > VECTOR2I
Definition: vector2d.h:594
bool Contains(const wxPoint &aPoint) const
Function Contains.
void SetLayer(PCB_LAYER_ID aLayer) override
Function SetLayer sets the layer this item is on.
int GetEffectiveTextPenWidth(int aDefaultWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth.
Definition: eda_text.cpp:152
int GetBottom() const
Definition: eda_rect.h:124
int GetTextHeight() const
Definition: eda_text.h:244
bool TestSegmentHit(const wxPoint &aRefPoint, wxPoint aStart, wxPoint aEnd, int aDist)
Test if aRefPoint is with aDistance on the line defined by aStart and aEnd.
Definition: trigo.cpp:129
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for displ...
wxPoint m_featureLineGO
PCB_LAYER_ID m_Layer
DIMENSION class definition.
void Flip(const wxPoint &aCentre, bool aFlipLeftRight) override
Function Flip Flip this object, i.e.
PCB_LAYER_ID
A quick note on layer IDs:
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
bool m_UseMils
If inches, use mils.
void SetOrigin(const wxPoint &aOrigin, int aPrecision)
Function SetOrigin Sets a new origin of the crossbar line.
virtual void SetText(const wxString &aText)
Definition: eda_text.cpp:116
void SetEnd(const wxPoint &aEnd, int aPrecision)
Function SetEnd Sets a new end of the crossbar line.
void SetHeight(int val)
Definition: eda_rect.h:186
wxPoint m_arrowG1F
int GetRight() const
Definition: eda_rect.h:121
wxPoint m_arrowD2F
wxPoint m_arrowG2F
virtual void SwapData(BOARD_ITEM *aImage) override
Swap data between aItem and aImage.
void SetX(int val)
Definition: eda_rect.h:168
const BITMAP_OPAQUE add_dimension_xpm[1]
BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Function Merge modifies the position and size of the rectangle in order to contain aRect.
Definition: box2.h:385
void SetWidth(int val)
Definition: eda_rect.h:180
class DIMENSION, a dimension (graphic item)
Definition: typeinfo.h:100
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
bool HitTest(const wxPoint &aPosition, int aAccuracy) const override
Function HitTest tests if aPosition is contained within or on the bounding box of an item.
void SetY(int val)
Definition: eda_rect.h:174
int m_Width
Line width.
void AdjustDimensionDetails(int aPrecision)
Function AdjustDimensionDetails Calculate coordinates of segments used to draw the dimension.
void Normalize()
Function Normalize ensures that the height ant width are positive.
#define INVERT(pos)
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
double DEG2RAD(double deg)
Definition: trigo.h:214
#define _(s)
Definition: 3d_actions.cpp:33
void Move(const wxPoint &offset) override
Function Move.
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
virtual bool TextHitTest(const wxPoint &aPoint, int aAccuracy=0) const
Test if aPoint is within the bounds of this object.
Definition: eda_text.cpp:370
int GetY() const
Definition: eda_rect.h:112
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:68
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:159
bool Intersects(const EDA_RECT &aRect) const
Function Intersects tests for a common area between rectangles.
const wxPoint & GetTextPos() const
Definition: eda_text.h:247
wxPoint m_crossBarO
const wxPoint GetPosition() const override
T EuclideanNorm() const
Destructor.
Definition: vector2d.h:299
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for displ...
const wxString GetText() const
void UpdateHeight()
Function UpdateHeight Updates stored height basing on points coordinates.
virtual const BOX2I ViewBBox() const override
Function ViewBBox() returns the bounding box of the item covering all its layers.
wxString GetLayerName() const
Function GetLayerName returns the name of the PCB layer on which the item resides.
wxPoint m_featureLineDO
virtual PCB_LAYER_ID GetLayer() const
Function GetLayer returns the primary layer this item is on.
int m_Value
value of PCB dimensions.
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:126
void Rotate(const wxPoint &aRotCentre, double aAngle) override
Function Rotate Rotate this object.
DIMENSION.
EDA_UNITS m_Unit
0 = inches, 1 = mm
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Function Inflate inflates the rectangle horizontally by dx and vertically by dy.
KICAD_T Type() const
Function Type()
Definition: base_struct.h:193
wxPoint m_featureLineGF