KiCad PCB EDA Suite
page_layout_graphic_items.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) 1992-2013 Jean-Pierre Charras <jp.charras at wanadoo.fr>.
5  * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
6  *
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  */
30 /*
31  * the class WORKSHEET_DATAITEM (and WORKSHEET_DATAITEM_TEXT) defines
32  * a basic shape of a page layout ( frame references and title block )
33  * Basic shapes are line, rect and texts
34  * the WORKSHEET_DATAITEM coordinates units is the mm, and are relative to
35  * one of 4 page corners.
36  *
37  * These items cannot be drawn or plot "as this". they should be converted
38  * to a "draw list" (WS_DRAW_ITEM_BASE and derived items)
39 
40  * The list of these items is stored in a WORKSHEET_LAYOUT instance.
41  *
42  * When building the draw list:
43  * the WORKSHEET_LAYOUT is used to create a WS_DRAW_ITEM_LIST
44  * coordinates are converted to draw/plot coordinates.
45  * texts are expanded if they contain format symbols.
46  * Items with m_RepeatCount > 1 are created m_RepeatCount times
47  *
48  * the WORKSHEET_LAYOUT is created only once.
49  * the WS_DRAW_ITEM_LIST is created each time the page layout is plotted/drawn
50  *
51  * the WORKSHEET_LAYOUT instance is created from a S expression which
52  * describes the page layout (can be the default page layout or a custom file).
53  */
54 
55 #include <fctsys.h>
56 #include <class_eda_rect.h>
57 #include <drawtxt.h>
58 #include <worksheet.h>
59 #include <class_title_block.h>
63 
64 /* a helper function to draw graphic symbols at start point or end point of
65  * an item.
66  * The start point symbol is a filled rectangle
67  * The start point symbol is a filled circle
68  */
69 inline void drawMarker( EDA_RECT* aClipBox, wxDC* aDC,
70  const wxPoint& aPos, int aSize, bool aEndPointShape = false )
71 {
72  int markerHalfSize = aSize/2;
73 
74  if( aEndPointShape )
75  GRFilledCircle( aClipBox, aDC, aPos.x, aPos.y, markerHalfSize,
76  0, GREEN, GREEN );
77  else
78  GRFilledRect( aClipBox, aDC,
79  aPos.x - markerHalfSize, aPos.y - markerHalfSize,
80  aPos.x + markerHalfSize, aPos.y + markerHalfSize,
81  0, GREEN, GREEN );
82 }
83 
84 
85 /* Draws the item list created by BuildWorkSheetGraphicList
86  * aClipBox = the clipping rect, or NULL if no clipping
87  * aDC = the current Device Context
88  * The not selected items are drawn first (most of items)
89  * The selected items are drawn after (usually 0 or 1)
90  * to be sure they are seen, even for overlapping items
91  */
92 void WS_DRAW_ITEM_LIST::Draw( EDA_RECT* aClipBox, wxDC* aDC )
93 {
94  // The not selected items are drawn first (most of items)
95  for( WS_DRAW_ITEM_BASE* item = GetFirst(); item; item = GetNext() )
96  {
97  if( item->GetParent() && item->GetParent()->IsSelected() )
98  continue;
99 
100  item->DrawWsItem( aClipBox, aDC );
101  }
102 
103  // The selected items are drawn after (usually 0 or 1)
104  int markerSize = WORKSHEET_DATAITEM::GetMarkerSizeUi();
105 
106  for( WS_DRAW_ITEM_BASE* item = GetFirst(); item; item = GetNext() )
107  {
108  if( !item->GetParent() || !item->GetParent()->IsSelected() )
109  continue;
110 
111  item->DrawWsItem( aClipBox, aDC );
112 
113  switch( item->GetType() )
114  {
116  {
117  WS_DRAW_ITEM_LINE* line = (WS_DRAW_ITEM_LINE*) item;
118 
119  if( markerSize )
120  {
121  drawMarker( aClipBox, aDC, line->GetStart(), markerSize );
122  drawMarker( aClipBox, aDC, line->GetEnd(), markerSize, true );
123  }
124  }
125  break;
126 
128  {
129  WS_DRAW_ITEM_RECT* rect = (WS_DRAW_ITEM_RECT*) item;
130 
131  if( markerSize )
132  {
133  drawMarker( aClipBox, aDC, rect->GetStart(), markerSize );
134  drawMarker( aClipBox, aDC, rect->GetEnd(), markerSize, true );
135  }
136  }
137  break;
138 
140  {
141  WS_DRAW_ITEM_TEXT* text = (WS_DRAW_ITEM_TEXT*) item;
142 
143  if( markerSize )
144  drawMarker( aClipBox, aDC, text->GetTextPos(),
145  markerSize );
146  }
147  break;
148 
150  {
152 
153  if( markerSize )
154  {
155  drawMarker( aClipBox, aDC, poly->GetPosition(),
156  markerSize );
157  }
158  }
159  break;
160 
162  {
163  WS_DRAW_ITEM_BITMAP* bitmap = (WS_DRAW_ITEM_BITMAP*) item;
164 
165  if( markerSize )
166  {
167  drawMarker( aClipBox, aDC, bitmap->GetPosition(),
168  markerSize );
169  }
170  }
171  break;
172  }
173  }
174 }
175 
176 
178  wxString& aText, wxPoint aPos, wxSize aSize,
179  int aPenWidth, COLOR4D aColor,
180  bool aItalic, bool aBold ) :
181  WS_DRAW_ITEM_BASE( aParent, wsg_text, aColor ), EDA_TEXT( aText )
182 {
183  SetTextPos( aPos );
184  SetTextSize( aSize );
185  SetThickness( aPenWidth );
186  SetItalic( aItalic );
187  SetBold( aBold );
188 }
189 
190 
191 void WS_DRAW_ITEM_TEXT::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset,
192  GR_DRAWMODE aDrawMode, COLOR4D aColor )
193 {
194  Draw( aClipBox, aDC, aOffset,
195  aColor == COLOR4D::UNSPECIFIED ? GetColor() : aColor,
196  aDrawMode == UNSPECIFIED_DRAWMODE ? GR_COPY : aDrawMode,
197  FILLED, COLOR4D::UNSPECIFIED );
198 }
199 
200 
201 bool WS_DRAW_ITEM_TEXT::HitTest( const wxPoint& aPosition) const
202 {
203  return EDA_TEXT::TextHitTest( aPosition, 0 );
204 }
205 
206 
207 bool WS_DRAW_ITEM_TEXT::HitTest( const EDA_RECT& aRect ) const
208 {
209  return EDA_TEXT::TextHitTest( aRect, 0, 0 );
210 }
211 
212 
214 {
215  wxPoint pos = GetTextPos();
216 
217  if( std::abs( pos.x - aPosition.x) <= WORKSHEET_DATAITEM::GetMarkerSizeUi()/2 &&
218  std::abs( pos.y - aPosition.y) <= WORKSHEET_DATAITEM::GetMarkerSizeUi()/2 )
219  return true;
220 
221  return false;
222 }
223 
224 
225 void WS_DRAW_ITEM_POLYGON::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset,
226  GR_DRAWMODE aDrawMode, COLOR4D aColor )
227 {
228  std::vector<wxPoint> points_moved;
229  wxPoint *points;
230 
231  if( aOffset.x || aOffset.y )
232  {
233  for( auto point: m_Corners )
234  points_moved.push_back( point + aOffset );
235  points = &points_moved[0];
236  }
237  else
238  {
239  points = &m_Corners[0];
240  }
241 
242  auto color = ( aColor == COLOR4D::UNSPECIFIED ) ? GetColor() : aColor;
243 
244  GRSetDrawMode( aDC, ( aDrawMode == UNSPECIFIED_DRAWMODE ? GR_COPY : aDrawMode ) );
245  GRPoly( aClipBox, aDC,
246  m_Corners.size(), points,
248  GetPenWidth(),
249  color, color );
250  GRSetDrawMode( aDC, GR_COPY );
251 }
252 
253 
254 bool WS_DRAW_ITEM_POLYGON::HitTest( const wxPoint& aPosition) const
255 {
256  return TestPointInsidePolygon( &m_Corners[0],
257  m_Corners.size(), aPosition );
258 }
259 
260 
261 bool WS_DRAW_ITEM_POLYGON::HitTest( const EDA_RECT& aRect ) const
262 {
263  // Intersection of two polygons is nontrivial. Test if the rectangle intersects
264  // each line, instead.
265 
266  if( m_Corners.size() < 2 )
267  return false;
268 
269  for( size_t i = 1; i < m_Corners.size(); ++i )
270  {
271  if( aRect.Intersects( m_Corners[i - 1], m_Corners[i] ) )
272  return true;
273  }
274 
275  return false;
276 }
277 
278 
280 {
281  wxPoint pos = GetPosition();
282 
283  if( std::abs( pos.x - aPosition.x) <= WORKSHEET_DATAITEM::GetMarkerSizeUi()/2 &&
284  std::abs( pos.y - aPosition.y) <= WORKSHEET_DATAITEM::GetMarkerSizeUi()/2 )
285  return true;
286 
287  return false;
288 }
289 
290 
291 void WS_DRAW_ITEM_RECT::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset,
292  GR_DRAWMODE aDrawMode, COLOR4D aColor )
293 {
294  GRSetDrawMode( aDC, ( aDrawMode == UNSPECIFIED_DRAWMODE ? GR_COPY : aDrawMode ) );
295  GRRect( aClipBox, aDC,
296  GetStart().x + aOffset.x, GetStart().y + aOffset.y,
297  GetEnd().x + aOffset.x, GetEnd().y + aOffset.y,
298  GetPenWidth(),
299  ( aColor == COLOR4D::UNSPECIFIED ) ? GetColor() : aColor );
300  GRSetDrawMode( aDC, GR_COPY );
301 }
302 
303 
304 bool WS_DRAW_ITEM_RECT::HitTest( const wxPoint& aPosition ) const
305 {
306  int dist = GetPenWidth()/2;
307  wxPoint start = GetStart();
308  wxPoint end;
309  end.x = GetEnd().x;
310  end.y = start.y;
311 
312  // Upper line
313  if( TestSegmentHit( aPosition, start, end, dist ) )
314  return true;
315 
316  // Right line
317  start = end;
318  end.y = GetEnd().y;
319  if( TestSegmentHit( aPosition, start, end, dist ) )
320  return true;
321 
322  // lower line
323  start = end;
324  end.x = GetStart().x;
325  if( TestSegmentHit( aPosition, start, end, dist ) )
326  return true;
327 
328  // left line
329  start = end;
330  end = GetStart();
331  if( TestSegmentHit( aPosition, start, end, dist ) )
332  return true;
333 
334  return false;
335 }
336 
337 
338 bool WS_DRAW_ITEM_RECT::HitTest( const EDA_RECT& aRect ) const
339 {
340  wxPoint start = GetStart();
341  wxPoint end;
342  end.x = GetEnd().x;
343  end.y = start.y;
344 
345  // Upper line
346  if( aRect.Intersects( start, end ) )
347  return true;
348 
349  // Right line
350  start = end;
351  end.y = GetEnd().y;
352  if( aRect.Intersects( start, end ) )
353  return true;
354 
355  // lower line
356  start = end;
357  end.x = GetStart().x;
358  if( aRect.Intersects( start, end ) )
359  return true;
360 
361  // left line
362  start = end;
363  end = GetStart();
364  if( aRect.Intersects( start, end ) )
365  return true;
366 
367  return false;
368 }
369 
370 
372 {
373  wxPoint dist = GetStart() - aPosition;
374 
375  if( std::abs( dist.x) <= WORKSHEET_DATAITEM::GetMarkerSizeUi()/2 &&
377  return true;
378 
379  return false;
380 }
381 
382 
384 {
385  wxPoint pos = GetEnd();
386 
387  int dist = (int) hypot( pos.x - aPosition.x, pos.y - aPosition.y );
388 
389  if( dist <= WORKSHEET_DATAITEM::GetMarkerSizeUi()/2 )
390  return true;
391 
392  return false;
393 }
394 
395 
396 void WS_DRAW_ITEM_LINE::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset,
397  GR_DRAWMODE aDrawMode, COLOR4D aColor )
398 {
399  GRSetDrawMode( aDC, ( aDrawMode == UNSPECIFIED_DRAWMODE ) ? GR_COPY : aDrawMode );
400  GRLine( aClipBox, aDC, GetStart() + aOffset, GetEnd() + aOffset,
401  GetPenWidth(),
402  ( aColor == COLOR4D::UNSPECIFIED ) ? GetColor() : aColor );
403  GRSetDrawMode( aDC, GR_COPY );
404 }
405 
406 
407 bool WS_DRAW_ITEM_LINE::HitTest( const wxPoint& aPosition) const
408 {
409  return TestSegmentHit( aPosition, GetStart(), GetEnd(), GetPenWidth()/2 );
410 }
411 
412 
413 bool WS_DRAW_ITEM_LINE::HitTest( const EDA_RECT& aRect ) const
414 {
415  return aRect.Intersects( GetStart(), GetEnd() );
416 }
417 
418 
420 {
421  wxPoint dist = GetStart() - aPosition;
422 
423  if( std::abs( dist.x) <= WORKSHEET_DATAITEM::GetMarkerSizeUi()/2 &&
425  return true;
426 
427  return false;
428 }
429 
430 
432 {
433  wxPoint dist = GetEnd() - aPosition;
434 
435  if( std::abs( dist.x) <= WORKSHEET_DATAITEM::GetMarkerSizeUi()/2 &&
437  return true;
438 
439  return false;
440 }
441 
442 
443 void WS_DRAW_ITEM_LIST::Locate( std::vector <WS_DRAW_ITEM_BASE*>& aList,
444  const wxPoint& aPosition)
445 {
446  for( WS_DRAW_ITEM_BASE* item = GetFirst(); item; item = GetNext() )
447  {
448  item->m_Flags &= ~(LOCATE_STARTPOINT|LOCATE_ENDPOINT);
449  bool found = false;
450 
451  if( item->HitTestStartPoint ( aPosition ) )
452  {
453  item->m_Flags |= LOCATE_STARTPOINT;
454  found = true;
455  }
456 
457  if( item->HitTestEndPoint ( aPosition ) )
458  {
459  item->m_Flags |= LOCATE_ENDPOINT;
460  found = true;
461  }
462 
463  if( found || item->HitTest( aPosition ) )
464  {
465  aList.push_back( item );
466  }
467  }
468 }
469 
470 
471 void WS_DRAW_ITEM_BITMAP::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset,
472  GR_DRAWMODE aDrawMode, COLOR4D aColor )
473 {
475 
476  if( parent->m_ImageBitmap )
477  {
478  GRSetDrawMode( aDC, ( aDrawMode == UNSPECIFIED_DRAWMODE ) ? GR_COPY : aDrawMode );
479  parent->m_ImageBitmap->DrawBitmap( NULL, aDC, m_pos + aOffset );
480  GRSetDrawMode( aDC, GR_COPY );
481  }
482 }
483 
484 
485 bool WS_DRAW_ITEM_BITMAP::HitTest( const wxPoint& aPosition) const
486 {
487  const WORKSHEET_DATAITEM_BITMAP* parent = static_cast<const WORKSHEET_DATAITEM_BITMAP*>( GetParent() );
488 
489  if( parent->m_ImageBitmap == NULL )
490  return false;
491 
492  EDA_RECT rect = parent->m_ImageBitmap->GetBoundingBox();
493  rect.Move( m_pos );
494  return rect.Contains( aPosition );
495 }
496 
497 
498 bool WS_DRAW_ITEM_BITMAP::HitTest( const EDA_RECT& aRect ) const
499 {
500  const WORKSHEET_DATAITEM_BITMAP* parent = static_cast<const WORKSHEET_DATAITEM_BITMAP*>( GetParent() );
501 
502  if( parent->m_ImageBitmap == NULL )
503  return false;
504 
505  EDA_RECT rect = parent->m_ImageBitmap->GetBoundingBox();
506  rect.Move( m_pos );
507  return rect.Intersects( aRect );
508 }
509 
510 
515 {
516  wxPoint dist = m_pos - aPosition;
517 
518  if( std::abs( dist.x) <= WORKSHEET_DATAITEM::GetMarkerSizeUi()/2 &&
520  return true;
521 
522  return false;
523 }
524 
virtual void DrawWsItem(EDA_RECT *aClipBox, wxDC *aDC, const wxPoint &aOffset, GR_DRAWMODE aDrawMode, COLOR4D aColor=COLOR4D::UNSPECIFIED) override
The function to draw a WS_DRAW_ITEM_POLYGON.
void GRPoly(EDA_RECT *ClipBox, wxDC *DC, int n, wxPoint Points[], bool Fill, int width, COLOR4D Color, COLOR4D BgColor)
Definition: gr_basic.cpp:767
void Move(const wxPoint &aMoveVector)
Function Move moves the rectangle by the aMoveVector.
virtual bool HitTestStartPoint(const wxPoint &aPosition) override
return true if the point aPosition is on the starting point of this item.
void GRSetDrawMode(wxDC *DC, GR_DRAWMODE draw_mode)
Definition: gr_basic.cpp:290
const wxPoint & GetTextPos() const
Definition: eda_text.h:224
bool Contains(const wxPoint &aPoint) const
Function Contains.
virtual bool HitTestEndPoint(const wxPoint &aPosition) override
return true if the point aPosition is on the ending point of this item This is avirtual function whic...
void GRLine(EDA_RECT *ClipBox, wxDC *DC, int x1, int y1, int x2, int y2, int width, COLOR4D Color)
Definition: gr_basic.cpp:352
WS_DRAW_ITEM_BASE * GetNext()
void GRFilledRect(EDA_RECT *ClipBox, wxDC *DC, int x1, int y1, int x2, int y2, COLOR4D Color, COLOR4D BgColor)
Definition: gr_basic.cpp:1117
void SetItalic(bool isItalic)
Definition: eda_text.h:169
void SetTextPos(const wxPoint &aPoint)
Definition: eda_text.h:223
static const int dist[10][10]
Definition: dist.cpp:57
description of graphic items and texts to build a title block
virtual void DrawWsItem(EDA_RECT *aClipBox, wxDC *aDC, const wxPoint &aOffset, GR_DRAWMODE aDrawMode, COLOR4D aColor=COLOR4D::UNSPECIFIED) override
The function to draw a WS_DRAW_ITEM_LINE.
WS_DRAW_ITEM_BASE * GetFirst()
void SetTextSize(const wxSize &aNewSize)
Definition: eda_text.h:214
virtual bool HitTest(const wxPoint &aPosition) const override
Virtual function return true if the point aPosition is on the line.
virtual bool HitTest(const wxPoint &aPosition) const override
Virtual function return true if the point aPosition is inside one polygon.
virtual bool HitTest(const wxPoint &aPosition) const override
Virtual function return true if the point aPosition is on bitmap.
const EDA_RECT GetBoundingBox() const
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
void GRFilledCircle(EDA_RECT *ClipBox, wxDC *DC, int x, int y, int r, int width, COLOR4D Color, COLOR4D BgColor)
Definition: gr_basic.cpp:833
#define abs(a)
Definition: auxiliary.h:84
Class EDA_TEXT is a mix-in class (via multiple inheritance) that handles texts such as labels...
Definition: eda_text.h:114
virtual bool HitTestStartPoint(const wxPoint &aPosition) override
return true if the point aPosition is on the starting point of this item.
void GRRect(EDA_RECT *aClipBox, wxDC *aDC, int x1, int y1, int x2, int y2, COLOR4D aColor)
Definition: gr_basic.cpp:1077
void Locate(std::vector< WS_DRAW_ITEM_BASE * > &aList, const wxPoint &aPosition)
Locate graphic items in m_graphicList at location aPosition.
WS_DRAW_ITEM_TEXT(WORKSHEET_DATAITEM *aParent, wxString &aText, wxPoint aPos, wxSize aSize, int aPenWidth, COLOR4D aColor, bool aItalic=false, bool aBold=false)
bool TestPointInsidePolygon(const CPOLYGONS_LIST &aPolysList, int aIdxstart, int aIdxend, int aRefx, int aRefy)
Function TestPointInsidePolygon test if a point is inside or outside a polygon.
virtual void DrawWsItem(EDA_RECT *aClipBox, wxDC *aDC, const wxPoint &aOffset, GR_DRAWMODE aDrawMode, COLOR4D aColor=COLOR4D::UNSPECIFIED) override
The function to draw a WS_DRAW_ITEM_BITMAP.
virtual bool TextHitTest(const wxPoint &aPoint, int aAccuracy=0) const
Function TextHitTest Test if aPoint is within the bounds of this object.
Definition: eda_text.cpp:267
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:41
WORKSHEET_DATAITEM * GetParent() const
const wxPoint & GetEnd() const
COLOR4D GetColor() const
std::vector< wxPoint > m_Corners
#define LOCATE_STARTPOINT
bool Intersects(const EDA_RECT &aRect) const
Function Intersects tests for a common area between rectangles.
Definition: colors.h:58
const wxPoint & GetPosition()
Class EDA_RECT handles the component boundary box.
virtual bool HitTestEndPoint(const wxPoint &aPosition) override
return true if the point aPosition is on the ending point of this item This is avirtual function whic...
virtual void DrawWsItem(EDA_RECT *aClipBox, wxDC *aDC, const wxPoint &aOffset, GR_DRAWMODE aDrawMode, COLOR4D aColor=COLOR4D::UNSPECIFIED) override
The function to draw a WS_DRAW_ITEM_TEXT.
virtual bool HitTest(const wxPoint &aPosition) const override
Virtual function return true if the point aPosition is on the text.
This file is part of the common libary.
classes and function to generate graphics to plt or draw titles blocks and frame references ...
virtual bool HitTest(const wxPoint &aPosition) const override
Virtual function return true if the point aPosition is on one edge of the rectangle.
virtual void DrawWsItem(EDA_RECT *aClipBox, wxDC *aDC, const wxPoint &aOffset, GR_DRAWMODE aDrawMode, COLOR4D aColor=COLOR4D::UNSPECIFIED) override
The function to draw a WS_DRAW_ITEM_RECT.
virtual bool HitTestStartPoint(const wxPoint &aPosition) override
return true if the point aPosition is on the starting point of this item.
virtual bool HitTestStartPoint(const wxPoint &aPosition) override
return true if the point aPosition is on the reference point of this item.
const wxPoint & GetPosition() const
void Draw(EDA_RECT *aClipBox, wxDC *aDC)
Draws the item list created by BuildWorkSheetGraphicList.
bool TestSegmentHit(const wxPoint &aRefPoint, wxPoint aStart, wxPoint aEnd, int aDist)
Function TestSegmentHit test for hit on line segment i.e.
Definition: trigo.cpp:142
virtual bool HitTestStartPoint(const wxPoint &aPosition) override
return true if the point aPosition is on the starting point of this item.
void DrawBitmap(EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aPos)
#define LOCATE_ENDPOINT
void SetBold(bool aBold)
Definition: eda_text.h:172
void drawMarker(EDA_RECT *aClipBox, wxDC *aDC, const wxPoint &aPos, int aSize, bool aEndPointShape=false)
void SetThickness(int aNewThickness)
Function SetThickness sets pen width.
Definition: eda_text.h:148
void Draw(EDA_RECT *aClipBox, wxDC *aDC, const wxPoint &aOffset, COLOR4D aColor, GR_DRAWMODE aDrawMode, EDA_DRAW_MODE_T aDisplay_mode=FILLED, COLOR4D aAnchor_color=COLOR4D::UNSPECIFIED)
Function Draw.
Definition: eda_text.cpp:292
const wxPoint & GetStart() const
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39