KiCad PCB EDA Suite
CALLBACK_GAL Class Reference

#include <callback_gal.h>

Inheritance diagram for CALLBACK_GAL:
KIGFX::GAL KIGFX::GAL_DISPLAY_OPTIONS_OBSERVER

Public Member Functions

 CALLBACK_GAL (KIGFX::GAL_DISPLAY_OPTIONS &aDisplayOptions, std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2)> aStrokeCallback, std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2, const VECTOR2I &aPt3)> aTriangleCallback)
 
 CALLBACK_GAL (KIGFX::GAL_DISPLAY_OPTIONS &aDisplayOptions, std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2)> aStrokeCallback, std::function< void(const SHAPE_LINE_CHAIN &aPoly)> aOutlineCallback)
 
 CALLBACK_GAL (KIGFX::GAL_DISPLAY_OPTIONS &aDisplayOptions, std::function< void(const SHAPE_LINE_CHAIN &aPoly)> aOutlineCallback)
 
void DrawGlyph (const KIFONT::GLYPH &aGlyph, int aNth, int aTotal) override
 Draw a polygon representing an outline font glyph. More...
 
virtual bool IsInitialized () const
 Return the initialization status for the canvas. More...
 
virtual bool IsVisible () const
 Return true if the GAL canvas is visible on the screen. More...
 
virtual bool IsCairoEngine ()
 Return true if the GAL engine is a Cairo based type. More...
 
virtual bool IsOpenGlEngine ()
 Return true if the GAL engine is a OpenGL based type. More...
 
virtual void DrawLine (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
 Draw a line. More...
 
virtual void DrawSegment (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth)
 Draw a rounded segment. More...
 
virtual void DrawSegmentChain (const std::vector< VECTOR2D > &aPointList, double aWidth)
 Draw a chain of rounded segments. More...
 
virtual void DrawSegmentChain (const SHAPE_LINE_CHAIN &aLineChain, double aWidth)
 
virtual void DrawPolyline (const std::deque< VECTOR2D > &aPointList)
 Draw a polyline. More...
 
virtual void DrawPolyline (const std::vector< VECTOR2D > &aPointList)
 
virtual void DrawPolyline (const VECTOR2D aPointList[], int aListSize)
 
virtual void DrawPolyline (const SHAPE_LINE_CHAIN &aLineChain)
 
virtual void DrawPolylines (const std::vector< std::vector< VECTOR2D > > &aPointLists)
 Draw multiple polylines. More...
 
virtual void DrawCircle (const VECTOR2D &aCenterPoint, double aRadius)
 Draw a circle using world coordinates. More...
 
virtual void DrawArc (const VECTOR2D &aCenterPoint, double aRadius, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aEndAngle)
 Draw an arc. More...
 
virtual void DrawArcSegment (const VECTOR2D &aCenterPoint, double aRadius, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aEndAngle, double aWidth, double aMaxError)
 Draw an arc segment. More...
 
virtual void DrawRectangle (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
 Draw a rectangle. More...
 
void DrawRectangle (const BOX2I &aRect)
 
virtual void DrawGlyphs (const std::vector< std::unique_ptr< KIFONT::GLYPH > > &aGlyphs)
 Draw polygons representing font glyphs. More...
 
virtual void DrawPolygon (const std::deque< VECTOR2D > &aPointList)
 Draw a polygon. More...
 
virtual void DrawPolygon (const VECTOR2D aPointList[], int aListSize)
 
virtual void DrawPolygon (const SHAPE_POLY_SET &aPolySet, bool aStrokeTriangulation=false)
 
virtual void DrawPolygon (const SHAPE_LINE_CHAIN &aPolySet)
 
virtual void DrawCurve (const VECTOR2D &startPoint, const VECTOR2D &controlPointA, const VECTOR2D &controlPointB, const VECTOR2D &endPoint, double aFilterValue=0.0)
 Draw a cubic bezier spline. More...
 
virtual void DrawBitmap (const BITMAP_BASE &aBitmap, double alphaBlend=1.0)
 Draw a bitmap image. More...
 
virtual void ResizeScreen (int aWidth, int aHeight)
 Resize the canvas. More...
 
virtual bool Show (bool aShow)
 Show/hide the GAL canvas. More...
 
const VECTOR2IGetScreenPixelSize () const
 Return GAL canvas size in pixels. More...
 
virtual int GetSwapInterval () const
 Return the swap interval. -1 for adaptive, 0 for disabled/unknown. More...
 
virtual void Flush ()
 Force all remaining objects to be drawn. More...
 
void SetClearColor (const COLOR4D &aColor)
 
const COLOR4D & GetClearColor () const
 
virtual void ClearScreen ()
 Clear the screen. More...
 
virtual void SetIsFill (bool aIsFillEnabled)
 Enable/disable fill. More...
 
virtual void SetIsStroke (bool aIsStrokeEnabled)
 Enable/disable stroked outlines. More...
 
virtual void SetFillColor (const COLOR4D &aColor)
 Set the fill color. More...
 
const COLOR4D & GetFillColor () const
 Get the fill color. More...
 
virtual void SetStrokeColor (const COLOR4D &aColor)
 Set the stroke color. More...
 
const COLOR4D & GetStrokeColor () const
 Get the stroke color. More...
 
virtual void SetLineWidth (float aLineWidth)
 Set the line width. More...
 
float GetLineWidth () const
 Get the line width. More...
 
virtual void SetLayerDepth (double aLayerDepth)
 Set the depth of the layer (position on the z-axis) More...
 
virtual void BitmapText (const wxString &aText, const VECTOR2I &aPosition, const EDA_ANGLE &aAngle)
 Draw a text using a bitmap font. More...
 
void ResetTextAttributes ()
 Reset text attributes to default styling. More...
 
void SetGlyphSize (const VECTOR2I aSize)
 
const VECTOR2IGetGlyphSize () const
 
void SetFontBold (const bool aBold)
 
bool IsFontBold () const
 
void SetFontItalic (bool aItalic)
 
bool IsFontItalic () const
 
void SetFontUnderlined (bool aUnderlined)
 
bool IsFontUnderlined () const
 
void SetTextMirrored (const bool aMirrored)
 
bool IsTextMirrored () const
 
void SetHorizontalJustify (const GR_TEXT_H_ALIGN_T aHorizontalJustify)
 
GR_TEXT_H_ALIGN_T GetHorizontalJustify () const
 
void SetVerticalJustify (const GR_TEXT_V_ALIGN_T aVerticalJustify)
 
GR_TEXT_V_ALIGN_T GetVerticalJustify () const
 
virtual void Transform (const MATRIX3x3D &aTransformation)
 Transform the context. More...
 
virtual void Rotate (double aAngle)
 Rotate the context. More...
 
virtual void Translate (const VECTOR2D &aTranslation)
 Translate the context. More...
 
virtual void Scale (const VECTOR2D &aScale)
 Scale the context. More...
 
virtual void Save ()
 Save the context. More...
 
virtual void Restore ()
 Restore the context. More...
 
virtual int BeginGroup ()
 Begin a group. More...
 
virtual void EndGroup ()
 End the group. More...
 
virtual void DrawGroup (int aGroupNumber)
 Draw the stored group. More...
 
virtual void ChangeGroupColor (int aGroupNumber, const COLOR4D &aNewColor)
 Change the color used to draw the group. More...
 
virtual void ChangeGroupDepth (int aGroupNumber, int aDepth)
 Change the depth (Z-axis position) of the group. More...
 
virtual void DeleteGroup (int aGroupNumber)
 Delete the group from the memory. More...
 
virtual void ClearCache ()
 Delete all data created during caching of graphic items. More...
 
virtual void ComputeWorldScreenMatrix ()
 Compute the world <-> screen transformation matrix. More...
 
const MATRIX3x3DGetWorldScreenMatrix () const
 Get the world <-> screen transformation matrix. More...
 
const MATRIX3x3DGetScreenWorldMatrix () const
 Get the screen <-> world transformation matrix. More...
 
void SetWorldScreenMatrix (const MATRIX3x3D &aMatrix)
 Set the world <-> screen transformation matrix. More...
 
BOX2D GetVisibleWorldExtents () const
 
void SetWorldUnitLength (double aWorldUnitLength)
 Set the unit length. More...
 
void SetScreenSize (const VECTOR2I &aSize)
 
void SetScreenDPI (double aScreenDPI)
 Set the dots per inch of the screen. More...
 
void SetLookAtPoint (const VECTOR2D &aPoint)
 Get/set the Point in world space to look at. More...
 
const VECTOR2DGetLookAtPoint () const
 
void SetZoomFactor (double aZoomFactor)
 
double GetZoomFactor () const
 
void SetRotation (double aRotation)
 Get/set the rotation angle (in radians). More...
 
double GetRotation () const
 
void SetDepthRange (const VECTOR2D &aDepthRange)
 Set the range of the layer depth. More...
 
double GetMinDepth () const
 
double GetMaxDepth () const
 
double GetWorldScale () const
 Get the world scale. More...
 
void SetFlip (bool xAxis, bool yAxis)
 Sets flipping of the screen. More...
 
bool IsFlippedX () const
 
bool IsFlippedY () const
 
virtual void SetTarget (RENDER_TARGET aTarget)
 Set the target for rendering. More...
 
virtual RENDER_TARGET GetTarget () const
 Get the currently used target for rendering. More...
 
virtual void ClearTarget (RENDER_TARGET aTarget)
 Clear the target for rendering. More...
 
virtual bool HasTarget (RENDER_TARGET aTarget)
 Return true if the target exists. More...
 
virtual void SetNegativeDrawMode (bool aSetting)
 Set negative draw mode in the renderer. More...
 
virtual void StartDiffLayer ()
 Begins rendering of a differential layer. More...
 
virtual void EndDiffLayer ()
 Ends rendering of a differential layer. More...
 
virtual void StartNegativesLayer ()
 Begins rendering in a new layer that will be copied to the main layer in EndNegativesLayer(). More...
 
virtual void EndNegativesLayer ()
 Ends rendering of a negatives layer and draws it to the main layer. More...
 
void SetGridVisibility (bool aVisibility)
 Set the visibility setting of the grid. More...
 
bool GetGridVisibility () const
 
bool GetGridSnapping () const
 
void SetGridOrigin (const VECTOR2D &aGridOrigin)
 Set the origin point for the grid. More...
 
const VECTOR2DGetGridOrigin () const
 
void SetGridSize (const VECTOR2D &aGridSize)
 Set the grid size. More...
 
const VECTOR2DGetGridSize () const
 Return the grid size. More...
 
VECTOR2D GetVisibleGridSize () const
 Return the visible grid size in x and y directions. More...
 
void SetGridColor (const COLOR4D &aGridColor)
 Set the grid color. More...
 
void SetAxesColor (const COLOR4D &aAxesColor)
 Set the axes color. More...
 
void SetAxesEnabled (bool aAxesEnabled)
 Enable drawing the axes. More...
 
void SetCoarseGrid (int aInterval)
 Draw every tick line wider. More...
 
float GetGridLineWidth () const
 Get the grid line width. More...
 
virtual void DrawGrid ()
 
VECTOR2D GetGridPoint (const VECTOR2D &aPoint) const
 For a given point it returns the nearest point belonging to the grid in world coordinates. More...
 
VECTOR2D ToWorld (const VECTOR2D &aPoint) const
 Compute the point position in world coordinates from given screen coordinates. More...
 
VECTOR2D ToScreen (const VECTOR2D &aPoint) const
 Compute the point position in screen coordinates from given world coordinates. More...
 
virtual bool SetNativeCursorStyle (KICURSOR aCursor)
 Set the cursor in the native panel. More...
 
void SetCursorEnabled (bool aCursorEnabled)
 Enable/disable cursor. More...
 
bool IsCursorEnabled () const
 Return information about cursor visibility. More...
 
void SetCursorColor (const COLOR4D &aCursorColor)
 Set the cursor color. More...
 
virtual void DrawCursor (const VECTOR2D &aCursorPosition)
 Draw the cursor. More...
 
void AdvanceDepth ()
 Change the current depth to deeper, so it is possible to draw objects right beneath other. More...
 
void PushDepth ()
 Store current drawing depth on the depth stack. More...
 
void PopDepth ()
 Restore previously stored drawing depth for the depth stack. More...
 
virtual void EnableDepthTest (bool aEnabled=false)
 
virtual bool IsContextLocked ()
 Checks the state of the context lock. More...
 
virtual void LockContext (int aClientCookie)
 Use GAL_CONTEXT_LOCKER RAII object unless you know what you're doing. More...
 
virtual void UnlockContext (int aClientCookie)
 
virtual void BeginDrawing ()
 Start/end drawing functions, draw calls can be only made in between the calls to BeginDrawing()/EndDrawing(). More...
 
virtual void EndDrawing ()
 End the drawing, needs to be called for every new frame. More...
 

Protected Member Functions

virtual void beginUpdate ()
 Enable item update mode. More...
 
virtual void endUpdate ()
 Disable item update mode. More...
 
void computeWorldScale ()
 Compute the scaling factor for the world->screen matrix. More...
 
double computeMinGridSpacing () const
 compute minimum grid spacing from the grid settings More...
 
COLOR4D getCursorColor () const
 Get the actual cursor color to draw. More...
 
void OnGalDisplayOptionsChanged (const GAL_DISPLAY_OPTIONS &aOptions) override
 Handler for observer settings changes. More...
 
virtual bool updatedGalDisplayOptions (const GAL_DISPLAY_OPTIONS &aOptions)
 Handle updating display options. More...
 

Protected Attributes

GAL_DISPLAY_OPTIONS & m_options
 
UTIL::LINK m_observerLink
 
std::stack< double > m_depthStack
 Stored depth values. More...
 
VECTOR2I m_screenSize
 Screen size in screen coordinates. More...
 
double m_worldUnitLength
 The unit length of the world coordinates [inch]. More...
 
double m_screenDPI
 The dots per inch of the screen. More...
 
VECTOR2D m_lookAtPoint
 Point to be looked at in world space. More...
 
double m_zoomFactor
 The zoom factor. More...
 
double m_rotation
 Rotation transformation (radians) More...
 
MATRIX3x3D m_worldScreenMatrix
 World transformation. More...
 
MATRIX3x3D m_screenWorldMatrix
 Screen transformation. More...
 
double m_worldScale
 The scale factor world->screen. More...
 
bool m_globalFlipX
 Flag for X axis flipping. More...
 
bool m_globalFlipY
 Flag for Y axis flipping. More...
 
float m_lineWidth
 The line width. More...
 
bool m_isFillEnabled
 Is filling of graphic objects enabled ? More...
 
bool m_isStrokeEnabled
 Are the outlines stroked ? More...
 
COLOR4D m_fillColor
 The fill color. More...
 
COLOR4D m_strokeColor
 The color of the outlines. More...
 
COLOR4D m_clearColor
 
double m_layerDepth
 The actual layer depth. More...
 
VECTOR2D m_depthRange
 Range of the depth. More...
 
bool m_gridVisibility
 Should the grid be shown. More...
 
GRID_STYLE m_gridStyle
 Grid display style. More...
 
VECTOR2D m_gridSize
 The grid size. More...
 
VECTOR2D m_gridOrigin
 The grid origin. More...
 
VECTOR2D m_gridOffset
 The grid offset to compensate cursor position. More...
 
COLOR4D m_gridColor
 Color of the grid. More...
 
COLOR4D m_axesColor
 Color of the axes. More...
 
bool m_axesEnabled
 Should the axes be drawn. More...
 
int m_gridTick
 Every tick line gets the double width. More...
 
float m_gridLineWidth
 Line width of the grid. More...
 
int m_gridMinSpacing
 Minimum screen size of the grid (pixels) below which the grid is not drawn. More...
 
bool m_isCursorEnabled
 Is the cursor enabled? More...
 
bool m_forceDisplayCursor
 Always show cursor. More...
 
COLOR4D m_cursorColor
 Cursor color. More...
 
bool m_fullscreenCursor
 Shape of the cursor (fullscreen or small cross) More...
 
VECTOR2D m_cursorPosition
 Current cursor position (world coordinates) More...
 
KICURSOR m_currentNativeCursor
 Current cursor. More...
 

Static Protected Attributes

static const int MIN_DEPTH = -1024
 Possible depth range. More...
 
static const int MAX_DEPTH = 1023
 
static const int GRID_DEPTH = MAX_DEPTH - 1
 Depth level on which the grid is drawn. More...
 

Private Attributes

std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2)> m_strokeCallback
 
std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2, const VECTOR2I &aPt3)> m_triangleCallback
 
std::function< void(const SHAPE_LINE_CHAIN &aPoly)> m_outlineCallback
 
bool m_stroke
 
bool m_triangulate
 
TEXT_ATTRIBUTES m_attributes
 

Detailed Description

Definition at line 29 of file callback_gal.h.

Constructor & Destructor Documentation

◆ CALLBACK_GAL() [1/3]

CALLBACK_GAL::CALLBACK_GAL ( KIGFX::GAL_DISPLAY_OPTIONS aDisplayOptions,
std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2)>  aStrokeCallback,
std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2, const VECTOR2I &aPt3)>  aTriangleCallback 
)
inline

Definition at line 32 of file callback_gal.h.

37 :
38 GAL( aDisplayOptions )
39 {
40 m_strokeCallback = aStrokeCallback;
41 m_triangleCallback = aTriangleCallback;
42 m_outlineCallback = []( const SHAPE_LINE_CHAIN& ) {};
43 m_stroke = true;
44 m_triangulate = true;
45 }
std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2, const VECTOR2I &aPt3)> m_triangleCallback
Definition: callback_gal.h:82
bool m_triangulate
Definition: callback_gal.h:87
std::function< void(const SHAPE_LINE_CHAIN &aPoly)> m_outlineCallback
Definition: callback_gal.h:84
std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2)> m_strokeCallback
Definition: callback_gal.h:78
GAL(GAL_DISPLAY_OPTIONS &aOptions)
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...

References m_outlineCallback, m_stroke, m_strokeCallback, m_triangleCallback, and m_triangulate.

◆ CALLBACK_GAL() [2/3]

CALLBACK_GAL::CALLBACK_GAL ( KIGFX::GAL_DISPLAY_OPTIONS aDisplayOptions,
std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2)>  aStrokeCallback,
std::function< void(const SHAPE_LINE_CHAIN &aPoly)>  aOutlineCallback 
)
inline

Definition at line 47 of file callback_gal.h.

50 :
51 GAL( aDisplayOptions )
52 {
53 m_strokeCallback = aStrokeCallback;
54 m_triangleCallback = []( const VECTOR2I&, const VECTOR2I&, const VECTOR2I& ) {};
55 m_outlineCallback = aOutlineCallback;
56 m_stroke = true;
57 m_triangulate = false;
58 }

References m_outlineCallback, m_stroke, m_strokeCallback, m_triangleCallback, and m_triangulate.

◆ CALLBACK_GAL() [3/3]

CALLBACK_GAL::CALLBACK_GAL ( KIGFX::GAL_DISPLAY_OPTIONS aDisplayOptions,
std::function< void(const SHAPE_LINE_CHAIN &aPoly)>  aOutlineCallback 
)
inline

Definition at line 60 of file callback_gal.h.

61 :
62 GAL( aDisplayOptions )
63 {
64 m_strokeCallback = []( const VECTOR2I& aPt1, const VECTOR2I& aPt2 ) {};
65 m_triangleCallback = []( const VECTOR2I&, const VECTOR2I&, const VECTOR2I& ) {};
66 m_outlineCallback = aOutlineCallback;
67 m_stroke = false;
68 m_triangulate = false;
69 }

References m_outlineCallback, m_stroke, m_strokeCallback, m_triangleCallback, and m_triangulate.

Member Function Documentation

◆ AdvanceDepth()

void KIGFX::GAL::AdvanceDepth ( )
inlineinherited

Change the current depth to deeper, so it is possible to draw objects right beneath other.

Definition at line 932 of file graphics_abstraction_layer.h.

933 {
934 m_layerDepth -= 0.05;
935 }
double m_layerDepth
The actual layer depth.

References KIGFX::GAL::m_layerDepth.

Referenced by KIGFX::VIEW_GROUP::ViewDraw().

◆ BeginDrawing()

virtual void KIGFX::GAL::BeginDrawing ( )
inlinevirtualinherited

Start/end drawing functions, draw calls can be only made in between the calls to BeginDrawing()/EndDrawing().

Normally you should create a GAL_DRAWING_CONTEXT RAII object, but I'm leaving these functions public for more precise (i.e. timing/profiling) control of the drawing process - Tom Begin the drawing, needs to be called for every new frame. Use GAL_DRAWING_CONTEXT RAII object unless you know what you're doing.

Reimplemented in KIGFX::CAIRO_GAL_BASE, KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 978 of file graphics_abstraction_layer.h.

978{};

Referenced by KIGFX::GAL_DRAWING_CONTEXT::GAL_DRAWING_CONTEXT().

◆ BeginGroup()

virtual int KIGFX::GAL::BeginGroup ( )
inlinevirtualinherited

Begin a group.

A group is a collection of graphic items. Hierarchical groups are possible, attributes and transformations can be used.

Returns
the number of the group.

Reimplemented in KIGFX::CAIRO_GAL_BASE, KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 475 of file graphics_abstraction_layer.h.

475{ return 0; };

Referenced by KIGFX::VIEW::updateItemGeometry().

◆ beginUpdate()

virtual void KIGFX::GAL::beginUpdate ( )
inlineprotectedvirtualinherited

Enable item update mode.

Private: use GAL_UPDATE_CONTEXT RAII object

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 987 of file graphics_abstraction_layer.h.

987{}

Referenced by KIGFX::GAL_UPDATE_CONTEXT::GAL_UPDATE_CONTEXT().

◆ BitmapText()

void GAL::BitmapText ( const wxString &  aText,
const VECTOR2I aPosition,
const EDA_ANGLE aAngle 
)
virtualinherited

Draw a text using a bitmap font.

It should be faster than StrokeText(), but can be used only for non-Gerber elements.

Parameters
aTextis the text to be drawn.
aPositionis the text position in world coordinates.
aAngleis the text rotation angle.

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 260 of file graphics_abstraction_layer.cpp.

261{
263
264 if( aText.IsEmpty() )
265 return;
266
268 attrs.m_Angle = aAngle;
269 attrs.m_Mirrored = m_globalFlipX; // Prevent text flipping when view is flipped
270
271 // Bitmap font has different metrics than the stroke font so we compensate a bit before
272 // stroking
274 attrs.m_StrokeWidth = GetLineWidth() * 0.74;
275
276 font->Draw( this, aText, aPosition, attrs );
277}
FONT is an abstract base class for both outline and stroke fonts.
Definition: font.h:105
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false)
Definition: font.cpp:65
void Draw(KIGFX::GAL *aGal, const wxString &aText, const VECTOR2I &aPosition, const VECTOR2I &aCursor, const TEXT_ATTRIBUTES &aAttrs) const
Draw a string.
Definition: font.cpp:159
TEXT_ATTRIBUTES m_attributes
float GetLineWidth() const
Get the line width.
bool m_globalFlipX
Flag for X axis flipping.
VECTOR2< int > VECTOR2I
Definition: vector2d.h:618

References KIFONT::FONT::Draw(), KIFONT::FONT::GetFont(), KIGFX::GAL::GetLineWidth(), TEXT_ATTRIBUTES::m_Angle, KIGFX::GAL::m_attributes, KIGFX::GAL::m_globalFlipX, TEXT_ATTRIBUTES::m_Mirrored, TEXT_ATTRIBUTES::m_Size, TEXT_ATTRIBUTES::m_StrokeWidth, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), and KIGFX::VIEW_OVERLAY::COMMAND_BITMAP_TEXT::Execute().

◆ ChangeGroupColor()

virtual void KIGFX::GAL::ChangeGroupColor ( int  aGroupNumber,
const COLOR4D aNewColor 
)
inlinevirtualinherited

Change the color used to draw the group.

Parameters
aGroupNumberis the group number.
aNewColoris the new color.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 493 of file graphics_abstraction_layer.h.

493{};

Referenced by KIGFX::VIEW::UPDATE_COLOR_VISITOR::operator()(), KIGFX::VIEW::UpdateAllLayersColor(), and KIGFX::VIEW::updateItemColor().

◆ ChangeGroupDepth()

virtual void KIGFX::GAL::ChangeGroupDepth ( int  aGroupNumber,
int  aDepth 
)
inlinevirtualinherited

Change the depth (Z-axis position) of the group.

Parameters
aGroupNumberis the group number.
aDepthis the new depth.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 501 of file graphics_abstraction_layer.h.

501{};

Referenced by KIGFX::VIEW::UPDATE_DEPTH_VISITOR::operator()(), and KIGFX::VIEW::UpdateAllLayersOrder().

◆ ClearCache()

virtual void KIGFX::GAL::ClearCache ( )
inlinevirtualinherited

Delete all data created during caching of graphic items.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 513 of file graphics_abstraction_layer.h.

513{};

Referenced by KIGFX::VIEW::Clear().

◆ ClearScreen()

virtual void KIGFX::GAL::ClearScreen ( )
inlinevirtualinherited

Clear the screen.

Parameters
aColoris the color used for clearing.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 273 of file graphics_abstraction_layer.h.

273{};

Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), and BOARD_PRINTOUT::DrawPage().

◆ ClearTarget()

virtual void KIGFX::GAL::ClearTarget ( RENDER_TARGET  aTarget)
inlinevirtualinherited

Clear the target for rendering.

Parameters
aTargetis the target to be cleared.

Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 650 of file graphics_abstraction_layer.h.

650{};

Referenced by KIGFX::VIEW::ClearTargets().

◆ computeMinGridSpacing()

double GAL::computeMinGridSpacing ( ) const
protectedinherited

compute minimum grid spacing from the grid settings

Returns
the minimum spacing to use for drawing the grid

Definition at line 214 of file graphics_abstraction_layer.cpp.

215{
216 // just return the current value. This could be cleverer and take
217 // into account other settings in future
218 return m_gridMinSpacing;
219}
int m_gridMinSpacing
Minimum screen size of the grid (pixels) below which the grid is not drawn.

References KIGFX::GAL::m_gridMinSpacing.

Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), and KIGFX::GAL::GetVisibleGridSize().

◆ computeWorldScale()

void KIGFX::GAL::computeWorldScale ( )
inlineprotectedinherited

Compute the scaling factor for the world->screen matrix.

Definition at line 995 of file graphics_abstraction_layer.h.

996 {
998 }
double m_zoomFactor
The zoom factor.
double m_worldUnitLength
The unit length of the world coordinates [inch].
double m_worldScale
The scale factor world->screen.
double m_screenDPI
The dots per inch of the screen.

References KIGFX::GAL::m_screenDPI, KIGFX::GAL::m_worldScale, KIGFX::GAL::m_worldUnitLength, and KIGFX::GAL::m_zoomFactor.

Referenced by KIGFX::GAL::ComputeWorldScreenMatrix(), KIGFX::OPENGL_GAL::ComputeWorldScreenMatrix(), and KIGFX::GAL::GAL().

◆ ComputeWorldScreenMatrix()

void GAL::ComputeWorldScreenMatrix ( )
virtualinherited

Compute the world <-> screen transformation matrix.

Reimplemented in KIGFX::CAIRO_PRINT_GAL, and KIGFX::OPENGL_GAL.

Definition at line 169 of file graphics_abstraction_layer.cpp.

170{
172
173 MATRIX3x3D translation;
174 translation.SetIdentity();
175 // We're deliberately dividing integers to avoid fractional pixel offsets.
176 translation.SetTranslation( VECTOR2D( m_screenSize.x/2, m_screenSize.y/2 ) );
177
178 MATRIX3x3D rotate;
179 rotate.SetIdentity();
180 rotate.SetRotation( m_rotation );
181
183 scale.SetIdentity();
184 scale.SetScale( VECTOR2D( m_worldScale, m_worldScale ) );
185
186 MATRIX3x3D flip;
187 flip.SetIdentity();
188 flip.SetScale( VECTOR2D( m_globalFlipX ? -1.0 : 1.0, m_globalFlipY ? -1.0 : 1.0 ) );
189
190 MATRIX3x3D lookat;
191 lookat.SetIdentity();
192 lookat.SetTranslation( -m_lookAtPoint );
193
194 m_worldScreenMatrix = translation * rotate * flip * scale * lookat;
196}
MATRIX3x3D m_worldScreenMatrix
World transformation.
MATRIX3x3D m_screenWorldMatrix
Screen transformation.
VECTOR2I m_screenSize
Screen size in screen coordinates.
void computeWorldScale()
Compute the scaling factor for the world->screen matrix.
double m_rotation
Rotation transformation (radians)
bool m_globalFlipY
Flag for Y axis flipping.
VECTOR2D m_lookAtPoint
Point to be looked at in world space.
void SetIdentity()
Set the matrix to the identity matrix.
Definition: matrix3x3.h:240
void SetRotation(T aAngle)
Set the rotation components of the matrix.
Definition: matrix3x3.h:275
void SetScale(VECTOR2< T > aScale)
Set the scale components of the matrix.
Definition: matrix3x3.h:287
void SetTranslation(VECTOR2< T > aTranslation)
Set the translation components of the matrix.
Definition: matrix3x3.h:256
MATRIX3x3 Inverse() const
Determine the inverse of the matrix.
Definition: matrix3x3.h:384
const int scale
VECTOR2< double > VECTOR2D
Definition: vector2d.h:617

References KIGFX::GAL::computeWorldScale(), MATRIX3x3< T >::Inverse(), KIGFX::GAL::m_globalFlipX, KIGFX::GAL::m_globalFlipY, KIGFX::GAL::m_lookAtPoint, KIGFX::GAL::m_rotation, KIGFX::GAL::m_screenSize, KIGFX::GAL::m_screenWorldMatrix, KIGFX::GAL::m_worldScale, KIGFX::GAL::m_worldScreenMatrix, scale, MATRIX3x3< T >::SetIdentity(), MATRIX3x3< T >::SetRotation(), MATRIX3x3< T >::SetScale(), MATRIX3x3< T >::SetTranslation(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by KIGFX::OPENGL_GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::resetContext(), KIGFX::VIEW::SetCenter(), and KIGFX::VIEW::SetScale().

◆ DeleteGroup()

virtual void KIGFX::GAL::DeleteGroup ( int  aGroupNumber)
inlinevirtualinherited

Delete the group from the memory.

Parameters
aGroupNumberis the group number.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 508 of file graphics_abstraction_layer.h.

508{};

Referenced by KIGFX::VIEW::RECACHE_ITEM_VISITOR::operator()(), KIGFX::VIEW::Remove(), KIGFX::VIEW::updateItemGeometry(), and KIGFX::VIEW::updateLayers().

◆ DrawArc()

virtual void KIGFX::GAL::DrawArc ( const VECTOR2D aCenterPoint,
double  aRadius,
const EDA_ANGLE aStartAngle,
const EDA_ANGLE aEndAngle 
)
inlinevirtualinherited

Draw an arc.

Parameters
aCenterPointis the center point of the arc.
aRadiusis the arc radius.
aStartAngleis the start angle of the arc.
aEndAngleis the end angle of the arc.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 153 of file graphics_abstraction_layer.h.

154 {};

Referenced by KIGFX::PCB_PAINTER::draw(), ROUTER_PREVIEW_ITEM::drawLineChain(), ROUTER_PREVIEW_ITEM::drawShape(), and KIGFX::VIEW_OVERLAY::COMMAND_ARC::Execute().

◆ DrawArcSegment()

virtual void KIGFX::GAL::DrawArcSegment ( const VECTOR2D aCenterPoint,
double  aRadius,
const EDA_ANGLE aStartAngle,
const EDA_ANGLE aEndAngle,
double  aWidth,
double  aMaxError 
)
inlinevirtualinherited

Draw an arc segment.

This method differs from DrawArc() in what happens when fill/stroke are on or off. DrawArc() draws a "pie piece" when fill is turned on, and a thick stroke when fill is off. DrawArcSegment() with fill on behaves like DrawArc() with fill off. DrawArcSegment() with fill off draws the outline of what it would have drawn with fill on.

TODO: Unify Arc routines

Parameters
aCenterPointis the center point of the arc.
aRadiusis the arc radius.
aStartAngleis the start angle of the arc.
aEndAngleis the end angle of the arc.
aWidthis the thickness of the arc (pen size).
aMaxErroris the max allowed error to create segments to approximate a circle. It has meaning only for back ends that can't draw a true arc, and use segments to approximate.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 174 of file graphics_abstraction_layer.h.

176 {};

Referenced by KIGFX::PCB_PAINTER::draw(), and KIGFX::GERBVIEW_PAINTER::draw().

◆ DrawBitmap()

virtual void KIGFX::GAL::DrawBitmap ( const BITMAP_BASE aBitmap,
double  alphaBlend = 1.0 
)
inlinevirtualinherited

Draw a bitmap image.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 234 of file graphics_abstraction_layer.h.

234{};

Referenced by KIGFX::PCB_PAINTER::draw().

◆ DrawCircle()

virtual void KIGFX::GAL::DrawCircle ( const VECTOR2D aCenterPoint,
double  aRadius 
)
inlinevirtualinherited

◆ DrawCursor()

virtual void KIGFX::GAL::DrawCursor ( const VECTOR2D aCursorPosition)
inlinevirtualinherited

Draw the cursor.

Parameters
aCursorPositionis the cursor position in screen coordinates.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 926 of file graphics_abstraction_layer.h.

926{};

Referenced by EDA_DRAW_PANEL_GAL::DoRePaint().

◆ DrawCurve()

virtual void KIGFX::GAL::DrawCurve ( const VECTOR2D startPoint,
const VECTOR2D controlPointA,
const VECTOR2D controlPointB,
const VECTOR2D endPoint,
double  aFilterValue = 0.0 
)
inlinevirtualinherited

Draw a cubic bezier spline.

Parameters
startPointis the start point of the spline.
controlPointAis the first control point.
controlPointBis the second control point.
endPointis the end point of the spline.
aFilterValueis used by Bezier to segments approximation, if the Bezier curve is not supported and needs a curve to polyline conversion. aFilterValue = 0 means no filtering.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 227 of file graphics_abstraction_layer.h.

229 {};

Referenced by KIGFX::PCB_PAINTER::draw().

◆ DrawGlyph()

void CALLBACK_GAL::DrawGlyph ( const KIFONT::GLYPH aGlyph,
int  aNth,
int  aTotal 
)
overridevirtual

Draw a polygon representing an outline font glyph.

Reimplemented from KIGFX::GAL.

Definition at line 33 of file callback_gal.cpp.

34{
35 if( aGlyph.IsStroke() )
36 {
37 const KIFONT::STROKE_GLYPH& glyph = static_cast<const KIFONT::STROKE_GLYPH&>( aGlyph );
38
39 for( const std::vector<VECTOR2D>& pointList : glyph )
40 {
41 for( size_t ii = 1; ii < pointList.size(); ii++ )
42 {
43 if( m_stroke )
44 {
45 m_strokeCallback( pointList[ ii - 1 ], pointList[ ii ] );
46 }
47 else
48 {
49 int strokeWidth = GetLineWidth();
50 SHAPE_POLY_SET poly;
51
52 TransformOvalToPolygon( poly, pointList[ ii - 1 ], pointList[ ii ],
53 strokeWidth, strokeWidth / 48, ERROR_OUTSIDE );
54
55 m_outlineCallback( poly.Outline( 0 ) );
56 }
57 }
58 }
59 }
60 else if( aGlyph.IsOutline() )
61 {
62 if( m_triangulate )
63 {
64 const KIFONT::OUTLINE_GLYPH& glyph = static_cast<const KIFONT::OUTLINE_GLYPH&>( aGlyph );
65
67 }
68 else
69 {
70 KIFONT::OUTLINE_GLYPH glyph = static_cast<const KIFONT::OUTLINE_GLYPH&>( aGlyph );
71
72 if( glyph.HasHoles() )
73 glyph.Fracture( SHAPE_POLY_SET::POLYGON_MODE::PM_FAST );
74
75 for( int ii = 0; ii < glyph.OutlineCount(); ++ii )
76 m_outlineCallback( glyph.Outline( ii ) );
77 }
78 }
79}
virtual bool IsStroke() const
Definition: glyph.h:52
virtual bool IsOutline() const
Definition: glyph.h:51
void Triangulate(std::function< void(const VECTOR2I &aPt1, const VECTOR2I &aPt2, const VECTOR2I &aPt3)> aCallback) const
Definition: glyph.cpp:121
Represent a set of closed polygons.
bool HasHoles() const
Return true if the polygon set has any holes that share a vertex.
void Fracture(POLYGON_MODE aFastMode)
Convert a single outline slitted ("fractured") polygon into a set ouf outlines with holes.
SHAPE_LINE_CHAIN & Outline(int aIndex)
int OutlineCount() const
Return the number of vertices in a given outline/hole.
void TransformOvalToPolygon(SHAPE_POLY_SET &aBuffer, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, int aError, ERROR_LOC aErrorLoc, int aMinSegCount=0)
Convert a oblong shape to a polygon, using multiple segments.
@ ERROR_OUTSIDE

References ERROR_OUTSIDE, SHAPE_POLY_SET::Fracture(), KIGFX::GAL::GetLineWidth(), SHAPE_POLY_SET::HasHoles(), KIFONT::GLYPH::IsOutline(), KIFONT::GLYPH::IsStroke(), m_outlineCallback, m_stroke, m_strokeCallback, m_triangleCallback, m_triangulate, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), TransformOvalToPolygon(), and KIFONT::OUTLINE_GLYPH::Triangulate().

◆ DrawGlyphs()

virtual void KIGFX::GAL::DrawGlyphs ( const std::vector< std::unique_ptr< KIFONT::GLYPH > > &  aGlyphs)
inlinevirtualinherited

Draw polygons representing font glyphs.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 199 of file graphics_abstraction_layer.h.

200 {
201 for( size_t i = 0; i < aGlyphs.size(); i++ )
202 DrawGlyph( *aGlyphs[i], i, aGlyphs.size() );
203 }
virtual void DrawGlyph(const KIFONT::GLYPH &aGlyph, int aNth=0, int aTotal=1)
Draw a polygon representing a font glyph.

References KIGFX::GAL::DrawGlyph().

Referenced by KIGFX::PCB_PAINTER::draw(), and KIFONT::FONT::drawSingleLineText().

◆ DrawGrid()

virtual void KIGFX::GAL::DrawGrid ( )
inlinevirtualinherited

◆ DrawGroup()

virtual void KIGFX::GAL::DrawGroup ( int  aGroupNumber)
inlinevirtualinherited

Draw the stored group.

Parameters
aGroupNumberis the group number.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 485 of file graphics_abstraction_layer.h.

485{};

Referenced by KIGFX::VIEW::draw().

◆ DrawLine()

virtual void KIGFX::GAL::DrawLine ( const VECTOR2D aStartPoint,
const VECTOR2D aEndPoint 
)
inlinevirtualinherited

◆ DrawPolygon() [1/4]

virtual void KIGFX::GAL::DrawPolygon ( const SHAPE_LINE_CHAIN aPolySet)
inlinevirtualinherited

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 214 of file graphics_abstraction_layer.h.

214{};

◆ DrawPolygon() [2/4]

virtual void KIGFX::GAL::DrawPolygon ( const SHAPE_POLY_SET aPolySet,
bool  aStrokeTriangulation = false 
)
inlinevirtualinherited

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 213 of file graphics_abstraction_layer.h.

213{};

◆ DrawPolygon() [3/4]

◆ DrawPolygon() [4/4]

virtual void KIGFX::GAL::DrawPolygon ( const VECTOR2D  aPointList[],
int  aListSize 
)
inlinevirtualinherited

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 212 of file graphics_abstraction_layer.h.

212{};

◆ DrawPolyline() [1/4]

virtual void KIGFX::GAL::DrawPolyline ( const SHAPE_LINE_CHAIN aLineChain)
inlinevirtualinherited

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 128 of file graphics_abstraction_layer.h.

128{};

◆ DrawPolyline() [2/4]

virtual void KIGFX::GAL::DrawPolyline ( const std::deque< VECTOR2D > &  aPointList)
inlinevirtualinherited

◆ DrawPolyline() [3/4]

virtual void KIGFX::GAL::DrawPolyline ( const std::vector< VECTOR2D > &  aPointList)
inlinevirtualinherited

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 126 of file graphics_abstraction_layer.h.

126{};

◆ DrawPolyline() [4/4]

virtual void KIGFX::GAL::DrawPolyline ( const VECTOR2D  aPointList[],
int  aListSize 
)
inlinevirtualinherited

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 127 of file graphics_abstraction_layer.h.

127{};

◆ DrawPolylines()

virtual void KIGFX::GAL::DrawPolylines ( const std::vector< std::vector< VECTOR2D > > &  aPointLists)
inlinevirtualinherited

Draw multiple polylines.

Parameters
aPointListsare lists of 2D-Vectors containing the polyline points.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 135 of file graphics_abstraction_layer.h.

135{};

◆ DrawRectangle() [1/2]

void KIGFX::GAL::DrawRectangle ( const BOX2I aRect)
inlineinherited

Definition at line 186 of file graphics_abstraction_layer.h.

187 {
188 DrawRectangle( aRect.GetOrigin(), aRect.GetEnd() );
189 }
const Vec & GetOrigin() const
Definition: box2.h:183
const Vec GetEnd() const
Definition: box2.h:185
virtual void DrawRectangle(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a rectangle.

References KIGFX::GAL::DrawRectangle(), BOX2< Vec >::GetEnd(), and BOX2< Vec >::GetOrigin().

◆ DrawRectangle() [2/2]

virtual void KIGFX::GAL::DrawRectangle ( const VECTOR2D aStartPoint,
const VECTOR2D aEndPoint 
)
inlinevirtualinherited

◆ DrawSegment()

virtual void KIGFX::GAL::DrawSegment ( const VECTOR2D aStartPoint,
const VECTOR2D aEndPoint,
double  aWidth 
)
inlinevirtualinherited

Draw a rounded segment.

Start and end points are defined as 2D-Vectors.

Parameters
aStartPointis the start point of the segment.
aEndPointis the end point of the segment.
aWidthis a width of the segment

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 108 of file graphics_abstraction_layer.h.

109 {};

Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::drawFlashedShape(), and ROUTER_PREVIEW_ITEM::drawShape().

◆ DrawSegmentChain() [1/2]

virtual void KIGFX::GAL::DrawSegmentChain ( const SHAPE_LINE_CHAIN aLineChain,
double  aWidth 
)
inlinevirtualinherited

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 118 of file graphics_abstraction_layer.h.

118{};

◆ DrawSegmentChain() [2/2]

virtual void KIGFX::GAL::DrawSegmentChain ( const std::vector< VECTOR2D > &  aPointList,
double  aWidth 
)
inlinevirtualinherited

Draw a chain of rounded segments.

Parameters
aPointListis a list of 2D-Vectors containing the chain points.
aWidthis a width of the segments

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 117 of file graphics_abstraction_layer.h.

117{};

Referenced by KIGFX::PCB_PAINTER::draw().

◆ EnableDepthTest()

virtual void KIGFX::GAL::EnableDepthTest ( bool  aEnabled = false)
inlinevirtualinherited

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 954 of file graphics_abstraction_layer.h.

954{};

◆ EndDiffLayer()

virtual void KIGFX::GAL::EndDiffLayer ( )
inlinevirtualinherited

Ends rendering of a differential layer.

Objects drawn after the StartDiffLayer() will be drawn and composited with a differential blend mode, then drawing is returned to normal.

Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 689 of file graphics_abstraction_layer.h.

689{};

Referenced by KIGFX::VIEW::redrawRect().

◆ EndDrawing()

virtual void KIGFX::GAL::EndDrawing ( )
inlinevirtualinherited

End the drawing, needs to be called for every new frame.

Use GAL_DRAWING_CONTEXT RAII object unless you know what you're doing.

Reimplemented in KIGFX::CAIRO_GAL_BASE, KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 982 of file graphics_abstraction_layer.h.

982{};

Referenced by KIGFX::GAL_DRAWING_CONTEXT::~GAL_DRAWING_CONTEXT().

◆ EndGroup()

virtual void KIGFX::GAL::EndGroup ( )
inlinevirtualinherited

End the group.

Reimplemented in KIGFX::CAIRO_GAL_BASE, KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 478 of file graphics_abstraction_layer.h.

478{};

Referenced by KIGFX::VIEW::updateItemGeometry().

◆ EndNegativesLayer()

virtual void KIGFX::GAL::EndNegativesLayer ( )
inlinevirtualinherited

Ends rendering of a negatives layer and draws it to the main layer.

No-op in OpenGL.

Reimplemented in KIGFX::CAIRO_GAL.

Definition at line 705 of file graphics_abstraction_layer.h.

705{};

Referenced by KIGFX::VIEW::redrawRect().

◆ endUpdate()

virtual void KIGFX::GAL::endUpdate ( )
inlineprotectedvirtualinherited

Disable item update mode.

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 990 of file graphics_abstraction_layer.h.

990{}

Referenced by KIGFX::GAL_UPDATE_CONTEXT::~GAL_UPDATE_CONTEXT().

◆ Flush()

virtual void KIGFX::GAL::Flush ( )
inlinevirtualinherited

Force all remaining objects to be drawn.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 256 of file graphics_abstraction_layer.h.

256{};

◆ GetClearColor()

const COLOR4D & KIGFX::GAL::GetClearColor ( ) const
inlineinherited

Definition at line 263 of file graphics_abstraction_layer.h.

264 {
265 return m_clearColor;
266 }

References KIGFX::GAL::m_clearColor.

Referenced by EDIT_POINTS::ViewDraw().

◆ getCursorColor()

COLOR4D GAL::getCursorColor ( ) const
protectedinherited

Get the actual cursor color to draw.

Definition at line 244 of file graphics_abstraction_layer.cpp.

245{
247
248 // dim the cursor if it's only on because it was forced
249 // (this helps to provide a hint for active tools)
250 if( !m_isCursorEnabled )
251 color.a = color.a * 0.5;
252
253 return color;
254}
int color
Definition: DXF_plotter.cpp:57
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
bool m_isCursorEnabled
Is the cursor enabled?
COLOR4D m_cursorColor
Cursor color.

References color, KIGFX::GAL::m_cursorColor, and KIGFX::GAL::m_isCursorEnabled.

Referenced by KIGFX::OPENGL_GAL::blitCursor(), and KIGFX::CAIRO_GAL_BASE::blitCursor().

◆ GetFillColor()

const COLOR4D & KIGFX::GAL::GetFillColor ( ) const
inlineinherited

Get the fill color.

Returns
the color for filling a outline.

Definition at line 314 of file graphics_abstraction_layer.h.

315 {
316 return m_fillColor;
317 }
COLOR4D m_fillColor
The fill color.

References KIGFX::GAL::m_fillColor.

◆ GetGlyphSize()

const VECTOR2I & KIGFX::GAL::GetGlyphSize ( ) const
inlineinherited

◆ GetGridLineWidth()

float KIGFX::GAL::GetGridLineWidth ( ) const
inlineinherited

Get the grid line width.

Returns
the grid line width Draw the grid

Definition at line 845 of file graphics_abstraction_layer.h.

References KIGFX::GAL::m_gridLineWidth.

◆ GetGridOrigin()

const VECTOR2D & KIGFX::GAL::GetGridOrigin ( ) const
inlineinherited

Definition at line 746 of file graphics_abstraction_layer.h.

747 {
748 return m_gridOrigin;
749 }
VECTOR2D m_gridOrigin
The grid origin.

References KIGFX::GAL::m_gridOrigin.

Referenced by GRID_HELPER::GetOrigin().

◆ GetGridPoint()

VECTOR2D GAL::GetGridPoint ( const VECTOR2D aPoint) const
inherited

For a given point it returns the nearest point belonging to the grid in world coordinates.

Parameters
aPointis the point for which the grid point is searched.
Returns
The nearest grid point in world coordinates.

Definition at line 222 of file graphics_abstraction_layer.cpp.

223{
224#if 0
225 // This old code expects a non zero grid size, which can be wrong here.
226 return VECTOR2D( KiROUND( ( aPoint.x - m_gridOffset.x ) / m_gridSize.x ) * m_gridSize.x + m_gridOffset.x,
227 KiROUND( ( aPoint.y - m_gridOffset.y ) / m_gridSize.y ) * m_gridSize.y + m_gridOffset.y );
228#else
229 // if grid size == 0.0 there is no grid, so use aPoint as grid reference position
230 double cx = m_gridSize.x > 0.0 ? KiROUND( ( aPoint.x - m_gridOffset.x ) / m_gridSize.x ) * m_gridSize.x + m_gridOffset.x
231 : aPoint.x;
232 double cy = m_gridSize.y > 0.0 ? KiROUND( ( aPoint.y - m_gridOffset.y ) / m_gridSize.y ) * m_gridSize.y + m_gridOffset.y
233 : aPoint.y;
234
235 return VECTOR2D( cx, cy );
236#endif
237}
VECTOR2D m_gridSize
The grid size.
VECTOR2D m_gridOffset
The grid offset to compensate cursor position.
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:85

References KiROUND(), KIGFX::GAL::m_gridOffset, KIGFX::GAL::m_gridSize, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by KIGFX::WX_VIEW_CONTROLS::GetRawCursorPosition().

◆ GetGridSize()

◆ GetGridSnapping()

◆ GetGridVisibility()

bool KIGFX::GAL::GetGridVisibility ( ) const
inlineinherited

Definition at line 718 of file graphics_abstraction_layer.h.

718{ return m_gridVisibility; }

References KIGFX::GAL::m_gridVisibility.

Referenced by EDA_DRAW_PANEL_GAL::SwitchBackend().

◆ GetHorizontalJustify()

GR_TEXT_H_ALIGN_T KIGFX::GAL::GetHorizontalJustify ( ) const
inlineinherited

Definition at line 415 of file graphics_abstraction_layer.h.

415{ return m_attributes.m_Halign; }
GR_TEXT_H_ALIGN_T m_Halign

References KIGFX::GAL::m_attributes, and TEXT_ATTRIBUTES::m_Halign.

Referenced by KIGFX::OPENGL_GAL::BitmapText().

◆ GetLineWidth()

float KIGFX::GAL::GetLineWidth ( ) const
inlineinherited

Get the line width.

Returns
the actual line width.

Definition at line 354 of file graphics_abstraction_layer.h.

355 {
356 return m_lineWidth;
357 }
float m_lineWidth
The line width.

References KIGFX::GAL::m_lineWidth.

Referenced by KIGFX::GAL::BitmapText(), DrawGlyph(), and KIGFX::OPENGL_GAL::DrawGrid().

◆ GetLookAtPoint()

const VECTOR2D & KIGFX::GAL::GetLookAtPoint ( ) const
inlineinherited

Definition at line 582 of file graphics_abstraction_layer.h.

582{ return m_lookAtPoint; }

References KIGFX::GAL::m_lookAtPoint.

Referenced by KIGFX::GAL::GetVisibleWorldExtents().

◆ GetMaxDepth()

double KIGFX::GAL::GetMaxDepth ( ) const
inlineinherited

◆ GetMinDepth()

◆ GetRotation()

double KIGFX::GAL::GetRotation ( ) const
inlineinherited

Definition at line 591 of file graphics_abstraction_layer.h.

591{ return m_rotation; }

References KIGFX::GAL::m_rotation.

◆ GetScreenPixelSize()

◆ GetScreenWorldMatrix()

const MATRIX3x3D & KIGFX::GAL::GetScreenWorldMatrix ( ) const
inlineinherited

◆ GetStrokeColor()

const COLOR4D & KIGFX::GAL::GetStrokeColor ( ) const
inlineinherited

Get the stroke color.

Returns
the color for stroking the outline.

Definition at line 334 of file graphics_abstraction_layer.h.

335 {
336 return m_strokeColor;
337 }
COLOR4D m_strokeColor
The color of the outlines.

References KIGFX::GAL::m_strokeColor.

Referenced by KIGFX::PREVIEW::DrawTextNextToCursor(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().

◆ GetSwapInterval()

virtual int KIGFX::GAL::GetSwapInterval ( ) const
inlinevirtualinherited

Return the swap interval. -1 for adaptive, 0 for disabled/unknown.

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 253 of file graphics_abstraction_layer.h.

253{ return 0; };

Referenced by EDA_DRAW_PANEL_GAL::SwitchBackend().

◆ GetTarget()

virtual RENDER_TARGET KIGFX::GAL::GetTarget ( ) const
inlinevirtualinherited

Get the currently used target for rendering.

Returns
The current rendering target.

Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 643 of file graphics_abstraction_layer.h.

643{ return TARGET_CACHED; };
@ TARGET_CACHED
Main rendering target (cached)
Definition: definitions.h:48

References KIGFX::TARGET_CACHED.

◆ GetVerticalJustify()

GR_TEXT_V_ALIGN_T KIGFX::GAL::GetVerticalJustify ( ) const
inlineinherited

Definition at line 422 of file graphics_abstraction_layer.h.

422{ return m_attributes.m_Valign; }
GR_TEXT_V_ALIGN_T m_Valign

References KIGFX::GAL::m_attributes, and TEXT_ATTRIBUTES::m_Valign.

Referenced by KIGFX::OPENGL_GAL::BitmapText().

◆ GetVisibleGridSize()

VECTOR2D KIGFX::GAL::GetVisibleGridSize ( ) const
inlineinherited

Return the visible grid size in x and y directions.

Returns
A vector containing the spacing of visible grid marks

Definition at line 783 of file graphics_abstraction_layer.h.

784 {
785 VECTOR2D gridScreenSize( m_gridSize );
786
787 double gridThreshold = computeMinGridSpacing() / m_worldScale;
788
790 gridThreshold *= 2.0;
791
792 // If we cannot display the grid density, scale down by a tick size and
793 // try again. Eventually, we get some representation of the grid
794 while( std::min( gridScreenSize.x, gridScreenSize.y ) <= gridThreshold )
795 {
796 gridScreenSize = gridScreenSize * static_cast<double>( m_gridTick );
797 }
798
799 return gridScreenSize;
800 }
GRID_STYLE m_gridStyle
Grid display style.
int m_gridTick
Every tick line gets the double width.
double computeMinGridSpacing() const
compute minimum grid spacing from the grid settings
@ SMALL_CROSS
Use small cross instead of dots for the grid.

References KIGFX::GAL::computeMinGridSpacing(), KIGFX::GAL::m_gridSize, KIGFX::GAL::m_gridStyle, KIGFX::GAL::m_gridTick, KIGFX::GAL::m_worldScale, KIGFX::SMALL_CROSS, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by KIGFX::OPENGL_GAL::DrawGrid(), and GRID_HELPER::GetVisibleGrid().

◆ GetVisibleWorldExtents()

BOX2D GAL::GetVisibleWorldExtents ( ) const
inherited
Returns
the bounding box of the world that is displayed on screen at the moment

Definition at line 199 of file graphics_abstraction_layer.cpp.

200{
201 const MATRIX3x3D& matrix = GetScreenWorldMatrix();
202
203 VECTOR2D halfSize = VECTOR2D( matrix.GetScale().x * m_screenSize.x * 0.5,
204 matrix.GetScale().y * m_screenSize.y * 0.5 );
205
206 BOX2D extents;
207 extents.SetOrigin( GetLookAtPoint() - halfSize );
208 extents.SetSize( halfSize * 2 );
209
210 return extents;
211}
void SetOrigin(const Vec &pos)
Definition: box2.h:202
void SetSize(const Vec &size)
Definition: box2.h:213
const VECTOR2D & GetLookAtPoint() const
const MATRIX3x3D & GetScreenWorldMatrix() const
Get the screen <-> world transformation matrix.
VECTOR2< T > GetScale() const
Get the scale components of the matrix.
Definition: matrix3x3.h:295

References KIGFX::GAL::GetLookAtPoint(), MATRIX3x3< T >::GetScale(), KIGFX::GAL::GetScreenWorldMatrix(), KIGFX::GAL::m_screenSize, BOX2< Vec >::SetOrigin(), BOX2< Vec >::SetSize(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by ROUTER_TOOL::handleCommonEvents(), and ROUTER_TOOL::InlineDrag().

◆ GetWorldScale()

◆ GetWorldScreenMatrix()

const MATRIX3x3D & KIGFX::GAL::GetWorldScreenMatrix ( ) const
inlineinherited

Get the world <-> screen transformation matrix.

Returns
the transformation matrix.

Definition at line 527 of file graphics_abstraction_layer.h.

528 {
529 return m_worldScreenMatrix;
530 }

References KIGFX::GAL::m_worldScreenMatrix.

Referenced by KIGFX::VIEW::ToScreen().

◆ GetZoomFactor()

◆ HasTarget()

virtual bool KIGFX::GAL::HasTarget ( RENDER_TARGET  aTarget)
inlinevirtualinherited

Return true if the target exists.

Parameters
aTargetis the target to be checked.

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 657 of file graphics_abstraction_layer.h.

658 {
659 return true;
660 };

Referenced by EDA_DRAW_PANEL_GAL::DoRePaint().

◆ IsCairoEngine()

virtual bool KIGFX::GAL::IsCairoEngine ( )
inlinevirtualinherited

Return true if the GAL engine is a Cairo based type.

Reimplemented in KIGFX::CAIRO_GAL_BASE.

Definition at line 80 of file graphics_abstraction_layer.h.

80{ return false; }

Referenced by getShadowLayer().

◆ IsContextLocked()

virtual bool KIGFX::GAL::IsContextLocked ( )
inlinevirtualinherited

Checks the state of the context lock.

Returns
True if the context is currently locked

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 960 of file graphics_abstraction_layer.h.

961 {
962 return false;
963 }

Referenced by EDA_DRAW_PANEL_GAL::onSize().

◆ IsCursorEnabled()

bool KIGFX::GAL::IsCursorEnabled ( ) const
inlineinherited

Return information about cursor visibility.

Returns
True if cursor is visible.

Definition at line 906 of file graphics_abstraction_layer.h.

907 {
909 }
bool m_forceDisplayCursor
Always show cursor.

References KIGFX::GAL::m_forceDisplayCursor, and KIGFX::GAL::m_isCursorEnabled.

Referenced by KIGFX::OPENGL_GAL::blitCursor(), and KIGFX::CAIRO_GAL_BASE::blitCursor().

◆ IsFlippedX()

◆ IsFlippedY()

bool KIGFX::GAL::IsFlippedY ( ) const
inlineinherited

Definition at line 625 of file graphics_abstraction_layer.h.

625{ return m_globalFlipY; }

References KIGFX::GAL::m_globalFlipY.

◆ IsFontBold()

bool KIGFX::GAL::IsFontBold ( ) const
inlineinherited

◆ IsFontItalic()

bool KIGFX::GAL::IsFontItalic ( ) const
inlineinherited

◆ IsFontUnderlined()

bool KIGFX::GAL::IsFontUnderlined ( ) const
inlineinherited

◆ IsInitialized()

virtual bool KIGFX::GAL::IsInitialized ( ) const
inlinevirtualinherited

Return the initialization status for the canvas.

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 74 of file graphics_abstraction_layer.h.

74{ return true; }

Referenced by SCH_DRAW_PANEL::onPaint(), and EDA_DRAW_PANEL_GAL::onRefreshTimer().

◆ IsOpenGlEngine()

virtual bool KIGFX::GAL::IsOpenGlEngine ( )
inlinevirtualinherited

Return true if the GAL engine is a OpenGL based type.

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 83 of file graphics_abstraction_layer.h.

83{ return false; }

Referenced by KIGFX::PCB_PAINTER::draw(), and KIGFX::GERBVIEW_PAINTER::draw().

◆ IsTextMirrored()

bool KIGFX::GAL::IsTextMirrored ( ) const
inlineinherited

◆ IsVisible()

virtual bool KIGFX::GAL::IsVisible ( ) const
inlinevirtualinherited

◆ LockContext()

virtual void KIGFX::GAL::LockContext ( int  aClientCookie)
inlinevirtualinherited

Use GAL_CONTEXT_LOCKER RAII object unless you know what you're doing.

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 967 of file graphics_abstraction_layer.h.

967{}

Referenced by KIGFX::GAL_CONTEXT_LOCKER::GAL_CONTEXT_LOCKER().

◆ OnGalDisplayOptionsChanged()

void GAL::OnGalDisplayOptionsChanged ( const GAL_DISPLAY_OPTIONS aOptions)
overrideprotectedvirtualinherited

Handler for observer settings changes.

Implements KIGFX::GAL_DISPLAY_OPTIONS_OBSERVER.

Definition at line 99 of file graphics_abstraction_layer.cpp.

100{
101 // defer to the child class first
102 updatedGalDisplayOptions( aOptions );
103
104 // there is no refresh to do at this level
105}
virtual bool updatedGalDisplayOptions(const GAL_DISPLAY_OPTIONS &aOptions)
Handle updating display options.

References KIGFX::GAL::updatedGalDisplayOptions().

◆ PopDepth()

void KIGFX::GAL::PopDepth ( )
inlineinherited

Restore previously stored drawing depth for the depth stack.

Definition at line 948 of file graphics_abstraction_layer.h.

949 {
951 m_depthStack.pop();
952 }
std::stack< double > m_depthStack
Stored depth values.

References KIGFX::GAL::m_depthStack, and KIGFX::GAL::m_layerDepth.

Referenced by EDIT_POINTS::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), and KIGFX::VIEW_GROUP::ViewDraw().

◆ PushDepth()

void KIGFX::GAL::PushDepth ( )
inlineinherited

Store current drawing depth on the depth stack.

Definition at line 940 of file graphics_abstraction_layer.h.

941 {
943 }

References KIGFX::GAL::m_depthStack, and KIGFX::GAL::m_layerDepth.

Referenced by EDIT_POINTS::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::VIEW_GROUP::ViewDraw(), and KIGFX::VIEW_OVERLAY::ViewDraw().

◆ ResetTextAttributes()

void GAL::ResetTextAttributes ( )
inherited

Reset text attributes to default styling.

FONT TODO: do we need any of this in GAL anymore?

Normally, custom attributes will be set individually after this, otherwise you can use SetTextAttributes()

Definition at line 153 of file graphics_abstraction_layer.cpp.

154{
155 // Tiny but non-zero - this will always need setting
156 // there is no built-in default
157 SetGlyphSize( { 1, 1 } );
158
161
162 SetFontBold( false );
163 SetFontItalic( false );
164 SetFontUnderlined( false );
165 SetTextMirrored( false );
166}
void SetVerticalJustify(const GR_TEXT_V_ALIGN_T aVerticalJustify)
void SetFontBold(const bool aBold)
void SetFontUnderlined(bool aUnderlined)
void SetHorizontalJustify(const GR_TEXT_H_ALIGN_T aHorizontalJustify)
void SetTextMirrored(const bool aMirrored)
void SetGlyphSize(const VECTOR2I aSize)
void SetFontItalic(bool aItalic)
@ GR_TEXT_H_ALIGN_CENTER
@ GR_TEXT_V_ALIGN_CENTER

References GR_TEXT_H_ALIGN_CENTER, GR_TEXT_V_ALIGN_CENTER, KIGFX::GAL::SetFontBold(), KIGFX::GAL::SetFontItalic(), KIGFX::GAL::SetFontUnderlined(), KIGFX::GAL::SetGlyphSize(), KIGFX::GAL::SetHorizontalJustify(), KIGFX::GAL::SetTextMirrored(), and KIGFX::GAL::SetVerticalJustify().

Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::GAL::GAL(), KIGFX::PREVIEW::ARC_ASSISTANT::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), and KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewDraw().

◆ ResizeScreen()

virtual void KIGFX::GAL::ResizeScreen ( int  aWidth,
int  aHeight 
)
inlinevirtualinherited

◆ Restore()

virtual void KIGFX::GAL::Restore ( )
inlinevirtualinherited

Restore the context.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 461 of file graphics_abstraction_layer.h.

461{};

Referenced by KIGFX::PCB_PAINTER::draw(), and DS_PROXY_VIEW_ITEM::ViewDraw().

◆ Rotate()

virtual void KIGFX::GAL::Rotate ( double  aAngle)
inlinevirtualinherited

Rotate the context.

Parameters
aAngleis the rotation angle in radians.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 441 of file graphics_abstraction_layer.h.

441{};

Referenced by KIGFX::PCB_PAINTER::draw().

◆ Save()

virtual void KIGFX::GAL::Save ( )
inlinevirtualinherited

Save the context.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 458 of file graphics_abstraction_layer.h.

458{};

Referenced by KIGFX::PCB_PAINTER::draw(), and DS_PROXY_VIEW_ITEM::ViewDraw().

◆ Scale()

virtual void KIGFX::GAL::Scale ( const VECTOR2D aScale)
inlinevirtualinherited

Scale the context.

Parameters
aScaleis the scale factor for the x- and y-axis.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 455 of file graphics_abstraction_layer.h.

455{};

Referenced by KIGFX::PCB_PAINTER::draw(), and DS_PROXY_VIEW_ITEM::ViewDraw().

◆ SetAxesColor()

void KIGFX::GAL::SetAxesColor ( const COLOR4D aAxesColor)
inlineinherited

◆ SetAxesEnabled()

◆ SetClearColor()

◆ SetCoarseGrid()

void KIGFX::GAL::SetCoarseGrid ( int  aInterval)
inlineinherited

Draw every tick line wider.

Parameters
aIntervalincrease the width of every aInterval line, if 0 do not use this feature.

Definition at line 835 of file graphics_abstraction_layer.h.

836 {
837 m_gridTick = aInterval;
838 }

References KIGFX::GAL::m_gridTick.

Referenced by KIGFX::GAL::GAL().

◆ SetCursorColor()

void KIGFX::GAL::SetCursorColor ( const COLOR4D aCursorColor)
inlineinherited

Set the cursor color.

Parameters
aCursorColoris the color of the cursor.

Definition at line 916 of file graphics_abstraction_layer.h.

917 {
918 m_cursorColor = aCursorColor;
919 }

References KIGFX::GAL::m_cursorColor.

Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), KIGFX::GAL::GAL(), and PCB_DRAW_PANEL_GAL::UpdateColors().

◆ SetCursorEnabled()

void KIGFX::GAL::SetCursorEnabled ( bool  aCursorEnabled)
inlineinherited

Enable/disable cursor.

Parameters
aCursorEnabledis true if the cursor should be drawn, else false.

Definition at line 896 of file graphics_abstraction_layer.h.

897 {
898 m_isCursorEnabled = aCursorEnabled;
899 }

References KIGFX::GAL::m_isCursorEnabled.

Referenced by KIGFX::GAL::GAL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), and KIGFX::VIEW_CONTROLS::ShowCursor().

◆ SetDepthRange()

void KIGFX::GAL::SetDepthRange ( const VECTOR2D aDepthRange)
inlineinherited

Set the range of the layer depth.

Usually required for the OpenGL implementation, any object outside this range is not drawn.

The MinDepth (x) is closest to the clipping plane (top) while the MaxDepth (y) is farthest from the clipping plane (bottom).

Definition at line 601 of file graphics_abstraction_layer.h.

601{ m_depthRange = aDepthRange; }

References KIGFX::GAL::m_depthRange.

Referenced by KIGFX::GAL::GAL().

◆ SetFillColor()

◆ SetFlip()

void KIGFX::GAL::SetFlip ( bool  xAxis,
bool  yAxis 
)
inlineinherited

Sets flipping of the screen.

Parameters
xAxisis the flip flag for the X axis.
yAxisis the flip flag for the Y axis.

Definition at line 618 of file graphics_abstraction_layer.h.

619 {
620 m_globalFlipX = xAxis;
621 m_globalFlipY = yAxis;
622 }

References KIGFX::GAL::m_globalFlipX, and KIGFX::GAL::m_globalFlipY.

Referenced by KIGFX::GAL::GAL(), KIGFX::VIEW::SetMirror(), and BOARD_PRINTOUT::setupGal().

◆ SetFontBold()

void KIGFX::GAL::SetFontBold ( const bool  aBold)
inlineinherited

◆ SetFontItalic()

void KIGFX::GAL::SetFontItalic ( bool  aItalic)
inlineinherited

◆ SetFontUnderlined()

void KIGFX::GAL::SetFontUnderlined ( bool  aUnderlined)
inlineinherited

◆ SetGlyphSize()

◆ SetGridColor()

void KIGFX::GAL::SetGridColor ( const COLOR4D aGridColor)
inlineinherited

Set the grid color.

Parameters
aGridColoris the grid color, it should have a low alpha value for the best effect.

Definition at line 807 of file graphics_abstraction_layer.h.

808 {
809 m_gridColor = aGridColor;
810 }
COLOR4D m_gridColor
Color of the grid.

References KIGFX::GAL::m_gridColor.

Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), KIGFX::CAIRO_GAL_BASE::CAIRO_GAL_BASE(), EDA_DRAW_PANEL_GAL::DoRePaint(), KIGFX::OPENGL_GAL::OPENGL_GAL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), GERBVIEW_FRAME::SetGridColor(), PCB_EDIT_FRAME::SetGridColor(), and PCB_DRAW_PANEL_GAL::UpdateColors().

◆ SetGridOrigin()

void KIGFX::GAL::SetGridOrigin ( const VECTOR2D aGridOrigin)
inlineinherited

Set the origin point for the grid.

Parameters
aGridOriginis a vector containing the grid origin point, in world coordinates.

Definition at line 731 of file graphics_abstraction_layer.h.

732 {
733 m_gridOrigin = aGridOrigin;
734
735 if( m_gridSize.x == 0.0 || m_gridSize.y == 0.0 )
736 {
737 m_gridOffset = VECTOR2D( 0.0, 0.0);
738 }
739 else
740 {
741 m_gridOffset = VECTOR2D( (long) m_gridOrigin.x % (long) m_gridSize.x,
742 (long) m_gridOrigin.y % (long) m_gridSize.y );
743 }
744 }

References KIGFX::GAL::m_gridOffset, KIGFX::GAL::m_gridOrigin, KIGFX::GAL::m_gridSize, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PCB_CONTROL::DoSetGridOrigin(), PCB_EDIT_FRAME::RebuildAndRefresh(), and PCB_BASE_EDIT_FRAME::SetBoard().

◆ SetGridSize()

void KIGFX::GAL::SetGridSize ( const VECTOR2D aGridSize)
inlineinherited

Set the grid size.

Parameters
aGridSizeis a vector containing the grid size in x and y direction.

Definition at line 756 of file graphics_abstraction_layer.h.

757 {
758 m_gridSize = aGridSize;
759
760 // Avoid stupid grid size values: a grid size should be >= 1 in internal units
761 m_gridSize.x = std::max( 1.0, m_gridSize.x );
762 m_gridSize.y = std::max( 1.0, m_gridSize.y );
763
764 m_gridOffset = VECTOR2D( (long) m_gridOrigin.x % (long) m_gridSize.x,
765 (long) m_gridOrigin.y % (long) m_gridSize.y );
766 }

References KIGFX::GAL::m_gridOffset, KIGFX::GAL::m_gridOrigin, KIGFX::GAL::m_gridSize, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by COMMON_TOOLS::OnGridChanged(), DIALOG_PAD_PROPERTIES::prepareCanvas(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), and EDA_DRAW_PANEL_GAL::SwitchBackend().

◆ SetGridVisibility()

void KIGFX::GAL::SetGridVisibility ( bool  aVisibility)
inlineinherited

◆ SetHorizontalJustify()

void KIGFX::GAL::SetHorizontalJustify ( const GR_TEXT_H_ALIGN_T  aHorizontalJustify)
inlineinherited

◆ SetIsFill()

◆ SetIsStroke()

◆ SetLayerDepth()

virtual void KIGFX::GAL::SetLayerDepth ( double  aLayerDepth)
inlinevirtualinherited

Set the depth of the layer (position on the z-axis)

Parameters
aLayerDepththe layer depth for the objects.

Reimplemented in KIGFX::CAIRO_GAL_BASE.

Definition at line 364 of file graphics_abstraction_layer.h.

365 {
366 assert( aLayerDepth <= m_depthRange.y );
367 assert( aLayerDepth >= m_depthRange.x );
368
369 m_layerDepth = aLayerDepth;
370 }

References KIGFX::GAL::m_depthRange, KIGFX::GAL::m_layerDepth, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by KIGFX::VIEW::draw(), ROUTER_PREVIEW_ITEM::drawShape(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::GAL::GAL(), KIGFX::VIEW::redrawRect(), KIGFX::CAIRO_GAL_BASE::SetLayerDepth(), KIGFX::VIEW::updateItemGeometry(), EDIT_POINTS::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().

◆ SetLineWidth()

◆ SetLookAtPoint()

void KIGFX::GAL::SetLookAtPoint ( const VECTOR2D aPoint)
inlineinherited

Get/set the Point in world space to look at.

This point corresponds with the center of the actual drawing area.

Definition at line 581 of file graphics_abstraction_layer.h.

581{ m_lookAtPoint = aPoint; }

References KIGFX::GAL::m_lookAtPoint.

Referenced by BOARD_PRINTOUT::DrawPage(), KIGFX::GAL::GAL(), and KIGFX::VIEW::SetCenter().

◆ SetNativeCursorStyle()

bool GAL::SetNativeCursorStyle ( KICURSOR  aCursor)
virtualinherited

Set the cursor in the native panel.

Parameters
aCursoris the cursor to use in the native panel
Returns
true if the cursor was updated, false if the cursor given was already set

Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 280 of file graphics_abstraction_layer.cpp.

281{
282 if( m_currentNativeCursor == aCursor )
283 return false;
284
285 m_currentNativeCursor = aCursor;
286
287 return true;
288}
KICURSOR m_currentNativeCursor
Current cursor.

References KIGFX::GAL::m_currentNativeCursor.

Referenced by KIGFX::GAL::GAL(), EDA_DRAW_PANEL_GAL::SetCurrentCursor(), KIGFX::CAIRO_GAL::SetNativeCursorStyle(), and KIGFX::OPENGL_GAL::SetNativeCursorStyle().

◆ SetNegativeDrawMode()

virtual void KIGFX::GAL::SetNegativeDrawMode ( bool  aSetting)
inlinevirtualinherited

Set negative draw mode in the renderer.

When negative mode is enabled, drawn items will subtract from previously drawn items. This is mainly needed for Gerber negative item support in Cairo, since unlike in OpenGL, objects drawn with zero opacity on top of other objects would not normally mask objects in Cairo. This method is a no-op in OpenGL.

Parameters
aSettingis true if negative mode should be enabled

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 673 of file graphics_abstraction_layer.h.

673{};

Referenced by KIGFX::GERBVIEW_PAINTER::draw().

◆ SetRotation()

void KIGFX::GAL::SetRotation ( double  aRotation)
inlineinherited

Get/set the rotation angle (in radians).

Definition at line 590 of file graphics_abstraction_layer.h.

590{ m_rotation = aRotation; }

References KIGFX::GAL::m_rotation.

Referenced by KIGFX::GAL::GAL().

◆ SetScreenDPI()

void KIGFX::GAL::SetScreenDPI ( double  aScreenDPI)
inlineinherited

Set the dots per inch of the screen.

This value depends on the user screen, it should be configurable by the application. For instance a typical notebook with HD+ resolution (1600x900) has 106 DPI.

Definition at line 574 of file graphics_abstraction_layer.h.

574{ m_screenDPI = aScreenDPI; }

References KIGFX::GAL::m_screenDPI.

Referenced by KIGFX::CAIRO_PRINT_GAL::CAIRO_PRINT_GAL(), and KIGFX::GAL::GAL().

◆ SetScreenSize()

void KIGFX::GAL::SetScreenSize ( const VECTOR2I aSize)
inlineinherited

Definition at line 566 of file graphics_abstraction_layer.h.

566{ m_screenSize = aSize; }

References KIGFX::GAL::m_screenSize.

Referenced by KIGFX::CAIRO_PRINT_GAL::SetSheetSize().

◆ SetStrokeColor()

◆ SetTarget()

virtual void KIGFX::GAL::SetTarget ( RENDER_TARGET  aTarget)
inlinevirtualinherited

Set the target for rendering.

Parameters
aTargetis the new target for rendering.

Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 636 of file graphics_abstraction_layer.h.

636{};

Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::VIEW::redrawRect(), KIGFX::VIEW::updateItemGeometry(), and MY_DRAWING::ViewDraw().

◆ SetTextMirrored()

void KIGFX::GAL::SetTextMirrored ( const bool  aMirrored)
inlineinherited

◆ SetVerticalJustify()

void KIGFX::GAL::SetVerticalJustify ( const GR_TEXT_V_ALIGN_T  aVerticalJustify)
inlineinherited

◆ SetWorldScreenMatrix()

void KIGFX::GAL::SetWorldScreenMatrix ( const MATRIX3x3D aMatrix)
inlineinherited

Set the world <-> screen transformation matrix.

Parameters
aMatrixis the 3x3 world <-> screen transformation matrix.

Definition at line 547 of file graphics_abstraction_layer.h.

548 {
549 m_worldScreenMatrix = aMatrix;
550 }

References KIGFX::GAL::m_worldScreenMatrix.

◆ SetWorldUnitLength()

void KIGFX::GAL::SetWorldUnitLength ( double  aWorldUnitLength)
inlineinherited

Set the unit length.

This defines the length [inch] per one integer. For instance a value 0.001 means that the coordinate [1000, 1000] corresponds with a point at (1 inch, 1 inch) or 1 mil resolution per integer.

Definition at line 564 of file graphics_abstraction_layer.h.

564{ m_worldUnitLength = aWorldUnitLength; }

References KIGFX::GAL::m_worldUnitLength.

Referenced by KIGFX::GAL::GAL(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), GERBVIEW_PRINTOUT::setupGal(), PCBNEW_PRINTOUT::setupGal(), SCH_DRAW_PANEL::SwitchBackend(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), PL_DRAW_PANEL_GAL::SwitchBackend(), and PCB_DRAW_PANEL_GAL::SwitchBackend().

◆ SetZoomFactor()

void KIGFX::GAL::SetZoomFactor ( double  aZoomFactor)
inlineinherited

Definition at line 584 of file graphics_abstraction_layer.h.

584{ m_zoomFactor = aZoomFactor; }

References KIGFX::GAL::m_zoomFactor.

Referenced by BOARD_PRINTOUT::DrawPage(), KIGFX::GAL::GAL(), and KIGFX::VIEW::SetScale().

◆ Show()

virtual bool KIGFX::GAL::Show ( bool  aShow)
inlinevirtualinherited

Show/hide the GAL canvas.

Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 244 of file graphics_abstraction_layer.h.

244{ return true; };

◆ StartDiffLayer()

virtual void KIGFX::GAL::StartDiffLayer ( )
inlinevirtualinherited

Begins rendering of a differential layer.

Used by gerbview's differential mode.

Differential layers have their drawn objects blended onto the lower layers differently so we need to end drawing of current objects and start a new set to be completed with a different blend mode.

Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 682 of file graphics_abstraction_layer.h.

682{};

Referenced by KIGFX::VIEW::redrawRect().

◆ StartNegativesLayer()

virtual void KIGFX::GAL::StartNegativesLayer ( )
inlinevirtualinherited

Begins rendering in a new layer that will be copied to the main layer in EndNegativesLayer().

For Cairo, layers with negative items need a new layer so when negative layers _CLEAR sections it doesn't delete drawings on layers below them. No-op in OpenGL

Reimplemented in KIGFX::CAIRO_GAL.

Definition at line 699 of file graphics_abstraction_layer.h.

699{};

Referenced by KIGFX::VIEW::redrawRect().

◆ ToScreen()

VECTOR2D KIGFX::GAL::ToScreen ( const VECTOR2D aPoint) const
inlineinherited

Compute the point position in screen coordinates from given world coordinates.

Parameters
aPointthe point position in world coordinates.
Returns
the point position in screen coordinates.

Definition at line 878 of file graphics_abstraction_layer.h.

879 {
880 return VECTOR2D( m_worldScreenMatrix * aPoint );
881 }

References KIGFX::GAL::m_worldScreenMatrix.

Referenced by KIGFX::CAIRO_GAL_BASE::blitCursor().

◆ ToWorld()

VECTOR2D KIGFX::GAL::ToWorld ( const VECTOR2D aPoint) const
inlineinherited

Compute the point position in world coordinates from given screen coordinates.

Parameters
aPointthe point position in screen coordinates.
Returns
the point position in world coordinates.

Definition at line 867 of file graphics_abstraction_layer.h.

868 {
869 return VECTOR2D( m_screenWorldMatrix * aPoint );
870 }

References KIGFX::GAL::m_screenWorldMatrix.

◆ Transform()

virtual void KIGFX::GAL::Transform ( const MATRIX3x3D aTransformation)
inlinevirtualinherited

Transform the context.

Parameters
aTransformationis the transformation matrix.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 434 of file graphics_abstraction_layer.h.

434{};

◆ Translate()

virtual void KIGFX::GAL::Translate ( const VECTOR2D aTranslation)
inlinevirtualinherited

Translate the context.

Parameters
aTranslationis the translation vector.

Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.

Definition at line 448 of file graphics_abstraction_layer.h.

448{};

Referenced by KIGFX::PCB_PAINTER::draw(), and DS_PROXY_VIEW_ITEM::ViewDraw().

◆ UnlockContext()

virtual void KIGFX::GAL::UnlockContext ( int  aClientCookie)
inlinevirtualinherited

Reimplemented in KIGFX::OPENGL_GAL.

Definition at line 969 of file graphics_abstraction_layer.h.

969{}

Referenced by KIGFX::GAL_CONTEXT_LOCKER::~GAL_CONTEXT_LOCKER().

◆ updatedGalDisplayOptions()

bool GAL::updatedGalDisplayOptions ( const GAL_DISPLAY_OPTIONS aOptions)
protectedvirtualinherited

Handle updating display options.

Derived classes should call up to this to set base-class methods.

Returns
true if the new settings changed something. Derived classes can use this information to refresh themselves

Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.

Definition at line 108 of file graphics_abstraction_layer.cpp.

109{
110 bool refresh = false;
111
113 {
115 refresh = true;
116 }
117
119 {
120 m_gridLineWidth = std::floor( m_options.m_gridLineWidth + 0.5 );
121 refresh = true;
122 }
123
125 {
127 refresh = true;
128 }
129
131 {
133 refresh = true;
134 }
135
137 {
139 refresh = true;
140 }
141
143 {
145 refresh = true;
146 }
147
148 // tell the derived class if the base class needs an update or not
149 return refresh;
150}
double m_gridLineWidth
Minimum pixel distance between displayed grid lines.
double m_gridMinSpacing
Whether or not to draw the coordinate system axes.
bool m_forceDisplayCursor
The pixel scale factor (>1 for hi-DPI scaled displays)
KIGFX::GRID_STYLE m_gridStyle
Snapping options for the grid.
bool m_axesEnabled
Fullscreen crosshair or small cross.
bool m_fullscreenCursor
Force cursor display.
float m_gridLineWidth
Line width of the grid.
bool m_fullscreenCursor
Shape of the cursor (fullscreen or small cross)

References KIGFX::GAL_DISPLAY_OPTIONS::m_axesEnabled, KIGFX::GAL::m_axesEnabled, KIGFX::GAL_DISPLAY_OPTIONS::m_forceDisplayCursor, KIGFX::GAL::m_forceDisplayCursor, KIGFX::GAL_DISPLAY_OPTIONS::m_fullscreenCursor, KIGFX::GAL::m_fullscreenCursor, KIGFX::GAL_DISPLAY_OPTIONS::m_gridLineWidth, KIGFX::GAL::m_gridLineWidth, KIGFX::GAL_DISPLAY_OPTIONS::m_gridMinSpacing, KIGFX::GAL::m_gridMinSpacing, KIGFX::GAL_DISPLAY_OPTIONS::m_gridStyle, KIGFX::GAL::m_gridStyle, KIGFX::GAL::m_options, and refresh.

Referenced by KIGFX::GAL::OnGalDisplayOptionsChanged(), KIGFX::CAIRO_GAL::updatedGalDisplayOptions(), and KIGFX::OPENGL_GAL::updatedGalDisplayOptions().

Member Data Documentation

◆ GRID_DEPTH

const int GAL::GRID_DEPTH = MAX_DEPTH - 1
staticprotectedinherited

Depth level on which the grid is drawn.

Definition at line 1012 of file graphics_abstraction_layer.h.

◆ m_attributes

◆ m_axesColor

COLOR4D KIGFX::GAL::m_axesColor
protectedinherited

◆ m_axesEnabled

bool KIGFX::GAL::m_axesEnabled
protectedinherited

◆ m_clearColor

◆ m_currentNativeCursor

KICURSOR KIGFX::GAL::m_currentNativeCursor
protectedinherited

◆ m_cursorColor

COLOR4D KIGFX::GAL::m_cursorColor
protectedinherited

Cursor color.

Definition at line 1085 of file graphics_abstraction_layer.h.

Referenced by KIGFX::GAL::getCursorColor(), and KIGFX::GAL::SetCursorColor().

◆ m_cursorPosition

VECTOR2D KIGFX::GAL::m_cursorPosition
protectedinherited

◆ m_depthRange

◆ m_depthStack

std::stack<double> KIGFX::GAL::m_depthStack
protectedinherited

Stored depth values.

Definition at line 1040 of file graphics_abstraction_layer.h.

Referenced by KIGFX::GAL::PopDepth(), and KIGFX::GAL::PushDepth().

◆ m_fillColor

◆ m_forceDisplayCursor

bool KIGFX::GAL::m_forceDisplayCursor
protectedinherited

◆ m_fullscreenCursor

bool KIGFX::GAL::m_fullscreenCursor
protectedinherited

Shape of the cursor (fullscreen or small cross)

Definition at line 1086 of file graphics_abstraction_layer.h.

Referenced by KIGFX::OPENGL_GAL::blitCursor(), KIGFX::CAIRO_GAL_BASE::blitCursor(), KIGFX::GAL::GAL(), and KIGFX::GAL::updatedGalDisplayOptions().

◆ m_globalFlipX

◆ m_globalFlipY

bool KIGFX::GAL::m_globalFlipY
protectedinherited

◆ m_gridColor

◆ m_gridLineWidth

float KIGFX::GAL::m_gridLineWidth
protectedinherited

◆ m_gridMinSpacing

int KIGFX::GAL::m_gridMinSpacing
protectedinherited

Minimum screen size of the grid (pixels) below which the grid is not drawn.

Definition at line 1079 of file graphics_abstraction_layer.h.

Referenced by KIGFX::GAL::computeMinGridSpacing(), KIGFX::GAL::GAL(), and KIGFX::GAL::updatedGalDisplayOptions().

◆ m_gridOffset

VECTOR2D KIGFX::GAL::m_gridOffset
protectedinherited

The grid offset to compensate cursor position.

Definition at line 1073 of file graphics_abstraction_layer.h.

Referenced by KIGFX::GAL::GetGridPoint(), KIGFX::GAL::SetGridOrigin(), and KIGFX::GAL::SetGridSize().

◆ m_gridOrigin

VECTOR2D KIGFX::GAL::m_gridOrigin
protectedinherited

◆ m_gridSize

◆ m_gridStyle

GRID_STYLE KIGFX::GAL::m_gridStyle
protectedinherited

◆ m_gridTick

int KIGFX::GAL::m_gridTick
protectedinherited

◆ m_gridVisibility

bool KIGFX::GAL::m_gridVisibility
protectedinherited

◆ m_isCursorEnabled

bool KIGFX::GAL::m_isCursorEnabled
protectedinherited

◆ m_isFillEnabled

◆ m_isStrokeEnabled

◆ m_layerDepth

◆ m_lineWidth

◆ m_lookAtPoint

◆ m_observerLink

UTIL::LINK KIGFX::GAL::m_observerLink
protectedinherited

Definition at line 1038 of file graphics_abstraction_layer.h.

Referenced by KIGFX::GAL::GAL().

◆ m_options

◆ m_outlineCallback

std::function<void( const SHAPE_LINE_CHAIN& aPoly )> CALLBACK_GAL::m_outlineCallback
private

Definition at line 84 of file callback_gal.h.

Referenced by CALLBACK_GAL(), and DrawGlyph().

◆ m_rotation

double KIGFX::GAL::m_rotation
protectedinherited

Rotation transformation (radians)

Definition at line 1048 of file graphics_abstraction_layer.h.

Referenced by KIGFX::GAL::ComputeWorldScreenMatrix(), KIGFX::GAL::GetRotation(), and KIGFX::GAL::SetRotation().

◆ m_screenDPI

double KIGFX::GAL::m_screenDPI
protectedinherited

◆ m_screenSize

◆ m_screenWorldMatrix

◆ m_stroke

bool CALLBACK_GAL::m_stroke
private

Definition at line 86 of file callback_gal.h.

Referenced by CALLBACK_GAL(), and DrawGlyph().

◆ m_strokeCallback

std::function<void( const VECTOR2I& aPt1, const VECTOR2I& aPt2 )> CALLBACK_GAL::m_strokeCallback
private

Definition at line 78 of file callback_gal.h.

Referenced by CALLBACK_GAL(), and DrawGlyph().

◆ m_strokeColor

◆ m_triangleCallback

std::function<void( const VECTOR2I& aPt1, const VECTOR2I& aPt2, const VECTOR2I& aPt3 )> CALLBACK_GAL::m_triangleCallback
private

Definition at line 82 of file callback_gal.h.

Referenced by CALLBACK_GAL(), and DrawGlyph().

◆ m_triangulate

bool CALLBACK_GAL::m_triangulate
private

Definition at line 87 of file callback_gal.h.

Referenced by CALLBACK_GAL(), and DrawGlyph().

◆ m_worldScale

◆ m_worldScreenMatrix

◆ m_worldUnitLength

double KIGFX::GAL::m_worldUnitLength
protectedinherited

◆ m_zoomFactor

double KIGFX::GAL::m_zoomFactor
protectedinherited

◆ MAX_DEPTH

const int GAL::MAX_DEPTH = 1023
staticprotectedinherited

Definition at line 1009 of file graphics_abstraction_layer.h.

Referenced by KIGFX::GAL::GAL().

◆ MIN_DEPTH

const int GAL::MIN_DEPTH = -1024
staticprotectedinherited

Possible depth range.

Definition at line 1008 of file graphics_abstraction_layer.h.

Referenced by KIGFX::GAL::GAL().


The documentation for this class was generated from the following files: