KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGFX::OPENGL_GAL Class Reference

OpenGL implementation of the Graphics Abstraction Layer. More...

#include <opengl_gal.h>

Inheritance diagram for KIGFX::OPENGL_GAL:
KIGFX::GAL HIDPI_GL_CANVAS KIGFX::GAL_DISPLAY_OPTIONS_OBSERVER

Classes

struct  TessParams
 

Public Member Functions

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

Static Public Member Functions

static wxString CheckFeatures (GAL_DISPLAY_OPTIONS &aOptions)
 Checks OpenGL features.
 

Protected Member Functions

void computeWorldScale ()
 Compute the scaling factor for the world->screen matrix.
 
double computeMinGridSpacing () const
 compute minimum grid spacing from the grid settings
 
COLOR4D getCursorColor () const
 Get the actual cursor color to draw.
 
void OnGalDisplayOptionsChanged (const GAL_DISPLAY_OPTIONS &aOptions) override
 Handler for observer settings changes.
 

Protected Attributes

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

Static Protected Attributes

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

Private Types

typedef GAL super
 Super class definition.
 
typedef std::unordered_map< unsigned int, std::shared_ptr< VERTEX_ITEM > > GROUPS_MAP
 

Private Member Functions

void beginUpdate () override
 
void endUpdate () override
 
bool updatedGalDisplayOptions (const GAL_DISPLAY_OPTIONS &aOptions) override
 Handle updating display options.
 
void drawLineQuad (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, bool aReserve=true)
 Draw a quad for the line.
 
void reserveLineQuads (const int aLineCount)
 Reserves specified number of line quads.
 
void drawSemiCircle (const VECTOR2D &aCenterPoint, double aRadius, double aAngle)
 Draw a semicircle.
 
void drawFilledSemiCircle (const VECTOR2D &aCenterPoint, double aRadius, double aAngle)
 Draw a filled semicircle.
 
void drawStrokedSemiCircle (const VECTOR2D &aCenterPoint, double aRadius, double aAngle, bool aReserve=true)
 Draw a stroked semicircle.
 
void drawCircle (const VECTOR2D &aCenterPoint, double aRadius, bool aReserve=true)
 Internal method for circle drawing.
 
void drawPolyline (const std::function< VECTOR2D(int)> &aPointGetter, int aPointCount, bool aReserve=true)
 Generic way of drawing a polyline stored in different containers.
 
void drawSegmentChain (const std::function< VECTOR2D(int)> &aPointGetter, int aPointCount, double aWidth, bool aReserve=true)
 Generic way of drawing a chain of segments stored in different containers.
 
void drawSegment (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth, bool aReserve=true)
 Internal method for segment drawing.
 
void drawPolygon (GLdouble *aPoints, int aPointCount)
 Draw a filled polygon.
 
void drawTriangulatedPolyset (const SHAPE_POLY_SET &aPoly, bool aStrokeTriangulation)
 Draw a set of polygons with a cached triangulation.
 
int drawBitmapChar (unsigned long aChar, bool aReserve=true)
 Draw a single character using bitmap font.
 
void drawBitmapOverbar (double aLength, double aHeight, bool aReserve=true)
 Draw an overbar over the currently drawn text.
 
std::pair< VECTOR2D, float > computeBitmapTextSize (const UTF8 &aText) const
 Compute a size of text drawn using bitmap font with current text setting applied.
 
void onPaint (wxPaintEvent &aEvent)
 This is the OnPaint event handler.
 
void skipMouseEvent (wxMouseEvent &aEvent)
 Skip the mouse event to the parent.
 
void onSetNativeCursor (wxSetCursorEvent &aEvent)
 Give the correct cursor image when the native widget asks for it.
 
void blitCursor ()
 Blit cursor into the current screen.
 
unsigned int getNewGroupNumber ()
 Return a valid key that can be used as a new group number.
 
double calcAngleStep (double aRadius) const
 Compute the angle step when drawing arcs/circles approximated with lines.
 
double getWorldPixelSize () const
 
VECTOR2D getScreenPixelSize () const
 
void init ()
 Basic OpenGL initialization and feature checks.
 

Private Attributes

wxGLContext * m_glPrivContext
 Canvas-specific OpenGL context.
 
int m_swapInterval
 Used to store swap interval information.
 
wxEvtHandler * m_mouseListener
 
wxEvtHandler * m_paintListener
 
GROUPS_MAP m_groups
 Stores information about VBO objects (groups)
 
unsigned int m_groupCounter
 Counter used for generating keys for groups.
 
VERTEX_MANAGERm_currentManager
 Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs).
 
VERTEX_MANAGERm_cachedManager
 Container for storing cached VERTEX_ITEMs.
 
VERTEX_MANAGERm_nonCachedManager
 Container for storing non-cached VERTEX_ITEMs.
 
VERTEX_MANAGERm_overlayManager
 Container for storing overlaid VERTEX_ITEMs.
 
VERTEX_MANAGERm_tempManager
 Container for storing temp (diff mode) VERTEX_ITEMs.
 
OPENGL_COMPOSITORm_compositor
 Handles multiple rendering targets.
 
unsigned int m_mainBuffer
 Main rendering target.
 
unsigned int m_overlayBuffer
 Auxiliary rendering target (for menus etc.)
 
unsigned int m_tempBuffer
 Temporary rendering target (for diffing etc.)
 
RENDER_TARGET m_currentTarget
 Current rendering target.
 
SHADERm_shader
 There is only one shader used for different objects.
 
bool m_isFramebufferInitialized
 Are the framebuffers initialized?
 
bool m_isBitmapFontInitialized
 Is the shader set to use bitmap fonts?
 
bool m_isInitialized
 Basic initialization flag, has to be done when the window is visible.
 
bool m_isGrouping
 Was a group started?
 
bool m_isContextLocked
 Used for assertion checking.
 
int m_lockClientCookie
 
GLint ufm_worldPixelSize
 
GLint ufm_screenPixelSize
 
GLint ufm_pixelSizeMultiplier
 
GLint ufm_antialiasingOffset
 
wxCursor m_currentwxCursor
 wxCursor showing the current native cursor
 
std::unique_ptr< GL_BITMAP_CACHEm_bitmapCache
 
GLUtesselator * m_tesselator
 
std::deque< std::shared_ptr< GLdouble > > m_tessIntersects
 
TEXT_ATTRIBUTES m_attributes
 
double m_scale_factor
 The current scale factor (e.g.
 

Static Private Attributes

static wxGLContext * m_glMainContext = nullptr
 Parent OpenGL context.
 
static int m_instanceCounter = 0
 GL GAL instance counter.
 
static GLuint g_fontTexture = 0
 Bitmap font texture handle (shared)
 
static bool m_isBitmapFontLoaded = false
 Is the bitmap font texture loaded?
 

Detailed Description

OpenGL implementation of the Graphics Abstraction Layer.

This is a direct OpenGL-implementation and uses low-level graphics primitives like triangles and quads. The purpose is to provide a fast graphics interface, that takes advantage of modern graphics card GPUs. All methods here benefit thus from the hardware acceleration.

Definition at line 70 of file opengl_gal.h.

Member Typedef Documentation

◆ GROUPS_MAP

typedef std::unordered_map< unsigned int, std::shared_ptr<VERTEX_ITEM> > KIGFX::OPENGL_GAL::GROUPS_MAP
private

Definition at line 343 of file opengl_gal.h.

◆ super

typedef GAL KIGFX::OPENGL_GAL::super
private

Super class definition.

Definition at line 331 of file opengl_gal.h.

Constructor & Destructor Documentation

◆ OPENGL_GAL()

OPENGL_GAL::OPENGL_GAL ( const KIGFX::VC_SETTINGS aVcSettings,
GAL_DISPLAY_OPTIONS aDisplayOptions,
wxWindow *  aParent,
wxEvtHandler *  aMouseListener = nullptr,
wxEvtHandler *  aPaintListener = nullptr,
const wxString &  aName = wxT( "GLCanvas" ) 
)
Parameters
aParentis the wxWidgets immediate wxWindow parent of this object.
aMouseListeneris the wxEvtHandler that should receive the mouse events, this can be can be any wxWindow, but is often a wxFrame container.
aPaintListeneris the wxEvtHandler that should receive the paint event. This can be any wxWindow, but is often a derived instance of this class or a containing wxFrame. The "paint event" here is a wxCommandEvent holding EVT_GAL_REDRAW, as sent by PostPaint().
aNameis the name of this window for use by wxWindow::FindWindowByName()

Definition at line 310 of file opengl_gal.cpp.

References BLUE, GL_CONTEXT_MANAGER::CreateCtx(), GL_CONTEXT_MANAGER::Get(), HIDPI_GL_CANVAS::GetNativePixelSize(), KIGFX::GAL_DISPLAY_OPTIONS::gl_antialiasing_mode, InitTesselatorCallbacks(), m_bitmapCache, m_compositor, m_glMainContext, m_glPrivContext, m_groupCounter, m_instanceCounter, m_isBitmapFontInitialized, m_isFramebufferInitialized, m_isGrouping, m_isInitialized, KIGFX::GAL::m_options, KIGFX::GAL::m_screenSize, m_shader, m_swapInterval, m_tesselator, onPaint(), onSetNativeCursor(), KIGFX::OPENGL_COMPOSITOR::SetAntialiasingMode(), KIGFX::GAL::SetAxesColor(), KIGFX::GAL::SetGridColor(), SetTarget(), skipMouseEvent(), KIGFX::TARGET_NONCACHED, ToVECTOR2I(), ufm_antialiasingOffset, ufm_pixelSizeMultiplier, ufm_screenPixelSize, and ufm_worldPixelSize.

◆ ~OPENGL_GAL()

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.

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

◆ BeginDrawing()

void OPENGL_GAL::BeginDrawing ( )
overridevirtual

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 from KIGFX::GAL.

Definition at line 549 of file opengl_gal.cpp.

References KIGFX::SHADER::AddParameter(), KIGFX::OPENGL_COMPOSITOR::Begin(), KIGFX::VERTEX_MANAGER::BeginDrawing(), checkGlError(), KIGFX::VERTEX_MANAGER::Clear(), ComputeWorldScreenMatrix(), KIGFX::OPENGL_COMPOSITOR::CreateBuffer(), KIGFX::SHADER::Deactivate(), KIGFX::OPENGL_COMPOSITOR::DIRECT_RENDERING, KIGFX::BUILTIN_FONT::font_image, g_fontTexture, KIGFX::OPENGL_COMPOSITOR::GetAntialiasRenderingOffset(), KIGFX::OPENGL_COMPOSITOR::GetAntialiasSupersamplingFactor(), HIDPI_GL_CANVAS::GetScaleFactor(), getScreenPixelSize(), getWorldPixelSize(), KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::height, init(), KIGFX::OPENGL_COMPOSITOR::Initialize(), IsVisible(), m_cachedManager, m_compositor, MATRIX3x3< T >::m_data, KIGFX::GAL::m_depthRange, KIGFX::GAL::m_fillColor, m_isBitmapFontInitialized, m_isBitmapFontLoaded, m_isContextLocked, m_isFramebufferInitialized, m_isInitialized, m_mainBuffer, m_nonCachedManager, m_overlayBuffer, m_overlayManager, KIGFX::GAL::m_screenSize, m_shader, KIGFX::GAL::m_strokeColor, m_tempBuffer, m_tempManager, KIGFX::GAL::m_worldScreenMatrix, PROF_TIMER::msecs(), KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::pixels, KIGFX::OPENGL_COMPOSITOR::SetBuffer(), KIGFX::GAL::SetFillColor(), KIGFX::SHADER::SetParameter(), KIGFX::GAL::SetStrokeColor(), PROF_TIMER::Stop(), traceGalProfile, ufm_antialiasingOffset, ufm_pixelSizeMultiplier, ufm_screenPixelSize, ufm_worldPixelSize, KIGFX::SHADER::Use(), KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::width, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ BeginGroup()

int OPENGL_GAL::BeginGroup ( )
overridevirtual

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 from KIGFX::GAL.

Definition at line 1988 of file opengl_gal.cpp.

References getNewGroupNumber(), m_cachedManager, m_groups, and m_isGrouping.

◆ beginUpdate()

void OPENGL_GAL::beginUpdate ( )
overrideprivatevirtual

◆ BitmapText()

◆ blitCursor()

◆ calcAngleStep()

double KIGFX::OPENGL_GAL::calcAngleStep ( double  aRadius) const
inlineprivate

Compute the angle step when drawing arcs/circles approximated with lines.

Definition at line 569 of file opengl_gal.h.

References SEG_PER_CIRCLE_COUNT.

Referenced by DrawArc().

◆ ChangeGroupColor()

void OPENGL_GAL::ChangeGroupColor ( int  aGroupNumber,
const COLOR4D aNewColor 
)
overridevirtual

Change the color used to draw the group.

Parameters
aGroupNumberis the group number.
aNewColoris the new color.

Reimplemented from KIGFX::GAL.

Definition at line 2016 of file opengl_gal.cpp.

References KIGFX::VERTEX_MANAGER::ChangeItemColor(), group, m_cachedManager, and m_groups.

◆ ChangeGroupDepth()

void OPENGL_GAL::ChangeGroupDepth ( int  aGroupNumber,
int  aDepth 
)
overridevirtual

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

Parameters
aGroupNumberis the group number.
aDepthis the new depth.

Reimplemented from KIGFX::GAL.

Definition at line 2025 of file opengl_gal.cpp.

References KIGFX::VERTEX_MANAGER::ChangeItemDepth(), group, m_cachedManager, and m_groups.

◆ CheckFeatures()

wxString OPENGL_GAL::CheckFeatures ( GAL_DISPLAY_OPTIONS aOptions)
static

Checks OpenGL features.

Parameters
aOptions
Returns
wxEmptyString if OpenGL 2.1 or greater is available, otherwise returns error message

Definition at line 463 of file opengl_gal.cpp.

References KIGFX::dummy(), and init().

Referenced by EDA_DRAW_PANEL_GAL::SwitchBackend().

◆ ClearCache()

void OPENGL_GAL::ClearCache ( )
overridevirtual

Delete all data created during caching of graphic items.

Reimplemented from KIGFX::GAL.

Definition at line 2041 of file opengl_gal.cpp.

References KIGFX::VERTEX_MANAGER::Clear(), m_bitmapCache, m_cachedManager, m_groups, and m_isInitialized.

Referenced by ~OPENGL_GAL().

◆ ClearScreen()

void OPENGL_GAL::ClearScreen ( )
overridevirtual

Clear the screen.

Parameters
aColoris the color used for clearing.

Reimplemented from KIGFX::GAL.

Definition at line 1929 of file opengl_gal.cpp.

References KIGFX::OPENGL_COMPOSITOR::DIRECT_RENDERING, m_compositor, and KIGFX::OPENGL_COMPOSITOR::SetBuffer().

◆ ClearTarget()

void OPENGL_GAL::ClearTarget ( RENDER_TARGET  aTarget)
overridevirtual

◆ computeBitmapTextSize()

std::pair< VECTOR2D, float > OPENGL_GAL::computeBitmapTextSize ( const UTF8 aText) const
private

Compute a size of text drawn using bitmap font with current text setting applied.

Parameters
aTextis the text to be drawn.
Returns
Pair containing text bounding box and common Y axis offset. The values are expressed as a number of pixels on the bitmap font texture and need to be scaled before drawing.

Definition at line 2552 of file opengl_gal.cpp.

References KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::advance, KIGFX::BUILTIN_FONT::font_information, KIGFX::BUILTIN_FONT::LookupGlyph(), KIGFX::BUILTIN_FONT::FONT_INFO_TYPE::max_y, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::maxy, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::miny, UTF8::ubegin(), UTF8::uend(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BitmapText().

◆ 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.

References KIGFX::GAL::m_gridMinSpacing.

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

◆ 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.

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

◆ ComputeWorldScreenMatrix()

void OPENGL_GAL::ComputeWorldScreenMatrix ( )
overridevirtual

Compute the world <-> screen transformation matrix.

Reimplemented from KIGFX::GAL.

Definition at line 2829 of file opengl_gal.cpp.

References KIGFX::GAL::computeWorldScale(), KIGFX::GAL::ComputeWorldScreenMatrix(), KIGFX::GAL::m_lookAtPoint, KIGFX::GAL::m_worldScale, round_to_half_pixel(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BeginDrawing().

◆ DeleteGroup()

void OPENGL_GAL::DeleteGroup ( int  aGroupNumber)
overridevirtual

Delete the group from the memory.

Parameters
aGroupNumberis the group number.

Reimplemented from KIGFX::GAL.

Definition at line 2034 of file opengl_gal.cpp.

References m_groups.

◆ DrawArc()

void OPENGL_GAL::DrawArc ( const VECTOR2D aCenterPoint,
double  aRadius,
const EDA_ANGLE aStartAngle,
const EDA_ANGLE aAngle 
)
overridevirtual

◆ DrawArcSegment()

void OPENGL_GAL::DrawArcSegment ( const VECTOR2D aCenterPoint,
double  aRadius,
const EDA_ANGLE aStartAngle,
const EDA_ANGLE aAngle,
double  aWidth,
double  aMaxError 
)
overridevirtual

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.
aAngleis the 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 from KIGFX::GAL.

Definition at line 1046 of file opengl_gal.cpp.

References KIGFX::COLOR4D::a, EDA_ANGLE::AsRadians(), KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), DrawCircle(), DrawLine(), drawLineQuad(), DrawSegment(), drawStrokedSemiCircle(), FULL_CIRCLE, KIGFX::COLOR4D::g, GetArcToSegmentCount(), KiROUND(), m_currentManager, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_isStrokeEnabled, KIGFX::GAL::m_strokeColor, KIGFX::COLOR4D::r, reserveLineQuads(), Restore(), Save(), SEG_PER_CIRCLE_COUNT, KIGFX::GAL::SetLineWidth(), SWAP, KIGFX::VERTEX_MANAGER::Translate(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ DrawBitmap()

◆ drawBitmapChar()

◆ drawBitmapOverbar()

void OPENGL_GAL::drawBitmapOverbar ( double  aLength,
double  aHeight,
bool  aReserve = true 
)
private

Draw an overbar over the currently drawn text.

Its main purpose is to be used in BitmapText() function. This method requires appropriate scaling to be applied (as is done in BitmapText() function). The current X coordinate will be the overbar ending.

Parameters
aLengthis the width of the overbar.
aHeightis the height for the overbar.
aReserveif set to false, reserve 6 vertices for each overbar.

Definition at line 2521 of file opengl_gal.cpp.

References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), KIGFX::COLOR4D::g, H, KIGFX::BUILTIN_FONT::LookupGlyph(), m_currentManager, KIGFX::GAL::m_strokeColor, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::maxy, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::miny, KIGFX::COLOR4D::r, KIGFX::VERTEX_MANAGER::Reserve(), Restore(), Save(), KIGFX::VERTEX_MANAGER::Shader(), Translate(), and KIGFX::VERTEX_MANAGER::Vertex().

Referenced by BitmapText().

◆ DrawCircle()

void OPENGL_GAL::DrawCircle ( const VECTOR2D aCenterPoint,
double  aRadius 
)
overridevirtual

Draw a circle using world coordinates.

Parameters
aCenterPointis the center point of the circle.
aRadiusis the radius of the circle.

Reimplemented from KIGFX::GAL.

Definition at line 898 of file opengl_gal.cpp.

References drawCircle().

Referenced by DrawArcSegment().

◆ drawCircle()

◆ DrawCursor()

void OPENGL_GAL::DrawCursor ( const VECTOR2D aCursorPosition)
overridevirtual

Draw the cursor.

Parameters
aCursorPositionis the cursor position in screen coordinates.

Reimplemented from KIGFX::GAL.

Definition at line 2173 of file opengl_gal.cpp.

References KIGFX::GAL::m_cursorPosition.

◆ DrawCurve()

void OPENGL_GAL::DrawCurve ( const VECTOR2D startPoint,
const VECTOR2D controlPointA,
const VECTOR2D controlPointB,
const VECTOR2D endPoint,
double  aFilterValue = 0.0 
)
overridevirtual

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 from KIGFX::GAL.

Definition at line 1483 of file opengl_gal.cpp.

References DrawPolygon(), and BEZIER_POLY::GetPoly().

◆ drawFilledSemiCircle()

void OPENGL_GAL::drawFilledSemiCircle ( const VECTOR2D aCenterPoint,
double  aRadius,
double  aAngle 
)
private

Draw a filled semicircle.

Parameters
aCenterPointis the center point.
aRadiusis the radius of the semicircle.
aAngleis the angle of the semicircle.

Definition at line 2255 of file opengl_gal.cpp.

References m_currentManager, KIGFX::GAL::m_layerDepth, KIGFX::VERTEX_MANAGER::Reserve(), Restore(), KIGFX::VERTEX_MANAGER::Rotate(), Save(), KIGFX::VERTEX_MANAGER::Shader(), KIGFX::SHADER_FILLED_CIRCLE, KIGFX::VERTEX_MANAGER::Translate(), KIGFX::VERTEX_MANAGER::Vertex(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by drawSemiCircle().

◆ DrawGlyph()

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

◆ DrawGlyphs()

◆ DrawGrid()

◆ DrawGroup()

void OPENGL_GAL::DrawGroup ( int  aGroupNumber)
overridevirtual

Draw the stored group.

Parameters
aGroupNumberis the group number.

Reimplemented from KIGFX::GAL.

Definition at line 2007 of file opengl_gal.cpp.

References KIGFX::VERTEX_MANAGER::DrawItem(), group, m_cachedManager, and m_groups.

◆ DrawLine()

void OPENGL_GAL::DrawLine ( const VECTOR2D aStartPoint,
const VECTOR2D aEndPoint 
)
overridevirtual

Draw a line.

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

Parameters
aStartPointis the start point of the line.
aEndPointis the end point of the line.

Reimplemented from KIGFX::GAL.

Definition at line 825 of file opengl_gal.cpp.

References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), drawLineQuad(), KIGFX::COLOR4D::g, m_currentManager, KIGFX::GAL::m_strokeColor, and KIGFX::COLOR4D::r.

Referenced by DrawArcSegment(), DrawGrid(), DrawRectangle(), and drawTriangulatedPolyset().

◆ drawLineQuad()

void OPENGL_GAL::drawLineQuad ( const VECTOR2D aStartPoint,
const VECTOR2D aEndPoint,
bool  aReserve = true 
)
private

Draw a quad for the line.

Parameters
aStartPointis the start point of the line.
aEndPointis the end point of the line.
aReserveif set to false, call reserveLineQuads beforehand to reserve the right amount of vertices.

Definition at line 2183 of file opengl_gal.cpp.

References KIGFX::VERTEX_MANAGER::GetTransformation(), m_currentManager, KIGFX::GAL::m_layerDepth, KIGFX::GAL::m_lineWidth, reserveLineQuads(), KIGFX::VERTEX_MANAGER::Shader(), KIGFX::SHADER_LINE_A, KIGFX::SHADER_LINE_B, KIGFX::SHADER_LINE_C, KIGFX::SHADER_LINE_D, KIGFX::SHADER_LINE_E, KIGFX::SHADER_LINE_F, v1, v2, KIGFX::VERTEX_MANAGER::Vertex(), VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, and VECTOR3< T >::y.

Referenced by DrawArc(), DrawArcSegment(), DrawLine(), drawPolyline(), and drawSegment().

◆ DrawPolygon() [1/4]

void OPENGL_GAL::DrawPolygon ( const SHAPE_LINE_CHAIN aPolySet)
overridevirtual

◆ DrawPolygon() [2/4]

void OPENGL_GAL::DrawPolygon ( const SHAPE_POLY_SET aPolySet,
bool  aStrokeTriangulation = false 
)
overridevirtual

◆ DrawPolygon() [3/4]

void OPENGL_GAL::DrawPolygon ( const std::deque< VECTOR2D > &  aPointList)
overridevirtual

Draw a polygon.

Parameters
aPointListis the list of the polygon points.

Reimplemented from KIGFX::GAL.

Definition at line 1331 of file opengl_gal.cpp.

References drawPolygon(), and KIGFX::GAL::m_layerDepth.

Referenced by DrawCurve(), and DrawPolygon().

◆ DrawPolygon() [4/4]

void OPENGL_GAL::DrawPolygon ( const VECTOR2D  aPointList[],
int  aListSize 
)
overridevirtual

Reimplemented from KIGFX::GAL.

Definition at line 1348 of file opengl_gal.cpp.

References drawPolygon(), KIGFX::GAL::m_layerDepth, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ drawPolygon()

void OPENGL_GAL::drawPolygon ( GLdouble *  aPoints,
int  aPointCount 
)
private

Draw a filled polygon.

It does not need the last point to have the same coordinates as the first one.

Parameters
aPointsis the vertices data (3 coordinates: x, y, z).
aPointCountis the number of points.

Definition at line 2321 of file opengl_gal.cpp.

References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), drawPolyline(), KIGFX::COLOR4D::g, m_currentManager, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_isStrokeEnabled, m_tesselator, m_tessIntersects, KIGFX::COLOR4D::r, KIGFX::VERTEX_MANAGER::Shader(), and KIGFX::SHADER_NONE.

Referenced by DrawPolygon().

◆ DrawPolyline() [1/4]

void OPENGL_GAL::DrawPolyline ( const SHAPE_LINE_CHAIN aLineChain)
overridevirtual

◆ DrawPolyline() [2/4]

void OPENGL_GAL::DrawPolyline ( const std::deque< VECTOR2D > &  aPointList)
overridevirtual

Draw a polyline.

Parameters
aPointListis a list of 2D-Vectors containing the polyline points.

Reimplemented from KIGFX::GAL.

Definition at line 1261 of file opengl_gal.cpp.

References drawPolyline().

Referenced by DrawRectangle(), and drawTriangulatedPolyset().

◆ drawPolyline()

void OPENGL_GAL::drawPolyline ( const std::function< VECTOR2D(int)> &  aPointGetter,
int  aPointCount,
bool  aReserve = true 
)
private

Generic way of drawing a polyline stored in different containers.

Parameters
aPointGetteris a function to obtain coordinates of n-th vertex.
aPointCountis the number of points to be drawn.
aReserveif set to false, reserve aPointCount - 1 line quads.

Definition at line 2361 of file opengl_gal.cpp.

References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), drawLineQuad(), KIGFX::COLOR4D::g, m_currentManager, KIGFX::GAL::m_strokeColor, KIGFX::COLOR4D::r, and reserveLineQuads().

Referenced by DrawGlyphs(), drawPolygon(), DrawPolyline(), and DrawPolylines().

◆ DrawPolyline() [3/4]

void OPENGL_GAL::DrawPolyline ( const std::vector< VECTOR2D > &  aPointList)
overridevirtual

Reimplemented from KIGFX::GAL.

Definition at line 1272 of file opengl_gal.cpp.

References drawPolyline().

◆ DrawPolyline() [4/4]

void OPENGL_GAL::DrawPolyline ( const VECTOR2D  aPointList[],
int  aListSize 
)
overridevirtual

Reimplemented from KIGFX::GAL.

Definition at line 1283 of file opengl_gal.cpp.

References drawPolyline().

◆ DrawPolylines()

void OPENGL_GAL::DrawPolylines ( const std::vector< std::vector< VECTOR2D > > &  aPointLists)
overridevirtual

Draw multiple polylines.

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

Reimplemented from KIGFX::GAL.

Definition at line 1310 of file opengl_gal.cpp.

References drawPolyline(), and reserveLineQuads().

Referenced by DrawGlyph().

◆ DrawRectangle() [1/2]

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

◆ DrawRectangle() [2/2]

void OPENGL_GAL::DrawRectangle ( const VECTOR2D aStartPoint,
const VECTOR2D aEndPoint 
)
overridevirtual

◆ DrawSegment()

void OPENGL_GAL::DrawSegment ( const VECTOR2D aStartPoint,
const VECTOR2D aEndPoint,
double  aWidth 
)
overridevirtual

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 from KIGFX::GAL.

Definition at line 833 of file opengl_gal.cpp.

References drawSegment().

Referenced by DrawArcSegment().

◆ drawSegment()

◆ DrawSegmentChain() [1/2]

void OPENGL_GAL::DrawSegmentChain ( const SHAPE_LINE_CHAIN aLineChain,
double  aWidth 
)
overridevirtual

◆ drawSegmentChain()

void OPENGL_GAL::drawSegmentChain ( const std::function< VECTOR2D(int)> &  aPointGetter,
int  aPointCount,
double  aWidth,
bool  aReserve = true 
)
private

Generic way of drawing a chain of segments stored in different containers.

Parameters
aPointGetteris a function to obtain coordinates of n-th vertex.
aPointCountis the number of points to be drawn.
aReserveif set to false, do not reserve vertices internally.

Definition at line 2389 of file opengl_gal.cpp.

References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), drawSegment(), VECTOR2< T >::EuclideanNorm(), KIGFX::COLOR4D::g, m_currentManager, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_strokeColor, KIGFX::COLOR4D::r, and KIGFX::VERTEX_MANAGER::Reserve().

Referenced by DrawSegmentChain().

◆ DrawSegmentChain() [2/2]

void OPENGL_GAL::DrawSegmentChain ( const std::vector< VECTOR2D > &  aPointList,
double  aWidth 
)
overridevirtual

Draw a chain of rounded segments.

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

Reimplemented from KIGFX::GAL.

Definition at line 1234 of file opengl_gal.cpp.

References drawSegmentChain().

◆ drawSemiCircle()

void OPENGL_GAL::drawSemiCircle ( const VECTOR2D aCenterPoint,
double  aRadius,
double  aAngle 
)
private

Draw a semicircle.

Depending on settings (m_isStrokeEnabled & isFilledEnabled) it runs the proper function (drawStrokedSemiCircle or drawFilledSemiCircle).

Parameters
aCenterPointis the center point.
aRadiusis the radius of the semicircle.
aAngleis the angle of the semicircle.

Definition at line 2238 of file opengl_gal.cpp.

References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), drawFilledSemiCircle(), drawStrokedSemiCircle(), KIGFX::COLOR4D::g, m_currentManager, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_isStrokeEnabled, KIGFX::GAL::m_strokeColor, and KIGFX::COLOR4D::r.

◆ drawStrokedSemiCircle()

void OPENGL_GAL::drawStrokedSemiCircle ( const VECTOR2D aCenterPoint,
double  aRadius,
double  aAngle,
bool  aReserve = true 
)
private

Draw a stroked semicircle.

Parameters
aCenterPointis the center point.
aRadiusis the radius of the semicircle.
aAngleis the angle of the semicircle.
aReserveif set to false, reserve 3 vertices for each semicircle.

Definition at line 2285 of file opengl_gal.cpp.

References m_currentManager, KIGFX::GAL::m_layerDepth, KIGFX::GAL::m_lineWidth, KIGFX::VERTEX_MANAGER::Reserve(), Restore(), KIGFX::VERTEX_MANAGER::Rotate(), Save(), KIGFX::VERTEX_MANAGER::Shader(), KIGFX::SHADER_STROKED_CIRCLE, KIGFX::VERTEX_MANAGER::Translate(), KIGFX::VERTEX_MANAGER::Vertex(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by DrawArcSegment(), drawSegment(), and drawSemiCircle().

◆ drawTriangulatedPolyset()

◆ EnableDepthTest()

void OPENGL_GAL::EnableDepthTest ( bool  aEnabled = false)
overridevirtual

◆ EndDiffLayer()

void OPENGL_GAL::EndDiffLayer ( )
overridevirtual

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 from KIGFX::GAL.

Definition at line 2132 of file opengl_gal.cpp.

References KIGFX::OPENGL_COMPOSITOR::DrawBuffer(), KIGFX::VERTEX_MANAGER::EndDrawing(), m_compositor, m_currentManager, m_mainBuffer, and m_tempBuffer.

◆ EndDrawing()

void OPENGL_GAL::EndDrawing ( )
overridevirtual

◆ EndGroup()

void OPENGL_GAL::EndGroup ( )
overridevirtual

End the group.

Reimplemented from KIGFX::GAL.

Definition at line 2000 of file opengl_gal.cpp.

References KIGFX::VERTEX_MANAGER::FinishItem(), m_cachedManager, and m_isGrouping.

◆ 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.

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

◆ endUpdate()

void OPENGL_GAL::endUpdate ( )
overrideprivatevirtual

Update handler for OpenGL settings

Reimplemented from KIGFX::GAL.

Definition at line 816 of file opengl_gal.cpp.

References m_cachedManager, m_isInitialized, and KIGFX::VERTEX_MANAGER::Unmap().

◆ Flush()

void OPENGL_GAL::Flush ( )
overridevirtual

Force all remaining objects to be drawn.

Reimplemented from KIGFX::GAL.

Definition at line 1923 of file opengl_gal.cpp.

◆ GetClearColor()

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

Definition at line 263 of file graphics_abstraction_layer.h.

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.

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

Referenced by 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.

◆ GetGlyphSize()

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

Definition at line 396 of file graphics_abstraction_layer.h.

Referenced by BitmapText().

◆ 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.

◆ GetGridOrigin()

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

Definition at line 746 of file graphics_abstraction_layer.h.

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.

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.

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.

Referenced by 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.

Referenced by KIGFX::GAL::BitmapText(), CALLBACK_GAL::DrawGlyph(), DrawGrid(), and ROUTER_PREVIEW_ITEM::drawLineChain().

◆ GetLookAtPoint()

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

Definition at line 582 of file graphics_abstraction_layer.h.

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

◆ GetMaxDepth()

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

◆ GetMinDepth()

◆ GetNativePixelSize()

wxSize HIDPI_GL_CANVAS::GetNativePixelSize ( ) const
virtualinherited

◆ GetNativePosition()

wxPoint HIDPI_GL_CANVAS::GetNativePosition ( const wxPoint &  aPoint) const
inherited

Convert the given point from client coordinates to native pixel coordinates.

Definition at line 55 of file hidpi_gl_canvas.cpp.

References HIDPI_GL_CANVAS::GetScaleFactor().

Referenced by EDA_3D_MODEL_VIEWER::OnMouseMove(), HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), and HIDPI_GL_3D_CANVAS::OnMouseWheelCamera().

◆ getNewGroupNumber()

unsigned int OPENGL_GAL::getNewGroupNumber ( )
private

Return a valid key that can be used as a new group number.

Returns
An unique group number that is not used by any other group.

Definition at line 2659 of file opengl_gal.cpp.

References m_groupCounter, and m_groups.

Referenced by BeginGroup().

◆ GetRotation()

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

Definition at line 591 of file graphics_abstraction_layer.h.

◆ GetScaleFactor()

double HIDPI_GL_CANVAS::GetScaleFactor ( ) const
inherited

◆ GetScreenPixelSize()

◆ getScreenPixelSize()

VECTOR2D OPENGL_GAL::getScreenPixelSize ( ) const
private

◆ GetScreenWorldMatrix()

◆ 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.

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

◆ GetSwapInterval()

int KIGFX::OPENGL_GAL::GetSwapInterval ( ) const
inlineoverridevirtual

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

Reimplemented from KIGFX::GAL.

Definition at line 192 of file opengl_gal.h.

◆ GetTarget()

RENDER_TARGET OPENGL_GAL::GetTarget ( ) const
overridevirtual

Get the currently used target for rendering.

Returns
The current rendering target.

Reimplemented from KIGFX::GAL.

Definition at line 2067 of file opengl_gal.cpp.

References m_currentTarget.

◆ GetVerticalJustify()

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

Definition at line 422 of file graphics_abstraction_layer.h.

Referenced by 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.

References VECTOR2< T >::x, and VECTOR2< T >::y.

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

◆ GetVisibleWorldExtents()

BOX2D GAL::GetVisibleWorldExtents ( ) const
inherited

◆ getWorldPixelSize()

double OPENGL_GAL::getWorldPixelSize ( ) const
private

◆ 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.

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

◆ GetZoomFactor()

◆ HasTarget()

bool OPENGL_GAL::HasTarget ( RENDER_TARGET  aTarget)
overridevirtual

Return true if the target exists.

Parameters
aTargetis the target to be checked.

Reimplemented from KIGFX::GAL.

Definition at line 2108 of file opengl_gal.cpp.

References m_overlayBuffer, m_tempBuffer, KIGFX::TARGET_CACHED, KIGFX::TARGET_NONCACHED, KIGFX::TARGET_OVERLAY, and KIGFX::TARGET_TEMP.

◆ init()

◆ 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.

Referenced by getShadowLayer().

◆ IsContextLocked()

bool KIGFX::OPENGL_GAL::IsContextLocked ( )
inlineoverridevirtual

Checks the state of the context lock.

Returns
True if the context is currently locked

Reimplemented from KIGFX::GAL.

Definition at line 304 of file opengl_gal.h.

◆ 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.

Referenced by 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.

◆ IsFontBold()

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

Definition at line 399 of file graphics_abstraction_layer.h.

◆ IsFontItalic()

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

Definition at line 402 of file graphics_abstraction_layer.h.

◆ IsFontUnderlined()

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

Definition at line 405 of file graphics_abstraction_layer.h.

◆ IsInitialized()

bool KIGFX::OPENGL_GAL::IsInitialized ( ) const
inlineoverridevirtual

Return the initialization status for the canvas.

Return true if the GAL canvas is visible on the screen.

Reimplemented from KIGFX::GAL.

Definition at line 104 of file opengl_gal.h.

◆ IsOpenGlEngine()

bool KIGFX::OPENGL_GAL::IsOpenGlEngine ( )
inlineoverridevirtual

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

Reimplemented from KIGFX::GAL.

Definition at line 101 of file opengl_gal.h.

◆ IsTextMirrored()

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

Definition at line 408 of file graphics_abstraction_layer.h.

Referenced by BitmapText().

◆ IsVisible()

bool KIGFX::OPENGL_GAL::IsVisible ( ) const
inlineoverridevirtual

Return true if the GAL canvas is visible on the screen.

Reimplemented from KIGFX::GAL.

Definition at line 111 of file opengl_gal.h.

Referenced by BeginDrawing(), and beginUpdate().

◆ LockContext()

void OPENGL_GAL::LockContext ( int  aClientCookie)
overridevirtual

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

Reimplemented from KIGFX::GAL.

Definition at line 776 of file opengl_gal.cpp.

References GL_CONTEXT_MANAGER::Get(), GL_CONTEXT_MANAGER::LockCtx(), m_glPrivContext, m_isContextLocked, and m_lockClientCookie.

◆ 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.

References KIGFX::GAL::updatedGalDisplayOptions().

◆ onPaint()

void OPENGL_GAL::onPaint ( wxPaintEvent &  aEvent)
private

This is the OnPaint event handler.

Parameters
aEventis the OnPaint event.

Definition at line 2612 of file opengl_gal.cpp.

References PostPaint().

Referenced by OPENGL_GAL().

◆ onSetNativeCursor()

void OPENGL_GAL::onSetNativeCursor ( wxSetCursorEvent &  aEvent)
private

Give the correct cursor image when the native widget asks for it.

Parameters
aEventis the cursor event to plac the cursor into.

Definition at line 2167 of file opengl_gal.cpp.

References m_currentwxCursor.

Referenced by OPENGL_GAL().

◆ 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.

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

◆ PostPaint()

void OPENGL_GAL::PostPaint ( wxPaintEvent &  aEvent)

Function PostPaint posts an event to m_paint_listener.

A post is used so that the actual drawing function can use a device context type that is not specific to the wxEVT_PAINT event, just by changing the PostPaint code.

Definition at line 496 of file opengl_gal.cpp.

References m_paintListener.

Referenced by onPaint().

◆ PushDepth()

void KIGFX::GAL::PushDepth ( )
inlineinherited

Store current drawing depth on the depth stack.

Definition at line 940 of file graphics_abstraction_layer.h.

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

◆ reserveLineQuads()

void OPENGL_GAL::reserveLineQuads ( const int  aLineCount)
private

Reserves specified number of line quads.

Parameters
aLineCountthe number of line quads to reserve.

Definition at line 2232 of file opengl_gal.cpp.

References m_currentManager, and KIGFX::VERTEX_MANAGER::Reserve().

Referenced by DrawArc(), DrawArcSegment(), DrawGlyphs(), drawLineQuad(), drawPolyline(), and DrawPolylines().

◆ ResetTextAttributes()

void GAL::ResetTextAttributes ( )
inherited

◆ ResizeScreen()

void OPENGL_GAL::ResizeScreen ( int  aWidth,
int  aHeight 
)
overridevirtual

◆ Restore()

void OPENGL_GAL::Restore ( )
overridevirtual

◆ Rotate()

void OPENGL_GAL::Rotate ( double  aAngle)
overridevirtual

Rotate the context.

Parameters
aAngleis the rotation angle in radians.

Reimplemented from KIGFX::GAL.

Definition at line 1958 of file opengl_gal.cpp.

References m_currentManager, and KIGFX::VERTEX_MANAGER::Rotate().

◆ Save()

void OPENGL_GAL::Save ( )
overridevirtual

◆ Scale()

void OPENGL_GAL::Scale ( const VECTOR2D aScale)
overridevirtual

Scale the context.

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

Reimplemented from KIGFX::GAL.

Definition at line 1970 of file opengl_gal.cpp.

References m_currentManager, KIGFX::VERTEX_MANAGER::Scale(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ 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.

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.

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.

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.

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.

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

◆ 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.

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.

References VECTOR2< T >::x.

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

◆ SetLineWidth()

virtual void KIGFX::GAL::SetLineWidth ( float  aLineWidth)
inlinevirtualinherited

◆ 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.

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

◆ SetMouseListener()

void KIGFX::OPENGL_GAL::SetMouseListener ( wxEvtHandler *  aMouseListener)
inline

Definition at line 292 of file opengl_gal.h.

◆ SetNativeCursorStyle()

bool OPENGL_GAL::SetNativeCursorStyle ( KICURSOR  aCursor)
overridevirtual

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 from KIGFX::GAL.

Definition at line 2152 of file opengl_gal.cpp.

References CURSOR_STORE::GetCursor(), KIGFX::GAL::m_currentNativeCursor, m_currentwxCursor, and KIGFX::GAL::SetNativeCursorStyle().

◆ SetNegativeDrawMode()

void KIGFX::OPENGL_GAL::SetNegativeDrawMode ( bool  aSetting)
inlineoverridevirtual

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 from KIGFX::GAL.

Definition at line 264 of file opengl_gal.h.

◆ SetPaintListener()

void KIGFX::OPENGL_GAL::SetPaintListener ( wxEvtHandler *  aPaintListener)
inline

Definition at line 297 of file opengl_gal.h.

◆ 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.

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

◆ SetScaleFactor()

void HIDPI_GL_CANVAS::SetScaleFactor ( double  aFactor)
inherited

◆ 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.

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.

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

◆ SetStrokeColor()

◆ SetTarget()

void OPENGL_GAL::SetTarget ( RENDER_TARGET  aTarget)
overridevirtual

Set the target for rendering.

Parameters
aTargetis the new target for rendering.

Reimplemented from KIGFX::GAL.

Definition at line 2052 of file opengl_gal.cpp.

References m_cachedManager, m_currentManager, m_currentTarget, m_nonCachedManager, m_overlayManager, m_tempManager, KIGFX::TARGET_CACHED, KIGFX::TARGET_NONCACHED, KIGFX::TARGET_OVERLAY, and KIGFX::TARGET_TEMP.

Referenced by DrawGrid(), OPENGL_GAL(), and StartDiffLayer().

◆ SetTextMirrored()

◆ SetVcSettings()

void HIDPI_GL_CANVAS::SetVcSettings ( const KIGFX::VC_SETTINGS aVcSettings)
inlineinherited

Definition at line 67 of file hidpi_gl_canvas.h.

Referenced by EDA_3D_VIEWER_FRAME::applySettings().

◆ 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.

◆ 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.

Referenced by KIGFX::GAL::GAL(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), SCH_PRINTOUT::PrintPage(), 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

◆ Show()

bool OPENGL_GAL::Show ( bool  aShow)
overridevirtual

Shows/hides the GAL canvas.

Reimplemented from KIGFX::GAL.

Definition at line 1912 of file opengl_gal.cpp.

◆ skipMouseEvent()

void OPENGL_GAL::skipMouseEvent ( wxMouseEvent &  aEvent)
private

Skip the mouse event to the parent.

Parameters
aEventis the mouse event.

Definition at line 2618 of file opengl_gal.cpp.

References m_mouseListener.

Referenced by OPENGL_GAL().

◆ StartDiffLayer()

void OPENGL_GAL::StartDiffLayer ( )
overridevirtual

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 from KIGFX::GAL.

Definition at line 2121 of file opengl_gal.cpp.

References ClearTarget(), KIGFX::VERTEX_MANAGER::EndDrawing(), m_currentManager, m_tempBuffer, SetTarget(), and KIGFX::TARGET_TEMP.

◆ 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.

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.

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.

◆ Transform()

void OPENGL_GAL::Transform ( const MATRIX3x3D aTransformation)
overridevirtual

Transform the context.

Parameters
aTransformationis the transformation matrix.

Reimplemented from KIGFX::GAL.

Definition at line 1940 of file opengl_gal.cpp.

References MATRIX3x3< T >::m_data.

◆ Translate()

void OPENGL_GAL::Translate ( const VECTOR2D aTranslation)
overridevirtual

Translate the context.

Parameters
aTranslationis the translation vector.

Reimplemented from KIGFX::GAL.

Definition at line 1964 of file opengl_gal.cpp.

References m_currentManager, KIGFX::VERTEX_MANAGER::Translate(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BitmapText(), drawBitmapChar(), and drawBitmapOverbar().

◆ UnlockContext()

void OPENGL_GAL::UnlockContext ( int  aClientCookie)
overridevirtual

◆ updatedGalDisplayOptions()

bool OPENGL_GAL::updatedGalDisplayOptions ( const GAL_DISPLAY_OPTIONS aOptions)
overrideprivatevirtual

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 from KIGFX::GAL.

Definition at line 504 of file opengl_gal.cpp.

References KIGFX::OPENGL_COMPOSITOR::GetAntialiasingMode(), HIDPI_GL_CANVAS::GetScaleFactor(), KIGFX::GAL_DISPLAY_OPTIONS::gl_antialiasing_mode, m_compositor, KIGFX::GAL_DISPLAY_OPTIONS::m_gridLineWidth, KIGFX::GAL::m_gridLineWidth, m_isFramebufferInitialized, KIGFX::GAL::m_options, KIGFX::GAL_DISPLAY_OPTIONS::m_scaleFactor, refresh, Refresh(), KIGFX::OPENGL_COMPOSITOR::SetAntialiasingMode(), HIDPI_GL_CANVAS::SetScaleFactor(), and KIGFX::GAL::updatedGalDisplayOptions().

Member Data Documentation

◆ g_fontTexture

GLuint OPENGL_GAL::g_fontTexture = 0
staticprivate

Bitmap font texture handle (shared)

Definition at line 340 of file opengl_gal.h.

Referenced by BeginDrawing(), and ~OPENGL_GAL().

◆ 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

TEXT_ATTRIBUTES KIGFX::GAL::m_attributes
privateinherited

Definition at line 1092 of file graphics_abstraction_layer.h.

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

◆ m_axesColor

COLOR4D KIGFX::GAL::m_axesColor
protectedinherited

Color of the axes.

Definition at line 1075 of file graphics_abstraction_layer.h.

Referenced by KIGFX::CAIRO_GAL_BASE::drawAxes(), and DrawGrid().

◆ m_axesEnabled

bool KIGFX::GAL::m_axesEnabled
protectedinherited

Should the axes be drawn.

Definition at line 1076 of file graphics_abstraction_layer.h.

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

◆ m_bitmapCache

std::unique_ptr<GL_BITMAP_CACHE> KIGFX::OPENGL_GAL::m_bitmapCache
private

Definition at line 381 of file opengl_gal.h.

Referenced by ClearCache(), DrawBitmap(), and OPENGL_GAL().

◆ m_cachedManager

VERTEX_MANAGER* KIGFX::OPENGL_GAL::m_cachedManager
private

◆ m_clearColor

COLOR4D KIGFX::GAL::m_clearColor
protectedinherited

◆ m_compositor

OPENGL_COMPOSITOR* KIGFX::OPENGL_GAL::m_compositor
private

◆ m_currentManager

◆ m_currentNativeCursor

KICURSOR KIGFX::GAL::m_currentNativeCursor
protectedinherited

◆ m_currentTarget

RENDER_TARGET KIGFX::OPENGL_GAL::m_currentTarget
private

Current rendering target.

Definition at line 359 of file opengl_gal.h.

Referenced by GetTarget(), and SetTarget().

◆ m_currentwxCursor

wxCursor KIGFX::OPENGL_GAL::m_currentwxCursor
private

wxCursor showing the current native cursor

Definition at line 379 of file opengl_gal.h.

Referenced by onSetNativeCursor(), and SetNativeCursorStyle().

◆ 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().

◆ m_cursorPosition

VECTOR2D KIGFX::GAL::m_cursorPosition
protectedinherited

Current cursor position (world coordinates)

Definition at line 1087 of file graphics_abstraction_layer.h.

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

◆ m_depthRange

VECTOR2D KIGFX::GAL::m_depthRange
protectedinherited

Range of the depth.

Definition at line 1066 of file graphics_abstraction_layer.h.

Referenced by BeginDrawing(), and KIGFX::CAIRO_GAL_BASE::DrawGrid().

◆ m_depthStack

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

Stored depth values.

Definition at line 1040 of file graphics_abstraction_layer.h.

◆ m_fillColor

◆ m_forceDisplayCursor

bool KIGFX::GAL::m_forceDisplayCursor
protectedinherited

Always show cursor.

Definition at line 1084 of file graphics_abstraction_layer.h.

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

◆ 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 blitCursor(), KIGFX::CAIRO_GAL_BASE::blitCursor(), KIGFX::GAL::GAL(), and KIGFX::GAL::updatedGalDisplayOptions().

◆ m_glMainContext

wxGLContext * OPENGL_GAL::m_glMainContext = nullptr
staticprivate

Parent OpenGL context.

Definition at line 333 of file opengl_gal.h.

Referenced by OPENGL_GAL(), and ~OPENGL_GAL().

◆ m_globalFlipX

bool KIGFX::GAL::m_globalFlipX
protectedinherited

◆ m_globalFlipY

bool KIGFX::GAL::m_globalFlipY
protectedinherited

◆ m_glPrivContext

wxGLContext* KIGFX::OPENGL_GAL::m_glPrivContext
private

Canvas-specific OpenGL context.

Definition at line 334 of file opengl_gal.h.

Referenced by LockContext(), OPENGL_GAL(), UnlockContext(), and ~OPENGL_GAL().

◆ m_gridColor

COLOR4D KIGFX::GAL::m_gridColor
protectedinherited

◆ 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().

◆ m_gridOrigin

VECTOR2D KIGFX::GAL::m_gridOrigin
protectedinherited

The grid origin.

Definition at line 1072 of file graphics_abstraction_layer.h.

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

◆ m_gridSize

VECTOR2D KIGFX::GAL::m_gridSize
protectedinherited

The grid size.

Definition at line 1071 of file graphics_abstraction_layer.h.

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

◆ m_gridStyle

GRID_STYLE KIGFX::GAL::m_gridStyle
protectedinherited

◆ m_gridTick

int KIGFX::GAL::m_gridTick
protectedinherited

Every tick line gets the double width.

Definition at line 1077 of file graphics_abstraction_layer.h.

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

◆ m_gridVisibility

bool KIGFX::GAL::m_gridVisibility
protectedinherited

Should the grid be shown.

Definition at line 1069 of file graphics_abstraction_layer.h.

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

◆ m_groupCounter

unsigned int KIGFX::OPENGL_GAL::m_groupCounter
private

Counter used for generating keys for groups.

Definition at line 346 of file opengl_gal.h.

Referenced by getNewGroupNumber(), and OPENGL_GAL().

◆ m_groups

GROUPS_MAP KIGFX::OPENGL_GAL::m_groups
private

Stores information about VBO objects (groups)

Definition at line 345 of file opengl_gal.h.

Referenced by BeginGroup(), ChangeGroupColor(), ChangeGroupDepth(), ClearCache(), DeleteGroup(), DrawGroup(), and getNewGroupNumber().

◆ m_instanceCounter

int OPENGL_GAL::m_instanceCounter = 0
staticprivate

GL GAL instance counter.

Definition at line 336 of file opengl_gal.h.

Referenced by OPENGL_GAL(), and ~OPENGL_GAL().

◆ m_isBitmapFontInitialized

bool KIGFX::OPENGL_GAL::m_isBitmapFontInitialized
private

Is the shader set to use bitmap fonts?

Definition at line 368 of file opengl_gal.h.

Referenced by BeginDrawing(), and OPENGL_GAL().

◆ m_isBitmapFontLoaded

bool OPENGL_GAL::m_isBitmapFontLoaded = false
staticprivate

Is the bitmap font texture loaded?

Definition at line 367 of file opengl_gal.h.

Referenced by BeginDrawing(), and ~OPENGL_GAL().

◆ m_isContextLocked

bool KIGFX::OPENGL_GAL::m_isContextLocked
private

Used for assertion checking.

Definition at line 372 of file opengl_gal.h.

Referenced by BeginDrawing(), beginUpdate(), EndDrawing(), init(), LockContext(), and UnlockContext().

◆ m_isCursorEnabled

bool KIGFX::GAL::m_isCursorEnabled
protectedinherited

Is the cursor enabled?

Definition at line 1083 of file graphics_abstraction_layer.h.

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

◆ m_isFillEnabled

◆ m_isFramebufferInitialized

bool KIGFX::OPENGL_GAL::m_isFramebufferInitialized
private

Are the framebuffers initialized?

Definition at line 366 of file opengl_gal.h.

Referenced by BeginDrawing(), OPENGL_GAL(), ResizeScreen(), and updatedGalDisplayOptions().

◆ m_isGrouping

bool KIGFX::OPENGL_GAL::m_isGrouping
private

Was a group started?

Definition at line 371 of file opengl_gal.h.

Referenced by BeginGroup(), EndGroup(), and OPENGL_GAL().

◆ m_isInitialized

bool KIGFX::OPENGL_GAL::m_isInitialized
private

Basic initialization flag, has to be done when the window is visible.

Definition at line 369 of file opengl_gal.h.

Referenced by BeginDrawing(), beginUpdate(), ClearCache(), endUpdate(), init(), OPENGL_GAL(), and ~OPENGL_GAL().

◆ m_isStrokeEnabled

◆ m_layerDepth

double KIGFX::GAL::m_layerDepth
protectedinherited

◆ m_lineWidth

◆ m_lockClientCookie

int KIGFX::OPENGL_GAL::m_lockClientCookie
private

Definition at line 373 of file opengl_gal.h.

Referenced by LockContext(), and UnlockContext().

◆ m_lookAtPoint

VECTOR2D KIGFX::GAL::m_lookAtPoint
protectedinherited

◆ m_mainBuffer

unsigned int KIGFX::OPENGL_GAL::m_mainBuffer
private

Main rendering target.

Definition at line 356 of file opengl_gal.h.

Referenced by BeginDrawing(), ClearTarget(), DrawGrid(), EndDiffLayer(), and EndDrawing().

◆ m_mouseListener

wxEvtHandler* KIGFX::OPENGL_GAL::m_mouseListener
private

Definition at line 337 of file opengl_gal.h.

Referenced by skipMouseEvent().

◆ m_nonCachedManager

VERTEX_MANAGER* KIGFX::OPENGL_GAL::m_nonCachedManager
private

Container for storing non-cached VERTEX_ITEMs.

Definition at line 350 of file opengl_gal.h.

Referenced by BeginDrawing(), DrawGrid(), EnableDepthTest(), EndDrawing(), init(), SetTarget(), and ~OPENGL_GAL().

◆ 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_overlayBuffer

unsigned int KIGFX::OPENGL_GAL::m_overlayBuffer
private

Auxiliary rendering target (for menus etc.)

Definition at line 357 of file opengl_gal.h.

Referenced by BeginDrawing(), ClearTarget(), EndDrawing(), and HasTarget().

◆ m_overlayManager

VERTEX_MANAGER* KIGFX::OPENGL_GAL::m_overlayManager
private

Container for storing overlaid VERTEX_ITEMs.

Definition at line 351 of file opengl_gal.h.

Referenced by BeginDrawing(), EnableDepthTest(), EndDrawing(), init(), SetTarget(), and ~OPENGL_GAL().

◆ m_paintListener

wxEvtHandler* KIGFX::OPENGL_GAL::m_paintListener
private

Definition at line 338 of file opengl_gal.h.

Referenced by PostPaint().

◆ 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().

◆ m_scale_factor

double HIDPI_GL_CANVAS::m_scale_factor
privateinherited

The current scale factor (e.g.

for hi-DPI displays)

Definition at line 77 of file hidpi_gl_canvas.h.

Referenced by HIDPI_GL_CANVAS::GetScaleFactor(), and HIDPI_GL_CANVAS::SetScaleFactor().

◆ m_screenDPI

double KIGFX::GAL::m_screenDPI
protectedinherited

The dots per inch of the screen.

Definition at line 1044 of file graphics_abstraction_layer.h.

Referenced by KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), and KIGFX::CAIRO_PRINT_GAL::SetSheetSize().

◆ m_screenSize

◆ m_screenWorldMatrix

MATRIX3x3D KIGFX::GAL::m_screenWorldMatrix
protectedinherited

◆ m_settings

KIGFX::VC_SETTINGS HIDPI_GL_CANVAS::m_settings
protectedinherited

< Current VIEW_CONTROLS settings.

Definition at line 71 of file hidpi_gl_canvas.h.

Referenced by HIDPI_GL_3D_CANVAS::OnMouseWheelCamera().

◆ m_shader

SHADER* KIGFX::OPENGL_GAL::m_shader
private

There is only one shader used for different objects.

Definition at line 362 of file opengl_gal.h.

Referenced by BeginDrawing(), init(), OPENGL_GAL(), and ~OPENGL_GAL().

◆ m_strokeColor

◆ m_swapInterval

int KIGFX::OPENGL_GAL::m_swapInterval
private

Used to store swap interval information.

Definition at line 335 of file opengl_gal.h.

Referenced by init(), and OPENGL_GAL().

◆ m_tempBuffer

unsigned int KIGFX::OPENGL_GAL::m_tempBuffer
private

Temporary rendering target (for diffing etc.)

Definition at line 358 of file opengl_gal.h.

Referenced by BeginDrawing(), ClearTarget(), EndDiffLayer(), HasTarget(), and StartDiffLayer().

◆ m_tempManager

VERTEX_MANAGER* KIGFX::OPENGL_GAL::m_tempManager
private

Container for storing temp (diff mode) VERTEX_ITEMs.

Definition at line 352 of file opengl_gal.h.

Referenced by BeginDrawing(), init(), SetTarget(), and ~OPENGL_GAL().

◆ m_tesselator

GLUtesselator* KIGFX::OPENGL_GAL::m_tesselator
private

Definition at line 384 of file opengl_gal.h.

Referenced by drawPolygon(), init(), OPENGL_GAL(), and ~OPENGL_GAL().

◆ m_tessIntersects

std::deque<std::shared_ptr<GLdouble> > KIGFX::OPENGL_GAL::m_tessIntersects
private

Definition at line 385 of file opengl_gal.h.

Referenced by drawPolygon().

◆ m_worldScale

double KIGFX::GAL::m_worldScale
protectedinherited

◆ m_worldScreenMatrix

MATRIX3x3D KIGFX::GAL::m_worldScreenMatrix
protectedinherited

◆ m_worldUnitLength

double KIGFX::GAL::m_worldUnitLength
protectedinherited

The unit length of the world coordinates [inch].

Definition at line 1043 of file graphics_abstraction_layer.h.

Referenced by KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::DrawBitmap(), and DrawBitmap().

◆ m_zoomFactor

double KIGFX::GAL::m_zoomFactor
protectedinherited

The zoom factor.

Definition at line 1047 of file graphics_abstraction_layer.h.

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

◆ 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().

◆ ufm_antialiasingOffset

GLint KIGFX::OPENGL_GAL::ufm_antialiasingOffset
private

Definition at line 377 of file opengl_gal.h.

Referenced by BeginDrawing(), and OPENGL_GAL().

◆ ufm_pixelSizeMultiplier

GLint KIGFX::OPENGL_GAL::ufm_pixelSizeMultiplier
private

Definition at line 376 of file opengl_gal.h.

Referenced by BeginDrawing(), and OPENGL_GAL().

◆ ufm_screenPixelSize

GLint KIGFX::OPENGL_GAL::ufm_screenPixelSize
private

Definition at line 375 of file opengl_gal.h.

Referenced by BeginDrawing(), and OPENGL_GAL().

◆ ufm_worldPixelSize

GLint KIGFX::OPENGL_GAL::ufm_worldPixelSize
private

Definition at line 374 of file opengl_gal.h.

Referenced by BeginDrawing(), and OPENGL_GAL().


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