KiCad PCB EDA Suite
cairo_gal.h
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 Torsten Hueter, torstenhtr <at> gmx.de
5  * Copyright (C) 2012-2020 Kicad Developers, see AUTHORS.txt for contributors.
6  * Copyright (C) 2017-2018 CERN
7  * @author Maciej Suminski <maciej.suminski@cern.ch>
8  *
9  * CairoGal - Graphics Abstraction Layer for Cairo
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, you may find one here:
23  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
24  * or you may search the http://www.gnu.org website for the version 2 license,
25  * or you may write to the Free Software Foundation, Inc.,
26  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
27  */
28 
29 #ifndef CAIROGAL_H_
30 #define CAIROGAL_H_
31 
32 #include <map>
33 #include <iterator>
34 
35 #include <cairo.h>
36 
38 #include <wx/dcbuffer.h>
39 
40 #include <memory>
41 
54 namespace KIGFX
55 {
56 class CAIRO_COMPOSITOR;
57 
58 class CAIRO_GAL_BASE : public GAL
59 {
60 public:
61  CAIRO_GAL_BASE( GAL_DISPLAY_OPTIONS& aDisplayOptions );
62 
64 
65  bool IsCairoEngine() override { return true; }
66 
67  // ---------------
68  // Drawing methods
69  // ---------------
70 
72  void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) override;
73 
75  void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ) override;
76 
78  void DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) override;
79 
81  void DrawArc( const VECTOR2D& aCenterPoint, double aRadius,
82  double aStartAngle, double aEndAngle ) override;
83 
85  void DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadius,
86  double aStartAngle, double aEndAngle, double aWidth ) override;
87 
89  void DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) override;
90 
92  void DrawPolyline( const std::deque<VECTOR2D>& aPointList ) override { drawPoly( aPointList ); }
93  void DrawPolyline( const VECTOR2D aPointList[], int aListSize ) override { drawPoly( aPointList, aListSize ); }
94  void DrawPolyline( const SHAPE_LINE_CHAIN& aLineChain ) override { drawPoly( aLineChain ); }
95 
97  void DrawPolygon( const std::deque<VECTOR2D>& aPointList ) override { drawPoly( aPointList ); }
98  void DrawPolygon( const VECTOR2D aPointList[], int aListSize ) override { drawPoly( aPointList, aListSize ); }
99  void DrawPolygon( const SHAPE_POLY_SET& aPolySet ) override;
100  void DrawPolygon( const SHAPE_LINE_CHAIN& aPolySet ) override;
101 
103  void DrawCurve( const VECTOR2D& startPoint, const VECTOR2D& controlPointA,
104  const VECTOR2D& controlPointB, const VECTOR2D& endPoint,
105  double aFilterValue = 0.0 ) override;
106 
108  void DrawBitmap( const BITMAP_BASE& aBitmap ) override;
109 
110  // --------------
111  // Screen methods
112  // --------------
113 
115  void ResizeScreen( int aWidth, int aHeight ) override;
116 
118  void Flush() override;
119 
121  void ClearScreen() override;
122 
123  // -----------------
124  // Attribute setting
125  // -----------------
126 
128  void SetIsFill( bool aIsFillEnabled ) override;
129 
131  void SetIsStroke( bool aIsStrokeEnabled ) override;
132 
134  void SetStrokeColor( const COLOR4D& aColor ) override;
135 
137  void SetFillColor( const COLOR4D& aColor ) override;
138 
140  void SetLineWidth( float aLineWidth ) override;
141 
143  void SetLayerDepth( double aLayerDepth ) override;
144 
145  // --------------
146  // Transformation
147  // --------------
148 
150  void Transform( const MATRIX3x3D& aTransformation ) override;
151 
153  void Rotate( double aAngle ) override;
154 
156  void Translate( const VECTOR2D& aTranslation ) override;
157 
159  void Scale( const VECTOR2D& aScale ) override;
160 
162  void Save() override;
163 
165  void Restore() override;
166 
167  // --------------------------------------------
168  // Group methods
169  // ---------------------------------------------
170 
172  int BeginGroup() override;
173 
175  void EndGroup() override;
176 
178  void DrawGroup( int aGroupNumber ) override;
179 
181  void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) override;
182 
184  void ChangeGroupDepth( int aGroupNumber, int aDepth ) override;
185 
187  void DeleteGroup( int aGroupNumber ) override;
188 
190  void ClearCache() override;
191 
192  // --------------------------------------------------------
193  // Handling the world <-> screen transformation
194  // --------------------------------------------------------
195 
197  void SetNegativeDrawMode( bool aSetting ) override;
198 
199  // -------
200  // Cursor
201  // -------
202 
204  void DrawCursor( const VECTOR2D& aCursorPosition ) override;
205 
206  void EnableDepthTest( bool aEnabled = false ) override;
207 
209  void DrawGrid() override;
210 
211 
212 protected:
213  // Geometric transforms according to the currentWorld2Screen transform matrix:
214  const double xform( double x ); // scale
215  const VECTOR2D xform( double x, double y ); // rotation, scale and offset
216  const VECTOR2D xform( const VECTOR2D& aP ); // rotation, scale and offset
217 
222  const double angle_xform( const double aAngle );
223 
229  void arc_angles_xform_and_normalize( double& aStartAngle, double& aEndAngle );
230 
232  void beginDrawing() override;
233 
235  void endDrawing() override;
236 
237  void resetContext();
238 
245  void drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint );
246  void drawGridCross( const VECTOR2D& aPoint );
247  void drawGridPoint( const VECTOR2D& aPoint, double aWidth, double aHeight );
248  void drawAxes( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint );
249 
251  typedef GAL super;
252 
254  static const int MAX_CAIRO_ARGUMENTS = 4;
255 
258  {
266  //CMD_TRANSFORM, ///< Transform the actual context
273  };
274 
276  typedef struct
277  {
279  union {
280  double dblArg[MAX_CAIRO_ARGUMENTS];
281  bool boolArg;
282  int intArg;
283  } argument;
284  cairo_path_t* cairoPath;
285  } GROUP_ELEMENT;
286 
287  // Variables for the grouping function
288  bool isGrouping;
290  typedef std::deque<GROUP_ELEMENT> GROUP;
291  std::map<int, GROUP> groups;
292  unsigned int groupCounter;
294 
298 
299  cairo_matrix_t cairoWorldScreenMatrix;
300  cairo_matrix_t currentXform;
301  cairo_matrix_t currentWorld2Screen;
302  cairo_t* currentContext;
303  cairo_t* context;
304  cairo_surface_t* surface;
305 
307  std::vector<cairo_surface_t*> imageSurfaces;
308 
309  std::vector<cairo_matrix_t> xformStack;
310 
311  void flushPath();
312  void storePath();
313 
317  void blitCursor( wxMemoryDC& clientDC );
318 
320  void drawPoly( const std::deque<VECTOR2D>& aPointList );
321  void drawPoly( const VECTOR2D aPointList[], int aListSize );
322  void drawPoly( const SHAPE_LINE_CHAIN& aLineChain );
323 
329  unsigned int getNewGroupNumber();
330 
331  void syncLineWidth( bool aForceWidth = false, double aWidth = 0.0 );
333  const VECTOR2D roundp( const VECTOR2D& v );
334 
335 
337  static constexpr cairo_format_t GAL_FORMAT = CAIRO_FORMAT_ARGB32;
338 };
339 
340 
341 class CAIRO_GAL : public CAIRO_GAL_BASE, public wxWindow
342 {
343 public:
359  CAIRO_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions,
360  wxWindow* aParent, wxEvtHandler* aMouseListener = NULL,
361  wxEvtHandler* aPaintListener = NULL, const wxString& aName = wxT( "CairoCanvas" ) );
362 
363  ~CAIRO_GAL();
364 
366  bool IsVisible() const override
367  {
368  return IsShownOnScreen() && !GetClientRect().IsEmpty();
369  }
370 
371  void ResizeScreen( int aWidth, int aHeight ) override;
372 
373  bool Show( bool aShow ) override;
374 
375  int BeginGroup() override;
376 
377  void EndGroup() override;
378 
379  void SetTarget( RENDER_TARGET aTarget ) override;
380 
381  RENDER_TARGET GetTarget() const override;
382 
383  void ClearTarget( RENDER_TARGET aTarget ) override;
384 
391  void PostPaint( wxPaintEvent& aEvent );
392 
393  void SetMouseListener( wxEvtHandler* aMouseListener )
394  {
395  mouseListener = aMouseListener;
396  }
397 
398  void SetPaintListener( wxEvtHandler* aPaintListener )
399  {
400  paintListener = aPaintListener;
401  }
402 
403 protected:
404  // Compositor related variables
405  std::shared_ptr<CAIRO_COMPOSITOR> compositor;
406  unsigned int mainBuffer;
407  unsigned int overlayBuffer;
410 
411  // Variables related to wxWidgets
412  wxWindow* parentWindow;
413  wxEvtHandler* mouseListener;
414  wxEvtHandler* paintListener;
415  unsigned int bufferSize;
416  unsigned char* wxOutput;
417 
418  // Variables related to Cairo <-> wxWidgets
419  unsigned char* bitmapBuffer;
420  int stride;
424 
426  void beginDrawing() override;
427 
429  void endDrawing() override;
430 
432  void initSurface();
433 
435  void deinitSurface();
436 
438  void allocateBitmaps();
439 
441  void deleteBitmaps();
442 
444  void setCompositor();
445 
446  // Event handlers
452  void onPaint( wxPaintEvent& aEvent );
453 
459  void skipMouseEvent( wxMouseEvent& aEvent );
460 
462  bool updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions ) override;
463 };
464 
465 } // namespace KIGFX
466 
467 #endif // CAIROGAL_H_
void SetNegativeDrawMode(bool aSetting) override
Sets negative draw mode in the renderer.
Definition: cairo_gal.cpp:920
void initSurface()
Prepare Cairo surfaces for drawing.
Definition: cairo_gal.cpp:1424
void DrawBitmap(const BITMAP_BASE &aBitmap) override
Draw a bitmap image.
Definition: cairo_gal.cpp:458
void ResizeScreen(int aWidth, int aHeight) override
Resizes the canvas.
Definition: cairo_gal.cpp:526
unsigned int groupCounter
Counter used for generating keys for groups.
Definition: cairo_gal.h:292
void EndGroup() override
End the group.
Definition: cairo_gal.cpp:771
void ChangeGroupColor(int aGroupNumber, const COLOR4D &aNewColor) override
Changes the color used to draw the group.
Definition: cairo_gal.cpp:868
bool boolArg
A bool argument.
Definition: cairo_gal.h:281
bool updatedGalDisplayOptions(const GAL_DISPLAY_OPTIONS &aOptions) override
Cairo-specific update handlers
Definition: cairo_gal.cpp:1508
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: color4d.cpp:175
CAIRO_GAL(GAL_DISPLAY_OPTIONS &aDisplayOptions, wxWindow *aParent, wxEvtHandler *aMouseListener=NULL, wxEvtHandler *aPaintListener=NULL, const wxString &aName=wxT("CairoCanvas"))
Constructor CAIRO_GAL_BASE.
Definition: cairo_gal.cpp:1209
void ResizeScreen(int aWidth, int aHeight) override
Resizes the canvas.
Definition: cairo_gal.cpp:1322
void deinitSurface()
Destroy Cairo surfaces when are not needed anymore.
Definition: cairo_gal.cpp:1444
void SetIsStroke(bool aIsStrokeEnabled) override
Enable/disable stroked outlines.
Definition: cairo_gal.cpp:561
void EnableDepthTest(bool aEnabled=false) override
Definition: cairo_gal.cpp:932
void ChangeGroupDepth(int aGroupNumber, int aDepth) override
Changes the depth (Z-axis position) of the group.
Definition: cairo_gal.cpp:886
cairo_surface_t * surface
Cairo surface.
Definition: cairo_gal.h:304
void onPaint(wxPaintEvent &aEvent)
Paint event handler.
Definition: cairo_gal.cpp:1494
std::deque< GROUP_ELEMENT > GROUP
A graphic group type definition.
Definition: cairo_gal.h:290
void Translate(const VECTOR2D &aTranslation) override
Translate the context.
Definition: cairo_gal.cpp:675
CAIRO_GAL_BASE(GAL_DISPLAY_OPTIONS &aDisplayOptions)
Definition: cairo_gal.cpp:49
void setCompositor()
Prepare the compositor.
Definition: cairo_gal.cpp:1479
void storePath()
Store the actual path.
Definition: cairo_gal.cpp:1055
Type definition for an graphics group element.
Definition: cairo_gal.h:276
void DeleteGroup(int aGroupNumber) override
Delete the group from the memory.
Definition: cairo_gal.cpp:893
static const int MAX_CAIRO_ARGUMENTS
Maximum number of arguments for one command.
Definition: cairo_gal.h:254
bool isInitialized
Are Cairo image & surface ready to use.
Definition: cairo_gal.h:422
void PostPaint(wxPaintEvent &aEvent)
Function PostPaint posts an event to m_paint_listener.
Definition: cairo_gal.cpp:1312
unsigned int overlayBuffer
Handle to the overlay buffer.
Definition: cairo_gal.h:407
void drawAxes(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Definition: cairo_gal.cpp:969
bool IsVisible() const override
Definition: cairo_gal.h:366
Enable/disable filling.
Definition: cairo_gal.h:259
void SetLayerDepth(double aLayerDepth) override
Set the depth of the layer (position on the z-axis)
Definition: cairo_gal.cpp:631
std::vector< cairo_matrix_t > xformStack
Definition: cairo_gal.h:309
GAL super
Super class definition.
Definition: cairo_gal.h:251
bool validCompositor
Compositor initialization flag.
Definition: cairo_gal.h:409
const double angle_xform(const double aAngle)
Transform according to the rotation from currentWorld2Screen transform matrix:
Definition: cairo_gal.cpp:128
GRAPHICS_COMMAND
Definitions for the command recorder.
Definition: cairo_gal.h:257
void DrawPolyline(const VECTOR2D aPointList[], int aListSize) override
Definition: cairo_gal.h:93
This class handle bitmap images in KiCad.
Definition: bitmap_base.h:51
void ClearCache() override
Delete all data created during caching of graphic items.
Definition: cairo_gal.cpp:913
void DrawCircle(const VECTOR2D &aCenterPoint, double aRadius) override
Draw a circle using world coordinates.
Definition: cairo_gal.cpp:289
RENDER_TARGET currentTarget
Current rendering target.
Definition: cairo_gal.h:408
unsigned char * wxOutput
wxImage comaptible buffer
Definition: cairo_gal.h:416
void DrawSegment(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth) override
Draw a rounded segment.
Definition: cairo_gal.cpp:235
void DrawPolygon(const VECTOR2D aPointList[], int aListSize) override
Definition: cairo_gal.h:98
void drawGridPoint(const VECTOR2D &aPoint, double aWidth, double aHeight)
Definition: cairo_gal.cpp:1019
void ClearScreen() override
Clear the screen.
Definition: cairo_gal.cpp:538
void ClearTarget(RENDER_TARGET aTarget) override
Clears the target for rendering.
Definition: cairo_gal.cpp:1398
void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) override
Draw a line.
Definition: cairo_gal.cpp:197
#define NULL
GROUP * currentGroup
Currently used group.
Definition: cairo_gal.h:293
std::vector< cairo_surface_t * > imageSurfaces
List of surfaces that were created by painting images, to be cleaned up later.
Definition: cairo_gal.h:307
SHAPE_POLY_SET.
std::shared_ptr< CAIRO_COMPOSITOR > compositor
Object for layers compositing.
Definition: cairo_gal.h:405
void endDrawing() override
Definition: cairo_gal.cpp:100
void SetPaintListener(wxEvtHandler *aPaintListener)
Definition: cairo_gal.h:398
std::map< int, GROUP > groups
List of graphic groups.
Definition: cairo_gal.h:291
void DrawArcSegment(const VECTOR2D &aCenterPoint, double aRadius, double aStartAngle, double aEndAngle, double aWidth) override
Draw an arc segment.
Definition: cairo_gal.cpp:341
cairo_t * context
Cairo image.
Definition: cairo_gal.h:303
void DrawPolygon(const std::deque< VECTOR2D > &aPointList) override
Draw a polygon.
Definition: cairo_gal.h:97
bool isGrouping
Is grouping enabled ?
Definition: cairo_gal.h:288
void updateWorldScreenMatrix()
Definition: cairo_gal.cpp:106
COLOR4D backgroundColor
Background color.
Definition: cairo_gal.h:423
void DrawCursor(const VECTOR2D &aCursorPosition) override
Draw the cursor.
Definition: cairo_gal.cpp:926
wxEvtHandler * paintListener
Paint listener.
Definition: cairo_gal.h:414
const double xform(double x)
Definition: cairo_gal.cpp:174
cairo_path_t * cairoPath
Pointer to a Cairo path.
Definition: cairo_gal.h:284
void SetTarget(RENDER_TARGET aTarget) override
Sets the target for rendering.
Definition: cairo_gal.cpp:1364
void skipMouseEvent(wxMouseEvent &aEvent)
Mouse event handler, forwards the event to the child.
Definition: cairo_gal.cpp:1500
Save the transformation matrix.
Definition: cairo_gal.h:270
void SetIsFill(bool aIsFillEnabled) override
Enable/disable fill.
Definition: cairo_gal.cpp:546
const VECTOR2D roundp(const VECTOR2D &v)
Definition: cairo_gal.cpp:188
void DrawArc(const VECTOR2D &aCenterPoint, double aRadius, double aStartAngle, double aEndAngle) override
Draw an arc.
Definition: cairo_gal.cpp:305
void DrawPolyline(const std::deque< VECTOR2D > &aPointList) override
Draw a polyline.
Definition: cairo_gal.h:92
int stride
Stride value for Cairo.
Definition: cairo_gal.h:420
void SetStrokeColor(const COLOR4D &aColor) override
Set the stroke color.
Definition: cairo_gal.cpp:576
cairo_matrix_t currentXform
Definition: cairo_gal.h:300
void DrawRectangle(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) override
Draw a rectangle.
Definition: cairo_gal.cpp:401
void beginDrawing() override
Definition: cairo_gal.cpp:1260
void Restore() override
Restore the context.
Definition: cairo_gal.cpp:733
bool Show(bool aShow) override
Shows/hides the GAL canvas.
Definition: cairo_gal.cpp:1339
int BeginGroup() override
Begin a group.
Definition: cairo_gal.cpp:755
void arc_angles_xform_and_normalize(double &aStartAngle, double &aEndAngle)
Transform according to the rotation from currentWorld2Screen transform matrix for the start angle and...
Definition: cairo_gal.cpp:142
RENDER_TARGET GetTarget() const override
Gets the currently used target for rendering.
Definition: cairo_gal.cpp:1392
SHAPE_LINE_CHAIN.
GRAPHICS_COMMAND command
Command to execute.
Definition: cairo_gal.h:278
void drawPoly(const std::deque< VECTOR2D > &aPointList)
Drawing polygons & polylines is the same in cairo, so here is the common code.
Definition: cairo_gal.cpp:1121
cairo_matrix_t cairoWorldScreenMatrix
Cairo world to screen transformation matrix.
Definition: cairo_gal.h:299
void DrawGrid() override
Definition: cairo_gal.cpp:1532
Translate the context.
Definition: cairo_gal.h:268
void Save() override
Save the context.
Definition: cairo_gal.cpp:715
void beginDrawing() override
Definition: cairo_gal.cpp:94
void endDrawing() override
Definition: cairo_gal.cpp:1274
void SetMouseListener(wxEvtHandler *aMouseListener)
Definition: cairo_gal.h:393
void drawGridLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a grid line (usually a simplified line function).
Definition: cairo_gal.cpp:986
void SetLineWidth(float aLineWidth) override
Set the line width.
Definition: cairo_gal.cpp:612
void Scale(const VECTOR2D &aScale) override
Scale the context.
Definition: cairo_gal.cpp:695
void deleteBitmaps()
Allocate the bitmaps for drawing.
Definition: cairo_gal.cpp:1472
cairo_t * currentContext
Currently used Cairo context for drawing.
Definition: cairo_gal.h:302
void DrawGroup(int aGroupNumber) override
Draw the stored group.
Definition: cairo_gal.cpp:778
unsigned int bufferSize
Size of buffers cairoOutput, bitmapBuffers.
Definition: cairo_gal.h:415
void syncLineWidth(bool aForceWidth=false, double aWidth=0.0)
Definition: cairo_gal.cpp:211
int BeginGroup() override
Begin a group.
Definition: cairo_gal.cpp:1350
RENDER_TARGET
RENDER_TARGET: Possible rendering targets.
Definition: definitions.h:46
bool isElementAdded
Was an graphic element added ?
Definition: cairo_gal.h:289
wxEvtHandler * mouseListener
Mouse listener.
Definition: cairo_gal.h:413
unsigned char * bitmapBuffer
Storage of the cairo image.
Definition: cairo_gal.h:419
void allocateBitmaps()
Allocate the bitmaps for drawing.
Definition: cairo_gal.cpp:1458
void Transform(const MATRIX3x3D &aTransformation) override
Transform the context.
Definition: cairo_gal.cpp:638
bool IsCairoEngine() override
Returns true if the GAL engine is a cairo based type.
Definition: cairo_gal.h:65
unsigned int mainBuffer
Handle to the main buffer.
Definition: cairo_gal.h:406
void DrawCurve(const VECTOR2D &startPoint, const VECTOR2D &controlPointA, const VECTOR2D &controlPointB, const VECTOR2D &endPoint, double aFilterValue=0.0) override
Draw a cubic bezier spline.
Definition: cairo_gal.cpp:436
wxWindow * parentWindow
Parent window.
Definition: cairo_gal.h:412
void EndGroup() override
End the group.
Definition: cairo_gal.cpp:1357
void Flush() override
Force all remaining objects to be drawn.
Definition: cairo_gal.cpp:532
Enable/disable stroking.
Definition: cairo_gal.h:260
unsigned int getNewGroupNumber()
Returns a valid key that can be used as a new group number.
Definition: cairo_gal.cpp:1197
cairo_matrix_t currentWorld2Screen
Definition: cairo_gal.h:301
void blitCursor(wxMemoryDC &clientDC)
Blits cursor into the current screen.
Definition: cairo_gal.cpp:1103
Restore the transformation matrix.
Definition: cairo_gal.h:271
void SetFillColor(const COLOR4D &aColor) override
Set the fill color.
Definition: cairo_gal.cpp:594
void drawGridCross(const VECTOR2D &aPoint)
Definition: cairo_gal.cpp:999
Class GAL is the abstract interface for drawing on a 2D-surface.
void Rotate(double aAngle) override
Rotate the context.
Definition: cairo_gal.cpp:656
static constexpr cairo_format_t GAL_FORMAT
Format used to store pixels.
Definition: cairo_gal.h:337
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:100
void DrawPolyline(const SHAPE_LINE_CHAIN &aLineChain) override
Definition: cairo_gal.h:94