KiCad PCB EDA Suite
eda_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) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2004-2017 KiCad Developers, see change_log.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
30 #include <eda_text.h>
31 #include <draw_graphic_text.h>
32 #include <eda_rect.h>
33 #include <macros.h>
34 #include <trigo.h> // RotatePoint
35 #include <class_drawpanel.h> // EDA_DRAW_PANEL
36 
37 #include <basic_gal.h>
38 #include <unit_format.h>
39 #include <convert_to_biu.h>
40 
41 EDA_TEXT::EDA_TEXT( const wxString& text ) :
42  m_Text( text ),
43  m_e( 1<<TE_VISIBLE )
44 {
45  int sz = Mils2iu( DEFAULT_SIZE_TEXT );
46  SetTextSize( wxSize( sz, sz ) );
47 }
48 
49 
51 {
52 }
53 
54 
55 void EDA_TEXT::SetEffects( const EDA_TEXT& aSrc )
56 {
57  m_e = aSrc.m_e;
58 }
59 
60 
61 void EDA_TEXT::SwapEffects( EDA_TEXT& aTradingPartner )
62 {
63  std::swap( m_e, aTradingPartner.m_e );
64 }
65 
66 
67 int EDA_TEXT::LenSize( const wxString& aLine, int aThickness ) const
68 {
71  basic_gal.SetLineWidth( aThickness );
73 
74  VECTOR2D tsize = basic_gal.GetTextLineSize( aLine );
75 
76  return KiROUND( tsize.x );
77 }
78 
79 
81 {
82  wxString tmp = GetShownText();
83 
84  tmp.Replace( wxT( "\n" ), wxT( " " ) );
85  tmp.Replace( wxT( "\r" ), wxT( " " ) );
86  tmp.Replace( wxT( "\t" ), wxT( " " ) );
87 
88  if( tmp.Length() > 15 )
89  tmp = tmp.Left( 12 ) + wxT( "..." );
90 
91  return tmp;
92 }
93 
94 
95 int EDA_TEXT::GetInterline( int aTextThickness ) const
96 {
97  int thickness = aTextThickness <= 0 ? GetThickness() : aTextThickness;
98 
99  return KiROUND( KIGFX::STROKE_FONT::GetInterline( GetTextHeight(), thickness ) );
100 }
101 
102 
103 EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const
104 {
105  EDA_RECT rect;
106  wxArrayString strings;
107  wxString text = GetShownText();
108  int thickness = ( aThickness < 0 ) ? GetThickness() : aThickness;
109  int linecount = 1;
110  bool hasOverBar = false; // true if the first line of text as an overbar
111 
112  if( IsMultilineAllowed() )
113  {
114  wxStringSplit( text, strings, '\n' );
115 
116  if( strings.GetCount() ) // GetCount() == 0 for void strings
117  {
118  if( aLine >= 0 && (aLine < (int)strings.GetCount()) )
119  text = strings.Item( aLine );
120  else
121  text = strings.Item( 0 );
122 
123  linecount = strings.GetCount();
124  }
125  }
126 
127  // Search for overbar symbol. Only text is scanned,
128  // because only this line can change the bounding box
129  for( unsigned ii = 1; ii < text.size(); ii++ )
130  {
131  if( text[ii-1] == '~' && text[ii] != '~' )
132  {
133  hasOverBar = true;
134  break;
135  }
136  }
137 
138  // calculate the H and V size
140  text, VECTOR2D( GetTextSize() ), double( thickness ) ).x );
141  int dy = GetInterline( thickness );
142 
143  // Creates bounding box (rectangle) for an horizontal
144  // and left and top justified text. the bounding box will be moved later
145  // according to the actual text options
146  wxSize textsize = wxSize( dx, dy );
147  wxPoint pos = GetTextPos();
148 
149  if( aInvertY )
150  pos.y = -pos.y;
151 
152  rect.SetOrigin( pos );
153 
154  // The bbox vertical size returned by GetInterline( aThickness )
155  // includes letters like j and y and ] + interval between lines.
156  // The interval below the last line is not usefull, and we can use its half value
157  // as vertical margin above the text
158  // the full interval is roughly GetTextHeight() * 0.4 - aThickness/2
159  rect.Move( wxPoint( 0, thickness/4 - KiROUND( GetTextHeight() * 0.22 ) ) );
160 
161  if( hasOverBar )
162  { // A overbar adds an extra size to the text
163  // Height from the base line text of chars like [ or {
164  double curr_height = GetTextHeight() * 1.15;
165  int extra_height = KiROUND(
166  basic_gal.GetStrokeFont().ComputeOverbarVerticalPosition( GetTextHeight(), thickness ) - curr_height );
167  extra_height += thickness/2;
168  textsize.y += extra_height;
169  rect.Move( wxPoint( 0, -extra_height ) );
170  }
171 
172  // for multiline texts and aLine < 0, merge all rectangles
173  // ( if aLine < 0, we want the full text bounding box )
174  if( IsMultilineAllowed() && aLine < 0 )
175  {
176  for( unsigned ii = 1; ii < strings.GetCount(); ii++ )
177  {
178  text = strings.Item( ii );
180  text, VECTOR2D( GetTextSize() ), double( thickness ) ).x );
181  textsize.x = std::max( textsize.x, dx );
182  textsize.y += dy;
183  }
184  }
185 
186  rect.SetSize( textsize );
187 
188  /* Now, calculate the rect origin, according to text justification
189  * At this point the rectangle origin is the text origin (m_Pos).
190  * This is true only for left and top text justified texts (using top to bottom Y axis
191  * orientation). and must be recalculated for others justifications
192  * also, note the V justification is relative to the first line
193  */
194  switch( GetHorizJustify() )
195  {
197  if( IsMirrored() )
198  rect.SetX( rect.GetX() - rect.GetWidth() );
199  break;
200 
202  rect.SetX( rect.GetX() - (rect.GetWidth() / 2) );
203  break;
204 
206  if( !IsMirrored() )
207  rect.SetX( rect.GetX() - rect.GetWidth() );
208  break;
209  }
210 
211  dy = GetTextHeight() + thickness;
212 
213  switch( GetVertJustify() )
214  {
216  break;
217 
219  rect.SetY( rect.GetY() - ( dy / 2) );
220  break;
221 
223  rect.SetY( rect.GetY() - dy );
224  break;
225  }
226 
227  if( linecount > 1 )
228  {
229  int yoffset;
230  linecount -= 1;
231 
232  switch( GetVertJustify() )
233  {
235  break;
236 
238  yoffset = linecount * GetInterline() / 2;
239  rect.SetY( rect.GetY() - yoffset );
240  break;
241 
243  yoffset = linecount * GetInterline( aThickness );
244  rect.SetY( rect.GetY() - yoffset );
245  break;
246  }
247  }
248 
249  rect.Normalize(); // Make h and v sizes always >= 0
250 
251  return rect;
252 }
253 
254 
255 bool EDA_TEXT::TextHitTest( const wxPoint& aPoint, int aAccuracy ) const
256 {
257  EDA_RECT rect = GetTextBox( -1 ); // Get the full text area.
258  wxPoint location = aPoint;
259 
260  rect.Inflate( aAccuracy );
261  RotatePoint( &location, GetTextPos(), -GetTextAngle() );
262 
263  return rect.Contains( location );
264 }
265 
266 
267 bool EDA_TEXT::TextHitTest( const EDA_RECT& aRect, bool aContains, int aAccuracy ) const
268 {
269  EDA_RECT rect = aRect;
270 
271  rect.Inflate( aAccuracy );
272 
273  if( aContains )
274  return rect.Contains( GetTextBox( -1 ) );
275 
276  return rect.Intersects( GetTextBox( -1 ), GetTextAngle() );
277 }
278 
279 
280 void EDA_TEXT::Draw( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset,
281  COLOR4D aColor, GR_DRAWMODE aDrawMode,
282  EDA_DRAW_MODE_T aFillMode, COLOR4D aAnchor_color )
283 {
284  if( IsMultilineAllowed() )
285  {
286  std::vector<wxPoint> positions;
287  wxArrayString strings;
288  wxStringSplit( GetShownText(), strings, '\n' );
289 
290  positions.reserve( strings.Count() );
291 
292  GetPositionsOfLinesOfMultilineText( positions, strings.Count() );
293 
294  for( unsigned ii = 0; ii < strings.Count(); ii++ )
295  {
296  wxString& txt = strings.Item( ii );
297  drawOneLineOfText( aClipBox, aDC, aOffset, aColor,
298  aDrawMode, aFillMode, txt, positions[ii] );
299  }
300  }
301  else
302  drawOneLineOfText( aClipBox, aDC, aOffset, aColor,
303  aDrawMode, aFillMode, GetShownText(), GetTextPos() );
304 
305  // Draw text anchor, if requested
306  if( aAnchor_color != COLOR4D::UNSPECIFIED )
307  {
308  GRDrawAnchor( aClipBox, aDC,
309  GetTextPos().x + aOffset.x, GetTextPos().y + aOffset.y,
310  DIM_ANCRE_TEXTE, aAnchor_color );
311  }
312 }
313 
314 
316  std::vector<wxPoint>& aPositions, int aLineCount ) const
317 {
318  wxPoint pos = GetTextPos(); // Position of first line of the
319  // multiline text according to
320  // the center of the multiline text block
321 
322  wxPoint offset; // Offset to next line.
323 
324  offset.y = GetInterline();
325 
326  if( aLineCount > 1 )
327  {
328  switch( GetVertJustify() )
329  {
331  break;
332 
334  pos.y -= ( aLineCount - 1 ) * offset.y / 2;
335  break;
336 
338  pos.y -= ( aLineCount - 1 ) * offset.y;
339  break;
340  }
341  }
342 
343  // Rotate the position of the first line
344  // around the center of the multiline text block
345  RotatePoint( &pos, GetTextPos(), GetTextAngle() );
346 
347  // Rotate the offset lines to increase happened in the right direction
348  RotatePoint( &offset, GetTextAngle() );
349 
350  for( int ii = 0; ii < aLineCount; ii++ )
351  {
352  aPositions.push_back( pos );
353  pos += offset;
354  }
355 }
356 
357 void EDA_TEXT::drawOneLineOfText( EDA_RECT* aClipBox, wxDC* aDC,
358  const wxPoint& aOffset, COLOR4D aColor,
359  GR_DRAWMODE aDrawMode, EDA_DRAW_MODE_T aFillMode,
360  const wxString& aText, const wxPoint &aPos )
361 {
362  int width = GetThickness();
363 
364  if( aDrawMode != UNSPECIFIED_DRAWMODE )
365  GRSetDrawMode( aDC, aDrawMode );
366 
367  if( aFillMode == SKETCH )
368  width = -width;
369 
370  wxSize size = GetTextSize();
371 
372  if( IsMirrored() )
373  size.x = -size.x;
374 
375  DrawGraphicText( aClipBox, aDC, aOffset + aPos, aColor, aText, GetTextAngle(), size,
377  width, IsItalic(), IsBold() );
378 }
379 
380 
382 {
383  int style = 0;
384 
385  if( IsItalic() )
386  style = 1;
387 
388  if( IsBold() )
389  style += 2;
390 
391  wxString stylemsg[4] = {
392  _("Normal"),
393  _("Italic"),
394  _("Bold"),
395  _("Bold+Italic")
396  };
397 
398  return stylemsg[style];
399 }
400 
401 
403 {
404  return ( IsVisible()
405  && !IsMirrored()
408  && GetThickness() == 0
409  && !IsItalic()
410  && !IsBold()
411  && !IsMultilineAllowed()
412  );
413 }
414 
415 
416 void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControlBits ) const
417 {
418 #ifndef GERBVIEW // Gerbview does not use EDA_TEXT::Format
419  // and does not define FMT_IU, used here
420  // however this function should exist
421 
422  aFormatter->Print( aNestLevel + 1, "(effects" );
423 
424  // Text size
425  aFormatter->Print( 0, " (font" );
426 
427  aFormatter->Print( 0, " (size %s %s)",
428  FMT_IU( GetTextHeight() ).c_str(),
429  FMT_IU( GetTextWidth() ).c_str() );
430 
431  if( GetThickness() )
432  aFormatter->Print( 0, " (thickness %s)", FMT_IU( GetThickness() ).c_str() );
433 
434  if( IsBold() )
435  aFormatter->Print( 0, " bold" );
436 
437  if( IsItalic() )
438  aFormatter->Print( 0, " italic" );
439 
440  aFormatter->Print( 0, ")"); // (font
441 
442  if( IsMirrored() ||
445  {
446  aFormatter->Print( 0, " (justify");
447 
449  aFormatter->Print( 0, (GetHorizJustify() == GR_TEXT_HJUSTIFY_LEFT) ? " left" : " right" );
450 
452  aFormatter->Print( 0, (GetVertJustify() == GR_TEXT_VJUSTIFY_TOP) ? " top" : " bottom" );
453 
454  if( IsMirrored() )
455  aFormatter->Print( 0, " mirror" );
456  aFormatter->Print( 0, ")" ); // (justify
457  }
458 
459  if( !(aControlBits & CTL_OMIT_HIDE) && !IsVisible() )
460  aFormatter->Print( 0, " hide" );
461 
462  aFormatter->Print( 0, ")\n" ); // (justify
463 
464 #endif
465 }
466 
467 // Convert the text shape to a list of segment
468 // each segment is stored as 2 wxPoints: its starting point and its ending point
469 // we are using DrawGraphicText to create the segments.
470 // and therefore a call-back function is needed
471 
472 // This is a call back function, used by DrawGraphicText to put each segment in buffer
473 static void addTextSegmToBuffer( int x0, int y0, int xf, int yf, void* aData )
474 {
475  std::vector<wxPoint>* cornerBuffer = static_cast<std::vector<wxPoint>*>( aData );
476  cornerBuffer->push_back( wxPoint( x0, y0 ) );
477  cornerBuffer->push_back( wxPoint( xf, yf ) );
478 }
479 
480 void EDA_TEXT::TransformTextShapeToSegmentList( std::vector<wxPoint>& aCornerBuffer ) const
481 {
482  wxSize size = GetTextSize();
483 
484  if( IsMirrored() )
485  size.x = -size.x;
486 
487  COLOR4D color = COLOR4D::BLACK; // not actually used, but needed by DrawGraphicText
488 
489  if( IsMultilineAllowed() )
490  {
491  wxArrayString strings_list;
492  wxStringSplit( GetShownText(), strings_list, wxChar('\n') );
493  std::vector<wxPoint> positions;
494  positions.reserve( strings_list.Count() );
495  GetPositionsOfLinesOfMultilineText( positions,strings_list.Count() );
496 
497  for( unsigned ii = 0; ii < strings_list.Count(); ii++ )
498  {
499  wxString txt = strings_list.Item( ii );
500  DrawGraphicText( NULL, NULL, positions[ii], color,
501  txt, GetTextAngle(), size,
503  GetThickness(), IsItalic(),
504  true, addTextSegmToBuffer, &aCornerBuffer );
505  }
506  }
507  else
508  {
509  DrawGraphicText( NULL, NULL, GetTextPos(), color,
510  GetText(), GetTextAngle(), size,
512  GetThickness(), IsItalic(),
513  true, addTextSegmToBuffer, &aCornerBuffer );
514  }
515 }
EDA_TEXT(const wxString &text=wxEmptyString)
Definition: eda_text.cpp:41
void wxStringSplit(const wxString &aText, wxArrayString &aStrings, wxChar aSplitter)
Split aString to a string list separated at aSplitter.
Definition: common.cpp:183
void SetFontItalic(const bool aItalic)
Set italic property of current font.
int GetInterline(int aTextThickness=-1) const
Return the distance between two lines of text.
Definition: eda_text.cpp:95
static double GetInterline(double aGlyphHeight, double aGlyphThickness)
Compute the distance (interline) between 2 lines of text (for multiline texts).
void SwapEffects(EDA_TEXT &aTradingPartner)
Function SwapEffects swaps the text effects of the two involved instances.
Definition: eda_text.cpp:61
void Move(const wxPoint &aMoveVector)
Function Move moves the rectangle by the aMoveVector.
#define DEFAULT_SIZE_TEXT
This is the "default-of-the-default" hardcoded text size; individual application define their own def...
Definition: eda_text.h:87
bool IsMultilineAllowed() const
Definition: eda_text.h:201
wxString ShortenedShownText() const
Returns a shortened version (max 15 characters) of the shown text.
Definition: eda_text.cpp:80
void GRSetDrawMode(wxDC *DC, GR_DRAWMODE draw_mode)
Definition: gr_basic.cpp:223
const wxPoint & GetTextPos() const
Definition: eda_text.h:237
int LenSize(const wxString &aLine, int aThickness) const
Function LenSize.
Definition: eda_text.cpp:67
static int KiROUND(double v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: common.h:120
bool IsItalic() const
Definition: eda_text.h:183
bool Contains(const wxPoint &aPoint) const
Function Contains.
void SetEffects(const EDA_TEXT &aSrc)
Function SetEffects sets the text effects from another instance.
Definition: eda_text.cpp:55
TEXT_EFFECTS m_e
Definition: eda_text.h:399
int color
Definition: DXF_plotter.cpp:62
int GetTextWidth() const
Definition: eda_text.h:231
VECTOR2D ComputeStringBoundaryLimits(const UTF8 &aText, const VECTOR2D &aGlyphSize, double aGlyphThickness) const
Compute the boundary limits of aText (the bounding box of all shapes).
static void addTextSegmToBuffer(int x0, int y0, int xf, int yf, void *aData)
Definition: eda_text.cpp:473
void SetOrigin(const wxPoint &pos)
Definition: eda_rect.h:124
void GRDrawAnchor(EDA_RECT *aClipBox, wxDC *aDC, int x, int y, int aSize, COLOR4D aColor)
Definition: gr_basic.cpp:1193
Class OUTPUTFORMATTER is an important interface (abstract class) used to output 8 bit text in a conve...
Definition: richio.h:327
void SetTextSize(const wxSize &aNewSize)
Definition: eda_text.h:227
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:216
Definition of base KiCad text object.
EDA_TEXT_HJUSTIFY_T GetHorizJustify() const
Definition: eda_text.h:203
void DrawGraphicText(EDA_RECT *aClipBox, wxDC *aDC, const wxPoint &aPos, COLOR4D aColor, const wxString &aText, double aOrient, const wxSize &aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, void(*aCallback)(int x0, int y0, int xf, int yf, void *aData), void *aCallbackData, PLOTTER *aPlotter)
Function DrawGraphicText Draw a graphic text (like module texts)
double GetTextAngle() const
Definition: eda_text.h:177
bool IsBold() const
Definition: eda_text.h:186
virtual void SetLineWidth(float aLineWidth)
Set the line width.
void drawOneLineOfText(EDA_RECT *aClipBox, wxDC *aDC, const wxPoint &aOffset, COLOR4D aColor, GR_DRAWMODE aDrawMode, EDA_DRAW_MODE_T aFillMode, const wxString &aText, const wxPoint &aPos)
Function drawOneLineOfText draws a single text line.
Definition: eda_text.cpp:357
int GetThickness() const
Function GetThickness returns pen width.
Definition: eda_text.h:167
This file contains miscellaneous commonly used macros and functions.
bool IsDefaultFormatting() const
Definition: eda_text.cpp:402
virtual wxString GetShownText() const
Returns the string actually shown after processing of the base text.
Definition: eda_text.h:148
Class EDA_TEXT is a mix-in class (via multiple inheritance) that handles texts such as labels...
Definition: eda_text.h:127
void SetFontBold(const bool aBold)
Set bold property of current font.
#define FMT_IU
EDA_RECT GetTextBox(int aLine=-1, int aThickness=-1, bool aInvertY=false) const
Function GetTextBox useful in multiline texts to calculate the full text or a line area (for zones fi...
Definition: eda_text.cpp:103
VECTOR2< double > VECTOR2D
Definition: vector2d.h:586
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:255
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:37
virtual void Format(OUTPUTFORMATTER *aFormatter, int aNestLevel, int aControlBits) const
Function Format outputs the object to aFormatter in s-expression form.
Definition: eda_text.cpp:416
EDA_DRAW_MODE_T
Definition: eda_text.h:77
const wxString & GetText() const
Function GetText returns the string associated with the text object.
Definition: eda_text.h:143
void GetPositionsOfLinesOfMultilineText(std::vector< wxPoint > &aPositions, int aLineCount) const
Function GetPositionsOfLinesOfMultilineText Populates aPositions with the position of each line of a ...
Definition: eda_text.cpp:315
void SetX(int val)
Definition: eda_rect.h:130
virtual ~EDA_TEXT()
Definition: eda_text.cpp:50
#define DIM_ANCRE_TEXTE
Definition: eda_text.h:88
void SetY(int val)
Definition: eda_rect.h:131
void Normalize()
Function Normalize ensures that the height ant width are positive.
EDA_TEXT_VJUSTIFY_T GetVertJustify() const
Definition: eda_text.h:204
void SetSize(const wxSize &size)
Definition: eda_rect.h:126
bool Intersects(const EDA_RECT &aRect) const
Function Intersects tests for a common area between rectangles.
wxString GetTextStyleName()
Function GetTextStyleName.
Definition: eda_text.cpp:381
#define max(a, b)
Definition: auxiliary.h:86
bool IsMirrored() const
Definition: eda_text.h:192
bool IsVisible() const
Definition: eda_text.h:189
void TransformTextShapeToSegmentList(std::vector< wxPoint > &aCornerBuffer) const
Convert the text shape to a list of segment each segment is stored as 2 wxPoints: the starting point ...
Definition: eda_text.cpp:480
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
int GetX() const
Definition: eda_rect.h:109
double ComputeOverbarVerticalPosition(double aGlyphHeight, double aGlyphThickness) const
Compute the vertical position of an overbar, sometimes used in texts.
int GetWidth() const
Definition: eda_rect.h:117
int GetY() const
Definition: eda_rect.h:110
int GetTextHeight() const
Definition: eda_text.h:234
void SetGlyphSize(const VECTOR2D aGlyphSize)
Set the font glyph size.
BASIC_GAL basic_gal(basic_displayOptions)
Definition: colors.h:45
const STROKE_FONT & GetStrokeFont() const
const wxSize & GetTextSize() const
Definition: eda_text.h:228
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Function Print formats and writes text to the output stream.
Definition: richio.cpp:404
#define CTL_OMIT_HIDE
Definition: eda_text.h:57
VECTOR2D GetTextLineSize(const UTF8 &aText) const
Compute the X and Y size of a given text.
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Function Inflate inflates the rectangle horizontally by dx and vertically by dy.
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:280
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39