KiCad PCB EDA Suite
|
OpenGL implementation of the Graphics Abstraction Layer. More...
#include <opengl_gal.h>
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, bool aHiDPI) 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 VECTOR2I & | GetScreenPixelSize () const |
Return GAL canvas size in pixels. | |
void | SetClearColor (const COLOR4D &aColor) |
const COLOR4D & | GetClearColor () const |
virtual void | SetIsFill (bool aIsFillEnabled) |
Enable/disable fill. | |
bool | GetIsFill () const |
Get the fill status. | |
virtual void | SetIsStroke (bool aIsStrokeEnabled) |
Enable/disable stroked outlines. | |
bool | GetIsStroke () const |
Get the stroke status. | |
virtual void | SetFillColor (const COLOR4D &aColor) |
Set the fill color. | |
const COLOR4D & | GetFillColor () const |
Get the fill color. | |
virtual void | SetStrokeColor (const COLOR4D &aColor) |
Set the stroke color. | |
const COLOR4D & | GetStrokeColor () 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 | AdvanceDepth () |
Change the current depth to deeper, so it is possible to draw objects right beneath other. | |
void | ResetTextAttributes () |
Reset text attributes to default styling. | |
void | SetGlyphSize (const VECTOR2I aSize) |
const VECTOR2I & | GetGlyphSize () 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 MATRIX3x3D & | GetWorldScreenMatrix () const |
Get the world <-> screen transformation matrix. | |
const MATRIX3x3D & | GetScreenWorldMatrix () 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 VECTOR2D & | GetLookAtPoint () 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 VECTOR2D & | GetGridOrigin () const |
void | SetGridSize (const VECTOR2D &aGridSize) |
Set the grid size. | |
const VECTOR2D & | GetGridSize () 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. | |
virtual wxSize | GetNativePixelSize () const |
wxPoint | GetNativePosition (const wxPoint &aPoint) const |
Convert the given point from client coordinates to native pixel coordinates. | |
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. | |
template<typename T > | |
void | normalize (T &a, T &b) |
Ensure that the first element is smaller than the second. | |
Protected Attributes | |
GAL_DISPLAY_OPTIONS & | m_options |
UTIL::LINK | m_observerLink |
std::stack< double > | m_depthStack |
Stored depth values. | |
VECTOR2I | m_screenSize |
Screen size in screen (wx logical) 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 | skipGestureEvent (wxGestureEvent &aEvent) |
Skip the gesture 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. | |
double | getLayerDepth () const |
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_MANAGER * | m_currentManager |
Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs). | |
VERTEX_MANAGER * | m_cachedManager |
Container for storing cached VERTEX_ITEMs. | |
VERTEX_MANAGER * | m_nonCachedManager |
Container for storing non-cached VERTEX_ITEMs. | |
VERTEX_MANAGER * | m_overlayManager |
Container for storing overlaid VERTEX_ITEMs. | |
VERTEX_MANAGER * | m_tempManager |
Container for storing temp (diff mode) VERTEX_ITEMs. | |
OPENGL_COMPOSITOR * | m_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. | |
SHADER * | m_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_CACHE > | m_bitmapCache |
GLUtesselator * | m_tesselator |
std::deque< std::shared_ptr< GLdouble > > | m_tessIntersects |
TEXT_ATTRIBUTES | m_attributes |
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? | |
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.
|
private |
Definition at line 343 of file opengl_gal.h.
|
private |
Super class definition.
Definition at line 331 of file opengl_gal.h.
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" ) |
||
) |
aParent | is the wxWidgets immediate wxWindow parent of this object. |
aMouseListener | is the wxEvtHandler that should receive the mouse events, this can be can be any wxWindow, but is often a wxFrame container. |
aPaintListener | is 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(). |
aName | is the name of this window for use by wxWindow::FindWindowByName() |
Definition at line 312 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(), skipGestureEvent(), skipMouseEvent(), KIGFX::TARGET_NONCACHED, ToVECTOR2I(), ufm_antialiasingOffset, ufm_pixelSizeMultiplier, ufm_screenPixelSize, and ufm_worldPixelSize.
OPENGL_GAL::~OPENGL_GAL | ( | ) |
Definition at line 422 of file opengl_gal.cpp.
References ClearCache(), GL_CONTEXT_MANAGER::DestroyCtx(), g_fontTexture, GL_CONTEXT_MANAGER::Get(), GL_CONTEXT_MANAGER::LockCtx(), m_cachedManager, m_compositor, m_glMainContext, m_glPrivContext, m_instanceCounter, m_isBitmapFontLoaded, m_isInitialized, m_nonCachedManager, m_overlayManager, m_shader, m_tempManager, m_tesselator, and GL_CONTEXT_MANAGER::UnlockCtx().
|
inlineinherited |
Change the current depth to deeper, so it is possible to draw objects right beneath other.
If you do this, you should consider using a GAL_SCOPED_ATTR to ensure the depth is reset to the original value.
Definition at line 402 of file graphics_abstraction_layer.h.
Referenced by KIGFX::VIEW_GROUP::ViewDraw().
|
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 547 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.
|
overridevirtual |
Begin a group.
A group is a collection of graphic items. Hierarchical groups are possible, attributes and transformations can be used.
Reimplemented from KIGFX::GAL.
Definition at line 1981 of file opengl_gal.cpp.
References getNewGroupNumber(), m_cachedManager, m_groups, and m_isGrouping.
|
overrideprivatevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 798 of file opengl_gal.cpp.
References init(), IsVisible(), m_cachedManager, m_isContextLocked, m_isInitialized, and KIGFX::VERTEX_MANAGER::Map().
|
overridevirtual |
Draw a text using a bitmap font.
It should be faster than StrokeText(), but can be used only for non-Gerber elements.
aText | is the text to be drawn. |
aPosition | is the text position in world coordinates. |
aAngle | is the text rotation angle. |
Reimplemented from KIGFX::GAL.
Definition at line 1576 of file opengl_gal.cpp.
References KIGFX::COLOR4D::a, EDA_ANGLE::AsRadians(), KIGFX::COLOR4D::b, KIGFX::GAL::BitmapText(), KIGFX::VERTEX_MANAGER::Color(), computeBitmapTextSize(), drawBitmapChar(), drawBitmapOverbar(), KIGFX::COLOR4D::g, KIGFX::GAL::GetGlyphSize(), KIGFX::GAL::GetHorizontalJustify(), KIGFX::GAL::GetVerticalJustify(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_INDETERMINATE, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_INDETERMINATE, GR_TEXT_V_ALIGN_TOP, KIGFX::GAL::IsTextMirrored(), m_currentManager, KIGFX::GAL::m_globalFlipX, KIGFX::GAL::m_globalFlipY, KIGFX::GAL::m_layerDepth, KIGFX::GAL::m_strokeColor, KIGFX::COLOR4D::r, KIGFX::VERTEX_MANAGER::Reserve(), Restore(), KIGFX::VERTEX_MANAGER::Rotate(), Save(), KIGFX::VERTEX_MANAGER::Scale(), text, Translate(), KIGFX::VERTEX_MANAGER::Translate(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
private |
Blit cursor into the current screen.
Definition at line 2630 of file opengl_gal.cpp.
References color, KIGFX::OPENGL_COMPOSITOR::DIRECT_RENDERING, KIGFX::GAL::getCursorColor(), KIGFX::GAL::IsCursorEnabled(), m_compositor, KIGFX::GAL::m_cursorPosition, KIGFX::GAL::m_fullscreenCursor, KIGFX::GAL::m_worldScale, KIGFX::OPENGL_COMPOSITOR::SetBuffer(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by EndDrawing().
|
inlineprivate |
Compute the angle step when drawing arcs/circles approximated with lines.
Definition at line 576 of file opengl_gal.h.
References SEG_PER_CIRCLE_COUNT.
Referenced by DrawArc().
|
overridevirtual |
Change the color used to draw the group.
aGroupNumber | is the group number. |
aNewColor | is the new color. |
Reimplemented from KIGFX::GAL.
Definition at line 2009 of file opengl_gal.cpp.
References KIGFX::VERTEX_MANAGER::ChangeItemColor(), group, m_cachedManager, and m_groups.
|
overridevirtual |
Change the depth (Z-axis position) of the group.
aGroupNumber | is the group number. |
aDepth | is the new depth. |
Reimplemented from KIGFX::GAL.
Definition at line 2018 of file opengl_gal.cpp.
References KIGFX::VERTEX_MANAGER::ChangeItemDepth(), group, m_cachedManager, and m_groups.
|
static |
Checks OpenGL features.
aOptions |
Definition at line 468 of file opengl_gal.cpp.
References KIGFX::dummy(), and init().
Referenced by EDA_DRAW_PANEL_GAL::SwitchBackend().
|
overridevirtual |
Delete all data created during caching of graphic items.
Reimplemented from KIGFX::GAL.
Definition at line 2034 of file opengl_gal.cpp.
References KIGFX::VERTEX_MANAGER::Clear(), m_bitmapCache, m_cachedManager, m_groups, and m_isInitialized.
Referenced by ~OPENGL_GAL().
|
overridevirtual |
Clear the screen.
aColor | is the color used for clearing. |
Reimplemented from KIGFX::GAL.
Definition at line 1922 of file opengl_gal.cpp.
References KIGFX::OPENGL_COMPOSITOR::DIRECT_RENDERING, m_compositor, and KIGFX::OPENGL_COMPOSITOR::SetBuffer().
|
overridevirtual |
Clear the target for rendering.
aTarget | is the target to be cleared. |
Reimplemented from KIGFX::GAL.
Definition at line 2066 of file opengl_gal.cpp.
References KIGFX::COLOR4D::BLACK, KIGFX::OPENGL_COMPOSITOR::ClearBuffer(), KIGFX::OPENGL_COMPOSITOR::GetBuffer(), KIGFX::GAL::m_clearColor, m_compositor, m_mainBuffer, m_overlayBuffer, m_tempBuffer, KIGFX::OPENGL_COMPOSITOR::SetBuffer(), KIGFX::TARGET_CACHED, KIGFX::TARGET_NONCACHED, KIGFX::TARGET_OVERLAY, and KIGFX::TARGET_TEMP.
Referenced by StartDiffLayer().
Compute a size of text drawn using bitmap font with current text setting applied.
aText | is the text to be drawn. |
Definition at line 2548 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().
|
protectedinherited |
compute minimum grid spacing from the grid settings
Definition at line 214 of file graphics_abstraction_layer.cpp.
References KIGFX::GAL::m_gridMinSpacing.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid().
|
inlineprotectedinherited |
Compute the scaling factor for the world->screen matrix.
Definition at line 1004 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::ComputeWorldScreenMatrix(), ComputeWorldScreenMatrix(), and KIGFX::GAL::GAL().
|
overridevirtual |
Compute the world <-> screen transformation matrix.
Reimplemented from KIGFX::GAL.
Definition at line 2836 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().
|
overridevirtual |
Delete the group from the memory.
aGroupNumber | is the group number. |
Reimplemented from KIGFX::GAL.
Definition at line 2027 of file opengl_gal.cpp.
References m_groups.
|
overridevirtual |
Draw an arc.
aCenterPoint | is the center point of the arc. |
aRadius | is the arc radius. |
aStartAngle | is the start angle of the arc. |
aAngle | is the angle of the arc. |
Reimplemented from KIGFX::GAL.
Definition at line 963 of file opengl_gal.cpp.
References KIGFX::COLOR4D::a, EDA_ANGLE::AsRadians(), KIGFX::COLOR4D::b, calcAngleStep(), KIGFX::VERTEX_MANAGER::Color(), drawLineQuad(), KIGFX::COLOR4D::g, m_currentManager, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_isStrokeEnabled, KIGFX::GAL::m_layerDepth, KIGFX::GAL::m_strokeColor, KIGFX::GAL::normalize(), KIGFX::COLOR4D::r, KIGFX::VERTEX_MANAGER::Reserve(), reserveLineQuads(), Restore(), Save(), KIGFX::VERTEX_MANAGER::Shader(), KIGFX::SHADER_NONE, KIGFX::VERTEX_MANAGER::Translate(), KIGFX::VERTEX_MANAGER::Vertex(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
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
aCenterPoint | is the center point of the arc. |
aRadius | is the arc radius. |
aStartAngle | is the start angle of the arc. |
aAngle | is the angle of the arc. |
aWidth | is the thickness of the arc (pen size). |
aMaxError | is 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 1044 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::GAL::normalize(), KIGFX::COLOR4D::r, reserveLineQuads(), Restore(), Save(), SEG_PER_CIRCLE_COUNT, KIGFX::GAL::SetLineWidth(), KIGFX::VERTEX_MANAGER::Translate(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
overridevirtual |
Draw a bitmap image.
Reimplemented from KIGFX::GAL.
Definition at line 1498 of file opengl_gal.cpp.
References EDA_ANGLE::AsDegrees(), BITMAP_BASE::GetPPI(), BITMAP_BASE::GetSizePixels(), KIGFX::VERTEX_MANAGER::GetTransformation(), BITMAP_BASE::IsMirroredX(), BITMAP_BASE::IsMirroredY(), m_bitmapCache, m_currentManager, KIGFX::GAL::m_layerDepth, KIGFX::GAL::m_worldUnitLength, BITMAP_BASE::Rotation(), scale, v1, VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, and VECTOR3< T >::y.
|
private |
Draw a single character using bitmap font.
Its main purpose is to be used in BitmapText() function.
aChar | is the character to be drawn. |
aReserve | if set to false, reserve 6 vertices for each character. |
Definition at line 2438 of file opengl_gal.cpp.
References KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::advance, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::atlas_h, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::atlas_w, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::atlas_x, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::atlas_y, KIGFX::BUILTIN_FONT::font_image, KIGFX::BUILTIN_FONT::font_information, H, KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::height, KiROUND(), KIGFX::BUILTIN_FONT::LookupGlyph(), m_currentManager, KIGFX::BUILTIN_FONT::FONT_INFO_TYPE::max_y, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::maxy, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::minx, KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::miny, KIGFX::VERTEX_MANAGER::Reserve(), KIGFX::VERTEX_MANAGER::Shader(), KIGFX::SHADER_FONT, KIGFX::BUILTIN_FONT::FONT_INFO_TYPE::smooth_pixels, Translate(), KIGFX::VERTEX_MANAGER::Vertex(), KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::width, and X.
Referenced by BitmapText().
|
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.
aLength | is the width of the overbar. |
aHeight | is the height for the overbar. |
aReserve | if set to false, reserve 6 vertices for each overbar. |
Definition at line 2517 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().
|
overridevirtual |
Draw a circle using world coordinates.
aCenterPoint | is the center point of the circle. |
aRadius | is the radius of the circle. |
Reimplemented from KIGFX::GAL.
Definition at line 896 of file opengl_gal.cpp.
References drawCircle().
Referenced by DrawArcSegment().
|
private |
Internal method for circle drawing.
aReserve | if set to false, reserve 3 vertices for each circle. |
Definition at line 902 of file opengl_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), KIGFX::COLOR4D::g, m_currentManager, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_isStrokeEnabled, KIGFX::GAL::m_layerDepth, KIGFX::GAL::m_lineWidth, KIGFX::GAL::m_strokeColor, KIGFX::COLOR4D::r, KIGFX::VERTEX_MANAGER::Reserve(), KIGFX::VERTEX_MANAGER::Shader(), KIGFX::SHADER_FILLED_CIRCLE, KIGFX::SHADER_STROKED_CIRCLE, KIGFX::VERTEX_MANAGER::Vertex(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DrawCircle(), and drawSegment().
|
overridevirtual |
Draw the cursor.
aCursorPosition | is the cursor position in screen coordinates. |
Reimplemented from KIGFX::GAL.
Definition at line 2169 of file opengl_gal.cpp.
References KIGFX::GAL::m_cursorPosition.
|
overridevirtual |
Draw a cubic bezier spline.
startPoint | is the start point of the spline. |
controlPointA | is the first control point. |
controlPointB | is the second control point. |
endPoint | is the end point of the spline. |
aFilterValue | is 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 1476 of file opengl_gal.cpp.
References DrawPolygon(), and BEZIER_POLY::GetPoly().
|
private |
Draw a filled semicircle.
aCenterPoint | is the center point. |
aRadius | is the radius of the semicircle. |
aAngle | is the angle of the semicircle. |
Definition at line 2251 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().
|
overridevirtual |
Draw a polygon representing a font glyph.
Reimplemented from KIGFX::GAL.
Definition at line 2850 of file opengl_gal.cpp.
References KIGFX::VERTEX_MANAGER::Color(), DrawPolylines(), KIFONT::GLYPH::IsOutline(), KIFONT::GLYPH::IsStroke(), m_currentManager, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_layerDepth, KIGFX::VERTEX_MANAGER::Reserve(), KIGFX::VERTEX_MANAGER::Shader(), KIGFX::SHADER_NONE, KIGFX::VERTEX_MANAGER::Vertex(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DrawGlyphs().
|
overridevirtual |
Draw polygons representing font glyphs.
Reimplemented from KIGFX::GAL.
Definition at line 2878 of file opengl_gal.cpp.
References KIGFX::VERTEX_MANAGER::Color(), DrawGlyph(), drawPolyline(), SHAPE_POLY_SET::TRIANGULATED_POLYGON::GetTriangle(), SHAPE_POLY_SET::TRIANGULATED_POLYGON::GetTriangleCount(), m_currentManager, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_layerDepth, KIGFX::VERTEX_MANAGER::Reserve(), reserveLineQuads(), KIGFX::VERTEX_MANAGER::Shader(), KIGFX::SHADER_NONE, KIGFX::VERTEX_MANAGER::Vertex(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
overridevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 1745 of file opengl_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::DOTS, DrawLine(), KIGFX::VERTEX_MANAGER::EnableDepthTest(), KIGFX::VERTEX_MANAGER::EndDrawing(), KIGFX::COLOR4D::g, KIGFX::GAL::GetLineWidth(), HIDPI_GL_CANVAS::GetScaleFactor(), KIGFX::GAL::GetVisibleGridSize(), getWorldPixelSize(), KiROUND(), KIGFX::GAL::m_axesColor, KIGFX::GAL::m_axesEnabled, m_compositor, KIGFX::GAL::m_gridColor, KIGFX::GAL::m_gridLineWidth, KIGFX::GAL::m_gridOrigin, KIGFX::GAL::m_gridSize, KIGFX::GAL::m_gridStyle, KIGFX::GAL::m_gridTick, KIGFX::GAL::m_gridVisibility, m_mainBuffer, m_nonCachedManager, KIGFX::GAL::m_screenSize, KIGFX::GAL::m_screenWorldMatrix, KIGFX::GAL::normalize(), KIGFX::COLOR4D::r, KIGFX::OPENGL_COMPOSITOR::SetBuffer(), KIGFX::GAL::SetLineWidth(), KIGFX::GAL::SetStrokeColor(), SetTarget(), KIGFX::SMALL_CROSS, KIGFX::TARGET_NONCACHED, VECTOR2< T >::x, and VECTOR2< T >::y.
|
overridevirtual |
Draw the stored group.
aGroupNumber | is the group number. |
Reimplemented from KIGFX::GAL.
Definition at line 2000 of file opengl_gal.cpp.
References KIGFX::VERTEX_MANAGER::DrawItem(), group, m_cachedManager, and m_groups.
|
overridevirtual |
Draw a line.
Start and end points are defined as 2D-Vectors.
aStartPoint | is the start point of the line. |
aEndPoint | is the end point of the line. |
Reimplemented from KIGFX::GAL.
Definition at line 823 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().
|
private |
Draw a quad for the line.
aStartPoint | is the start point of the line. |
aEndPoint | is the end point of the line. |
aReserve | if set to false, call reserveLineQuads beforehand to reserve the right amount of vertices. |
Definition at line 2179 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().
|
overridevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 1456 of file opengl_gal.cpp.
References SHAPE_LINE_CHAIN::CPoint(), drawPolygon(), KIGFX::GAL::m_layerDepth, SHAPE_LINE_CHAIN::PointCount(), SHAPE_LINE_CHAIN::SegmentCount(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
overridevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 1440 of file opengl_gal.cpp.
References SHAPE_POLY_SET::COutline(), DrawPolygon(), drawTriangulatedPolyset(), SHAPE_POLY_SET::IsTriangulationUpToDate(), and SHAPE_POLY_SET::OutlineCount().
|
overridevirtual |
Draw a polygon.
aPointList | is the list of the polygon points. |
Reimplemented from KIGFX::GAL.
Definition at line 1329 of file opengl_gal.cpp.
References drawPolygon(), and KIGFX::GAL::m_layerDepth.
Referenced by DrawCurve(), and DrawPolygon().
|
overridevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 1346 of file opengl_gal.cpp.
References drawPolygon(), KIGFX::GAL::m_layerDepth, VECTOR2< T >::x, and VECTOR2< T >::y.
|
private |
Draw a filled polygon.
It does not need the last point to have the same coordinates as the first one.
aPoints | is the vertices data (3 coordinates: x, y, z). |
aPointCount | is the number of points. |
Definition at line 2317 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().
|
overridevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 1292 of file opengl_gal.cpp.
References SHAPE_LINE_CHAIN::CPoint(), drawPolyline(), SHAPE_LINE_CHAIN::IsClosed(), and SHAPE_LINE_CHAIN::PointCount().
|
overridevirtual |
Draw a polyline.
aPointList | is a list of 2D-Vectors containing the polyline points. |
Reimplemented from KIGFX::GAL.
Definition at line 1259 of file opengl_gal.cpp.
References drawPolyline().
Referenced by DrawRectangle(), and drawTriangulatedPolyset().
|
private |
Generic way of drawing a polyline stored in different containers.
aPointGetter | is a function to obtain coordinates of n-th vertex. |
aPointCount | is the number of points to be drawn. |
aReserve | if set to false, reserve aPointCount - 1 line quads. |
Definition at line 2357 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().
|
overridevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 1270 of file opengl_gal.cpp.
References drawPolyline().
|
overridevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 1281 of file opengl_gal.cpp.
References drawPolyline().
|
overridevirtual |
Draw multiple polylines.
aPointLists | are lists of 2D-Vectors containing the polyline points. |
Reimplemented from KIGFX::GAL.
Definition at line 1308 of file opengl_gal.cpp.
References drawPolyline(), and reserveLineQuads().
Referenced by DrawGlyph().
|
inlineinherited |
Definition at line 186 of file graphics_abstraction_layer.h.
References BOX2< Vec >::GetEnd(), and BOX2< Vec >::GetOrigin().
|
overridevirtual |
Draw a rectangle.
aStartPoint | is the start point of the rectangle. |
aEndPoint | is the end point of the rectangle. |
Reimplemented from KIGFX::GAL.
Definition at line 1185 of file opengl_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), DrawLine(), DrawPolyline(), KIGFX::COLOR4D::g, m_currentManager, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_isStrokeEnabled, KIGFX::GAL::m_layerDepth, KIGFX::GAL::m_strokeColor, KIGFX::COLOR4D::r, KIGFX::VERTEX_MANAGER::Reserve(), KIGFX::VERTEX_MANAGER::Shader(), KIGFX::SHADER_NONE, KIGFX::VERTEX_MANAGER::Vertex(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
overridevirtual |
Draw a rounded segment.
Start and end points are defined as 2D-Vectors.
aStartPoint | is the start point of the segment. |
aEndPoint | is the end point of the segment. |
aWidth | is a width of the segment |
Reimplemented from KIGFX::GAL.
Definition at line 831 of file opengl_gal.cpp.
References drawSegment().
Referenced by DrawArcSegment().
|
private |
Internal method for segment drawing.
Definition at line 838 of file opengl_gal.cpp.
References KIGFX::COLOR4D::a, EDA_ANGLE::AsRadians(), KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), drawCircle(), drawLineQuad(), drawStrokedSemiCircle(), VECTOR2< T >::EuclideanNorm(), KIGFX::COLOR4D::g, m_currentManager, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_strokeColor, KIGFX::COLOR4D::r, KIGFX::VERTEX_MANAGER::Reserve(), Restore(), KIGFX::VERTEX_MANAGER::Rotate(), Save(), KIGFX::GAL::SetLineWidth(), KIGFX::VERTEX_MANAGER::Translate(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DrawSegment(), and drawSegmentChain().
|
overridevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 1243 of file opengl_gal.cpp.
References SHAPE_LINE_CHAIN::CPoint(), drawSegmentChain(), SHAPE_LINE_CHAIN::IsClosed(), and SHAPE_LINE_CHAIN::PointCount().
|
private |
Generic way of drawing a chain of segments stored in different containers.
aPointGetter | is a function to obtain coordinates of n-th vertex. |
aPointCount | is the number of points to be drawn. |
aReserve | if set to false, do not reserve vertices internally. |
Definition at line 2385 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().
|
overridevirtual |
Draw a chain of rounded segments.
aPointList | is a list of 2D-Vectors containing the chain points. |
aWidth | is a width of the segments |
Reimplemented from KIGFX::GAL.
Definition at line 1232 of file opengl_gal.cpp.
References drawSegmentChain().
|
private |
Draw a semicircle.
Depending on settings (m_isStrokeEnabled & isFilledEnabled) it runs the proper function (drawStrokedSemiCircle or drawFilledSemiCircle).
aCenterPoint | is the center point. |
aRadius | is the radius of the semicircle. |
aAngle | is the angle of the semicircle. |
Definition at line 2234 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.
|
private |
Draw a stroked semicircle.
aCenterPoint | is the center point. |
aRadius | is the radius of the semicircle. |
aAngle | is the angle of the semicircle. |
aReserve | if set to false, reserve 3 vertices for each semicircle. |
Definition at line 2281 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().
|
private |
Draw a set of polygons with a cached triangulation.
Way faster than drawPolygon.
aStrokeTriangulation | indicates the triangulation should be stroked rather than filled. Used for debugging. |
Definition at line 1365 of file opengl_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::VERTEX_MANAGER::Color(), DrawLine(), DrawPolyline(), KIGFX::COLOR4D::g, KIGFX::GAL::GAL_SCOPED_ATTRS, ADVANCED_CFG::GetCfg(), SHAPE_POLY_SET::TRIANGULATED_POLYGON::GetTriangleCount(), KIGFX::GAL_SCOPED_ATTRS::LAYER_DEPTH, m_currentManager, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_isStrokeEnabled, KIGFX::GAL::m_layerDepth, SHAPE_POLY_SET::OutlineCount(), SHAPE_POLY_SET::Polygon(), KIGFX::COLOR4D::r, KIGFX::VERTEX_MANAGER::Reserve(), KIGFX::GAL::SetLayerDepth(), KIGFX::GAL::SetStrokeColor(), KIGFX::VERTEX_MANAGER::Shader(), KIGFX::SHADER_NONE, KIGFX::GAL_SCOPED_ATTRS::STROKE_COLOR, SHAPE_POLY_SET::TriangulatedPolyCount(), SHAPE_POLY_SET::TriangulatedPolygon(), KIGFX::VERTEX_MANAGER::Vertex(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DrawPolygon().
|
overridevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 2822 of file opengl_gal.cpp.
References KIGFX::VERTEX_MANAGER::EnableDepthTest(), m_cachedManager, m_nonCachedManager, and m_overlayManager.
|
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 2125 of file opengl_gal.cpp.
References KIGFX::OPENGL_COMPOSITOR::DrawBuffer(), KIGFX::VERTEX_MANAGER::EndDrawing(), m_compositor, m_currentManager, m_mainBuffer, and m_tempBuffer.
|
overridevirtual |
End the drawing, needs to be called for every new frame.
Use GAL_DRAWING_CONTEXT RAII object unless you know what you're doing. Parameters passed to the GLU tesselator
Reimplemented from KIGFX::GAL.
Definition at line 716 of file opengl_gal.cpp.
References blitCursor(), KIGFX::OPENGL_COMPOSITOR::DrawBuffer(), KIGFX::VERTEX_MANAGER::EndDrawing(), KI_TRACE, m_cachedManager, m_compositor, m_isContextLocked, m_mainBuffer, m_nonCachedManager, m_overlayBuffer, m_overlayManager, KIGFX::OPENGL_COMPOSITOR::Present(), KIGFX::OPENGL_COMPOSITOR::SetBuffer(), PROF_TIMER::Start(), PROF_TIMER::Stop(), PROF_TIMER::to_string(), and traceGalProfile.
|
overridevirtual |
End the group.
Reimplemented from KIGFX::GAL.
Definition at line 1993 of file opengl_gal.cpp.
References KIGFX::VERTEX_MANAGER::FinishItem(), m_cachedManager, and m_isGrouping.
|
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 740 of file graphics_abstraction_layer.h.
Referenced by KIGFX::VIEW::redrawRect().
|
overrideprivatevirtual |
Update handler for OpenGL settings
Reimplemented from KIGFX::GAL.
Definition at line 814 of file opengl_gal.cpp.
References m_cachedManager, m_isInitialized, and KIGFX::VERTEX_MANAGER::Unmap().
|
overridevirtual |
Force all remaining objects to be drawn.
Reimplemented from KIGFX::GAL.
Definition at line 1916 of file opengl_gal.cpp.
|
inlineinherited |
Definition at line 263 of file graphics_abstraction_layer.h.
Referenced by EDIT_POINTS::ViewDraw().
|
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().
|
inlineinherited |
Get the fill color.
Definition at line 334 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS().
|
inlineinherited |
Definition at line 431 of file graphics_abstraction_layer.h.
Referenced by BitmapText().
|
inlineinherited |
Get the grid line width.
Definition at line 880 of file graphics_abstraction_layer.h.
|
inlineinherited |
Definition at line 781 of file graphics_abstraction_layer.h.
Referenced by GRID_HELPER::GetOrigin().
For a given point it returns the nearest point belonging to the grid in world coordinates.
aPoint | is the point for which the grid point is searched. |
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().
|
inlineinherited |
Return the grid size.
Definition at line 808 of file graphics_abstraction_layer.h.
Referenced by COMMON_TOOLS::CursorControl(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), GERBVIEW_FRAME::DisplayGridMsg(), GRID_HELPER::GetGrid(), GRID_HELPER::GetGridSize(), EE_GRID_HELPER::GetGridSize(), PCB_GRID_HELPER::GetGridSize(), EDA_DRAW_FRAME::GetNearestGridPosition(), EDA_DRAW_FRAME::GetNearestHalfGridPosition(), COMMON_TOOLS::PanControl(), and EDA_DRAW_PANEL_GAL::SwitchBackend().
|
inlineinherited |
Definition at line 755 of file graphics_abstraction_layer.h.
References KIGFX::ALWAYS, and KIGFX::WITH_GRID.
Referenced by GRID_HELPER::canUseGrid(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), KIGFX::WX_VIEW_CONTROLS::GetRawCursorPosition(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), PCB_VIEWER_TOOLS::MeasureTool(), POSITION_RELATIVE_TOOL::PositionRelativeInteractively(), PNS::TOOL_BASE::updateEndItem(), and PNS::TOOL_BASE::updateStartItem().
|
inlineinherited |
Definition at line 753 of file graphics_abstraction_layer.h.
Referenced by EDA_DRAW_PANEL_GAL::SwitchBackend().
|
inlineinherited |
Definition at line 450 of file graphics_abstraction_layer.h.
Referenced by BitmapText().
|
inlineinherited |
Get the fill status.
Definition at line 294 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS().
|
inlineinherited |
Get the stroke status.
Definition at line 314 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS().
|
inlineprivateinherited |
Definition at line 1116 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS().
|
inlineinherited |
Get the line width.
Definition at line 374 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::BitmapText(), CALLBACK_GAL::DrawGlyph(), DrawGrid(), ROUTER_PREVIEW_ITEM::drawLineChain(), and KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS().
|
inlineinherited |
Definition at line 617 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GetVisibleWorldExtents().
|
inlineinherited |
Definition at line 638 of file graphics_abstraction_layer.h.
Referenced by NL_SCHEMATIC_PLUGIN_IMPL::GetViewExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetViewExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetViewExtents(), and NL_PCBNEW_PLUGIN_IMPL::GetViewExtents().
|
inlineinherited |
Definition at line 637 of file graphics_abstraction_layer.h.
Referenced by PNS_PCBNEW_DEBUG_DECORATOR::Clear(), NL_SCHEMATIC_PLUGIN_IMPL::GetViewExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetViewExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetViewExtents(), NL_PCBNEW_PLUGIN_IMPL::GetViewExtents(), PNS_PCBNEW_DEBUG_DECORATOR::nextDepth(), PNS_PCBNEW_DEBUG_DECORATOR::SetView(), EDIT_POINTS::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), and KIGFX::VIEW_OVERLAY::ViewDraw().
|
virtualinherited |
Definition at line 42 of file hidpi_gl_canvas.cpp.
References HIDPI_GL_CANVAS::GetScaleFactor().
Referenced by EDA_3D_CANVAS::DoRePaint(), EDA_3D_MODEL_VIEWER::OnMouseMove(), HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), EDA_3D_MODEL_VIEWER::OnPaint(), and OPENGL_GAL().
|
inherited |
Convert the given point from client coordinates to native pixel coordinates.
Definition at line 54 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().
|
private |
Return a valid key that can be used as a new group number.
Definition at line 2663 of file opengl_gal.cpp.
References m_groupCounter, and m_groups.
Referenced by BeginGroup().
|
inlineinherited |
Definition at line 626 of file graphics_abstraction_layer.h.
|
inherited |
Get the current scale factor.
Definition at line 66 of file hidpi_gl_canvas.cpp.
Referenced by BeginDrawing(), DrawGrid(), KIGFX::PREVIEW::GetConstantGlyphHeight(), HIDPI_GL_CANVAS::GetNativePixelSize(), HIDPI_GL_CANVAS::GetNativePosition(), getScreenPixelSize(), and ResizeScreen().
|
inlineinherited |
Return GAL canvas size in pixels.
Definition at line 247 of file graphics_abstraction_layer.h.
Referenced by KIGFX::WX_VIEW_CONTROLS::CenterOnCursor(), KIGFX::VIEW::GetScreenPixelSize(), KIGFX::VIEW::GetViewport(), EDA_DRAW_PANEL_GAL::onSize(), KIGFX::VIEW::Redraw(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), KIGFX::VIEW::SetCenter(), KIGFX::WX_VIEW_CONTROLS::SetCrossHairCursorPosition(), KIGFX::VIEW::SetViewport(), and KIGFX::WX_VIEW_CONTROLS::WarpMouseCursor().
|
private |
Definition at line 539 of file opengl_gal.cpp.
References HIDPI_GL_CANVAS::GetScaleFactor(), KIGFX::GAL::m_screenSize, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BeginDrawing().
|
inlineinherited |
Get the screen <-> world transformation matrix.
Definition at line 572 of file graphics_abstraction_layer.h.
Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::getShadowWidth(), KIGFX::GAL::GetVisibleWorldExtents(), getWorldPixelSize(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), screenSpaceCircle(), screenSpaceLine(), KIGFX::VIEW::ToWorld(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), and ROUTER_STATUS_VIEW_ITEM::ViewDraw().
|
inlineinherited |
Get the stroke color.
Definition at line 354 of file graphics_abstraction_layer.h.
Referenced by KIGFX::PREVIEW::DrawTextNextToCursor(), KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
|
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.
|
overridevirtual |
Get the currently used target for rendering.
Reimplemented from KIGFX::GAL.
Definition at line 2060 of file opengl_gal.cpp.
References m_currentTarget.
|
inlineinherited |
Definition at line 457 of file graphics_abstraction_layer.h.
Referenced by BitmapText().
|
inlineinherited |
Return the visible grid size in x and y directions.
Definition at line 818 of file graphics_abstraction_layer.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DrawGrid(), and GRID_HELPER::GetVisibleGrid().
|
inherited |
Definition at line 199 of file graphics_abstraction_layer.cpp.
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().
|
private |
Definition at line 532 of file opengl_gal.cpp.
References std::abs(), MATRIX3x3< T >::GetScale(), KIGFX::GAL::GetScreenWorldMatrix(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BeginDrawing(), and DrawGrid().
|
inlineinherited |
Get the world scale.
Definition at line 645 of file graphics_abstraction_layer.h.
Referenced by EE_GRID_HELPER::BestDragOrigin(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::DrawDashedLine(), KIGFX::PREVIEW::DrawTextNextToCursor(), drawTicksAlongLine(), KIGFX::PREVIEW::GetConstantGlyphHeight(), NL_SCHEMATIC_PLUGIN_IMPL::GetModelExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetModelExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetModelExtents(), NL_PCBNEW_PLUGIN_IMPL::GetModelExtents(), NL_SCHEMATIC_PLUGIN_IMPL::GetViewExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetViewExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetViewExtents(), NL_PCBNEW_PLUGIN_IMPL::GetViewExtents(), SCH_BASE_FRAME::RefreshZoomDependentItems(), RATSNEST_VIEW_ITEM::ViewDraw(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
|
inlineinherited |
Get the world <-> screen transformation matrix.
Definition at line 562 of file graphics_abstraction_layer.h.
Referenced by KIGFX::VIEW::ToScreen().
|
inlineinherited |
Definition at line 620 of file graphics_abstraction_layer.h.
Referenced by COMMON_TOOLS::doZoomInOut(), KIGFX::PCB_PAINTER::draw(), EDA_DRAW_FRAME::GetZoomLevelIndicator(), EDA_DRAW_FRAME::OnUpdateSelectZoom(), ZOOM_MENU::update(), and EDA_DRAW_FRAME::UpdateZoomSelectBox().
|
overridevirtual |
Return true if the target exists.
aTarget | is the target to be checked. |
Reimplemented from KIGFX::GAL.
Definition at line 2101 of file opengl_gal.cpp.
References m_overlayBuffer, m_tempBuffer, KIGFX::TARGET_CACHED, KIGFX::TARGET_NONCACHED, KIGFX::TARGET_OVERLAY, and KIGFX::TARGET_TEMP.
|
private |
Basic OpenGL initialization and feature checks.
std::runtime_error | if any of the OpenGL feature checks failed |
Definition at line 2675 of file opengl_gal.cpp.
References enableGlDebug(), KIGFX::BUILTIN_FONT::font_image, KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::height, KIGFX::SHADER::IsLinked(), KIGFX::SHADER::Link(), KIGFX::SHADER::LoadShaderFromStrings(), m_cachedManager, m_isContextLocked, m_isInitialized, m_nonCachedManager, m_overlayManager, m_shader, m_swapInterval, m_tempManager, m_tesselator, SetOpenGLInfo(), KIGFX::VERTEX_MANAGER::SetShader(), GL_UTILS::SetSwapInterval(), KIGFX::SHADER_TYPE_FRAGMENT, KIGFX::SHADER_TYPE_VERTEX, and KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::width.
Referenced by BeginDrawing(), beginUpdate(), and CheckFeatures().
|
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().
|
inlineoverridevirtual |
Checks the state of the context lock.
Reimplemented from KIGFX::GAL.
Definition at line 304 of file opengl_gal.h.
|
inlineinherited |
Return information about cursor visibility.
Definition at line 941 of file graphics_abstraction_layer.h.
Referenced by blitCursor(), and KIGFX::CAIRO_GAL_BASE::blitCursor().
|
inlineinherited |
Definition at line 659 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::angle_xform(), KIGFX::CAIRO_GAL_BASE::arc_angles_xform_and_normalize(), KIGFX::PCB_PAINTER::draw(), KIGFX::PREVIEW::DrawTextNextToCursor(), DS_PROXY_VIEW_ITEM::ViewDraw(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), and ROUTER_STATUS_VIEW_ITEM::ViewDraw().
|
inlineinherited |
Definition at line 660 of file graphics_abstraction_layer.h.
|
inlineinherited |
Definition at line 434 of file graphics_abstraction_layer.h.
|
inlineinherited |
Definition at line 437 of file graphics_abstraction_layer.h.
|
inlineinherited |
Definition at line 440 of file graphics_abstraction_layer.h.
|
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.
|
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.
|
inlineinherited |
Definition at line 443 of file graphics_abstraction_layer.h.
Referenced by BitmapText().
|
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().
|
overridevirtual |
Use GAL_CONTEXT_LOCKER RAII object unless you know what you're doing.
Reimplemented from KIGFX::GAL.
Definition at line 774 of file opengl_gal.cpp.
References GL_CONTEXT_MANAGER::Get(), GL_CONTEXT_MANAGER::LockCtx(), m_glPrivContext, m_isContextLocked, and m_lockClientCookie.
|
inlineprotectedinherited |
Ensure that the first element is smaller than the second.
Definition at line 1050 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::arc_angles_xform_and_normalize(), DrawArc(), DrawArcSegment(), KIGFX::CAIRO_GAL_BASE::DrawGrid(), and DrawGrid().
|
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().
|
private |
This is the OnPaint event handler.
aEvent | is the OnPaint event. |
Definition at line 2608 of file opengl_gal.cpp.
References PostPaint().
Referenced by OPENGL_GAL().
|
private |
Give the correct cursor image when the native widget asks for it.
aEvent | is the cursor event to plac the cursor into. |
Definition at line 2163 of file opengl_gal.cpp.
References m_currentwxCursor.
Referenced by OPENGL_GAL().
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 501 of file opengl_gal.cpp.
References m_paintListener.
Referenced by onPaint().
|
private |
Reserves specified number of line quads.
aLineCount | the number of line quads to reserve. |
Definition at line 2228 of file opengl_gal.cpp.
References m_currentManager, and KIGFX::VERTEX_MANAGER::Reserve().
Referenced by DrawArc(), DrawArcSegment(), DrawGlyphs(), drawLineQuad(), drawPolyline(), and DrawPolylines().
|
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.
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::BEZIER_ASSISTANT::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), and KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewDraw().
|
overridevirtual |
Resizes the canvas.
Reimplemented from KIGFX::GAL.
Definition at line 1892 of file opengl_gal.cpp.
References HIDPI_GL_CANVAS::GetScaleFactor(), m_compositor, m_isFramebufferInitialized, KIGFX::GAL::m_screenSize, and KIGFX::OPENGL_COMPOSITOR::Resize().
|
overridevirtual |
Restore the context.
Reimplemented from KIGFX::GAL.
Definition at line 1975 of file opengl_gal.cpp.
References m_currentManager, and KIGFX::VERTEX_MANAGER::PopMatrix().
Referenced by BitmapText(), DrawArc(), DrawArcSegment(), drawBitmapOverbar(), drawFilledSemiCircle(), drawSegment(), and drawStrokedSemiCircle().
|
overridevirtual |
Rotate the context.
aAngle | is the rotation angle in radians. |
Reimplemented from KIGFX::GAL.
Definition at line 1951 of file opengl_gal.cpp.
References m_currentManager, and KIGFX::VERTEX_MANAGER::Rotate().
|
overridevirtual |
Save the context.
Reimplemented from KIGFX::GAL.
Definition at line 1969 of file opengl_gal.cpp.
References m_currentManager, and KIGFX::VERTEX_MANAGER::PushMatrix().
Referenced by BitmapText(), DrawArc(), DrawArcSegment(), drawBitmapOverbar(), drawFilledSemiCircle(), drawSegment(), and drawStrokedSemiCircle().
|
overridevirtual |
Scale the context.
aScale | is the scale factor for the x- and y-axis. |
Reimplemented from KIGFX::GAL.
Definition at line 1963 of file opengl_gal.cpp.
References m_currentManager, KIGFX::VERTEX_MANAGER::Scale(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
inlineinherited |
Set the axes color.
aAxesColor | is the color to draw the axes if enabled. |
Definition at line 852 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::CAIRO_GAL_BASE(), SCH_BASE_FRAME::CommonSettingsChanged(), SYMBOL_VIEWER_FRAME::CommonSettingsChanged(), OPENGL_GAL(), SYMBOL_EDIT_FRAME::SwitchCanvas(), SYMBOL_DIFF_FRAME::SYMBOL_DIFF_FRAME(), and PCB_DRAW_PANEL_GAL::UpdateColors().
|
inlineinherited |
Enable drawing the axes.
Definition at line 860 of file graphics_abstraction_layer.h.
Referenced by FOOTPRINT_EDIT_FRAME::ActivateGalCanvas(), PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET(), KIGFX::GAL::GAL(), DIALOG_PAD_PROPERTIES::prepareCanvas(), FP_TREE_SYNCHRONIZING_ADAPTER::ShowPreview(), SYMBOL_EDIT_FRAME::SwitchCanvas(), FOOTPRINT_EDIT_FRAME::SwitchCanvas(), and SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().
|
inlineinherited |
Definition at line 258 of file graphics_abstraction_layer.h.
Referenced by DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET(), EDA_DRAW_PANEL_GAL::DoRePaint(), BOARD_PRINTOUT::DrawPage(), SCH_PRINTOUT::PrintPage(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET(), PANEL_EESCHEMA_COLOR_SETTINGS::updatePreview(), and PANEL_PCBNEW_COLOR_SETTINGS::updatePreview().
|
inlineinherited |
Draw every tick line wider.
aInterval | increase the width of every aInterval line, if 0 do not use this feature. |
Definition at line 870 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GAL().
|
inlineinherited |
Set the cursor color.
aCursorColor | is the color of the cursor. |
Definition at line 951 of file graphics_abstraction_layer.h.
Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), KIGFX::GAL::GAL(), and PCB_DRAW_PANEL_GAL::UpdateColors().
|
inlineinherited |
Enable/disable cursor.
aCursorEnabled | is true if the cursor should be drawn, else false. |
Definition at line 931 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GAL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), and KIGFX::VIEW_CONTROLS::ShowCursor().
|
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 636 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GAL().
|
inlinevirtualinherited |
Set the fill color.
aColor | is the color for filling. |
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 324 of file graphics_abstraction_layer.h.
Referenced by BeginDrawing(), ZONE_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), ROUTER_PREVIEW_ITEM::drawShape(), KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::Execute(), KIGFX::GAL::GAL(), KIGFX::knockoutText(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::setupGal(), EDIT_POINTS::ViewDraw(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::SNAP_INDICATOR::ViewDraw(), and KIGFX::GAL_SCOPED_ATTRS::~GAL_SCOPED_ATTRS().
|
inlineinherited |
Sets flipping of the screen.
xAxis | is the flip flag for the X axis. |
yAxis | is the flip flag for the Y axis. |
Definition at line 653 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GAL(), KIGFX::VIEW::SetMirror(), and BOARD_PRINTOUT::setupGal().
|
inlineinherited |
Definition at line 433 of file graphics_abstraction_layer.h.
Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), and KIGFX::GAL::ResetTextAttributes().
|
inlineinherited |
Definition at line 436 of file graphics_abstraction_layer.h.
Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), and KIGFX::GAL::ResetTextAttributes().
|
inlineinherited |
Definition at line 439 of file graphics_abstraction_layer.h.
Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), and KIGFX::GAL::ResetTextAttributes().
|
inlineinherited |
Definition at line 430 of file graphics_abstraction_layer.h.
Referenced by LABEL_MANAGER::Add(), KIGFX::bitmapText(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::VIEW_OVERLAY::COMMAND_GLYPH_SIZE::Execute(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), and KIGFX::GAL::ResetTextAttributes().
|
inlineinherited |
Set the grid color.
aGridColor | is the grid color, it should have a low alpha value for the best effect. |
Definition at line 842 of file graphics_abstraction_layer.h.
Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), KIGFX::CAIRO_GAL_BASE::CAIRO_GAL_BASE(), EDA_DRAW_PANEL_GAL::DoRePaint(), OPENGL_GAL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), GERBVIEW_FRAME::SetGridColor(), PCB_EDIT_FRAME::SetGridColor(), and PCB_DRAW_PANEL_GAL::UpdateColors().
|
inlineinherited |
Set the origin point for the grid.
aGridOrigin | is a vector containing the grid origin point, in world coordinates. |
Definition at line 766 of file graphics_abstraction_layer.h.
Referenced by PCB_CONTROL::DoSetGridOrigin(), PCB_EDIT_FRAME::RebuildAndRefresh(), and PCB_BASE_EDIT_FRAME::SetBoard().
|
inlineinherited |
Set the grid size.
aGridSize | is a vector containing the grid size in x and y direction. |
Definition at line 791 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().
|
inlineinherited |
Set the visibility setting of the grid.
aVisibility | is the new visibility setting of the grid. |
Definition at line 751 of file graphics_abstraction_layer.h.
Referenced by DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET(), KIGFX::GAL::GAL(), COMMON_TOOLS::OnGridChanged(), GERBER_LAYER_WIDGET::OnRenderEnable(), DIALOG_PAD_PROPERTIES::prepareCanvas(), EDA_DRAW_FRAME::SetGridVisibility(), EDA_DRAW_PANEL_GAL::SwitchBackend(), and SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().
|
inlineinherited |
Definition at line 445 of file graphics_abstraction_layer.h.
Referenced by KIGFX::bitmapText(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), and KIGFX::GAL::ResetTextAttributes().
|
inlinevirtualinherited |
Enable/disable fill.
aIsFillEnabled | is true, when the graphics objects should be filled, else false. |
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 284 of file graphics_abstraction_layer.h.
Referenced by KIGFX::boxText(), ZONE_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::drawAltPinModesIcon(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawCircle(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawCircleDashed(), KIGFX::GERBVIEW_PAINTER::drawFlashedShape(), KIGFX::SCH_PAINTER::drawItemBoundingBox(), ROUTER_PREVIEW_ITEM::drawLineChain(), ROUTER_PREVIEW_ITEM::drawShape(), DrawSnapNode(), KIGFX::PREVIEW::DrawTextNextToCursor(), KIGFX::VIEW_OVERLAY::COMMAND_SET_FILL::Execute(), KIGFX::GAL::GAL(), KIGFX::knockoutText(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::setupGal(), KIGFX::PCB_PAINTER::strokeText(), KIGFX::strokeText(), EDIT_POINTS::ViewDraw(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), RATSNEST_VIEW_ITEM::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), and KIGFX::GAL_SCOPED_ATTRS::~GAL_SCOPED_ATTRS().
|
inlinevirtualinherited |
Enable/disable stroked outlines.
aIsStrokeEnabled | is true, if the outline of an object should be stroked. |
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 304 of file graphics_abstraction_layer.h.
Referenced by KIGFX::boxText(), ZONE_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::drawAltPinModesIcon(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawCircle(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawCircleDashed(), KIGFX::GERBVIEW_PAINTER::drawFlashedShape(), KIGFX::SCH_PAINTER::drawItemBoundingBox(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLine(), ROUTER_PREVIEW_ITEM::drawLineChain(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLineDashed(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLineWithAngleHighlight(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), ROUTER_PREVIEW_ITEM::drawShape(), DrawSnapNode(), KIGFX::PREVIEW::DrawTextNextToCursor(), KIGFX::VIEW_OVERLAY::COMMAND_SET_STROKE::Execute(), KIGFX::GAL::GAL(), KIGFX::knockoutText(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::setupGal(), KIGFX::PCB_PAINTER::strokeText(), KIGFX::strokeText(), EDIT_POINTS::ViewDraw(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), RATSNEST_VIEW_ITEM::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), and KIGFX::GAL_SCOPED_ATTRS::~GAL_SCOPED_ATTRS().
|
inlinevirtualinherited |
Set the depth of the layer (position on the z-axis)
If you do this, you should consider using a GAL_SCOPED_ATTR to ensure the depth is reset to the original value.
aLayerDepth | the layer depth for the objects. Smaller is closer to the viewer. |
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 387 of file graphics_abstraction_layer.h.
Referenced by KIGFX::VIEW::draw(), ROUTER_PREVIEW_ITEM::drawShape(), drawTriangulatedPolyset(), KIGFX::GAL::GAL(), KIGFX::VIEW::redrawRect(), KIGFX::CAIRO_GAL_BASE::SetLayerDepth(), KIGFX::VIEW::updateItemGeometry(), EDIT_POINTS::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::VIEW_OVERLAY::ViewDraw(), and KIGFX::GAL_SCOPED_ATTRS::~GAL_SCOPED_ATTRS().
|
inlinevirtualinherited |
Set the line width.
aLineWidth | is the line width. |
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 364 of file graphics_abstraction_layer.h.
Referenced by KIGFX::bitmapText(), ZONE_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIFONT::FONT::Draw(), KIGFX::drawAltPinModesIcon(), KIGFX::GERBVIEW_PAINTER::drawApertureMacro(), DrawArcSegment(), drawBacksideTicks(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawCircle(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawCircleDashed(), KIGFX::GERBVIEW_PAINTER::drawFlashedShape(), DrawGrid(), KIGFX::SCH_PAINTER::drawItemBoundingBox(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLine(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLineDashed(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLineWithAngleHighlight(), KIGFX::GERBVIEW_PAINTER::drawPolygon(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), drawSegment(), ROUTER_PREVIEW_ITEM::drawShape(), drawTicksAlongLine(), KIGFX::VIEW_OVERLAY::COMMAND_SET_WIDTH::Execute(), PCB_IO_KICAD_SEXPR::formatRenderCache(), KIGFX::GAL::GAL(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), screenSpaceCircle(), screenSpaceLine(), KIGFX::CAIRO_GAL_BASE::SetLineWidth(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::setupGal(), EDIT_POINTS::ViewDraw(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), RATSNEST_VIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), and KIGFX::GAL_SCOPED_ATTRS::~GAL_SCOPED_ATTRS().
|
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 616 of file graphics_abstraction_layer.h.
Referenced by BOARD_PRINTOUT::DrawPage(), KIGFX::GAL::GAL(), SCH_PRINTOUT::PrintPage(), and KIGFX::VIEW::SetCenter().
|
inline |
Definition at line 292 of file opengl_gal.h.
|
overridevirtual |
Set the cursor in the native panel.
aCursor | is the cursor to use in the native panel |
Reimplemented from KIGFX::GAL.
Definition at line 2145 of file opengl_gal.cpp.
References CURSOR_STORE::GetCursor(), CURSOR_STORE::GetHiDPICursor(), KIGFX::GAL::m_currentNativeCursor, m_currentwxCursor, and KIGFX::GAL::SetNativeCursorStyle().
|
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.
aSetting | is true if negative mode should be enabled |
Reimplemented from KIGFX::GAL.
Definition at line 264 of file opengl_gal.h.
|
inline |
Definition at line 297 of file opengl_gal.h.
|
inlineinherited |
Get/set the rotation angle (in radians).
Definition at line 625 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GAL().
|
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 609 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_PRINT_GAL::CAIRO_PRINT_GAL(), and KIGFX::GAL::GAL().
|
inlineinherited |
Definition at line 601 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_PRINT_GAL::SetSheetSize().
|
inlinevirtualinherited |
Set the stroke color.
aColor | is the color for stroking the outline. |
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 344 of file graphics_abstraction_layer.h.
Referenced by BeginDrawing(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::drawAltPinModesIcon(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawCircle(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawCircleDashed(), DrawGrid(), KIGFX::SCH_PAINTER::drawItemBoundingBox(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLine(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLineDashed(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLineWithAngleHighlight(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), ROUTER_PREVIEW_ITEM::drawShape(), KIGFX::PREVIEW::DrawTextNextToCursor(), drawTriangulatedPolyset(), KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::Execute(), KIGFX::GAL::GAL(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::setupGal(), EDIT_POINTS::ViewDraw(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), RATSNEST_VIEW_ITEM::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), and KIGFX::GAL_SCOPED_ATTRS::~GAL_SCOPED_ATTRS().
|
overridevirtual |
Set the target for rendering.
aTarget | is the new target for rendering. |
Reimplemented from KIGFX::GAL.
Definition at line 2045 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().
|
inlineinherited |
Definition at line 442 of file graphics_abstraction_layer.h.
Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), KIGFX::GAL::ResetTextAttributes(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
|
inlineinherited |
Definition at line 62 of file hidpi_gl_canvas.h.
Referenced by EDA_3D_VIEWER_FRAME::applySettings().
|
inlineinherited |
Definition at line 452 of file graphics_abstraction_layer.h.
Referenced by KIGFX::bitmapText(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), and KIGFX::GAL::ResetTextAttributes().
|
inlineinherited |
Set the world <-> screen transformation matrix.
aMatrix | is the 3x3 world <-> screen transformation matrix. |
Definition at line 582 of file graphics_abstraction_layer.h.
|
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 599 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().
|
inlineinherited |
Definition at line 619 of file graphics_abstraction_layer.h.
Referenced by BOARD_PRINTOUT::DrawPage(), KIGFX::GAL::GAL(), SCH_PRINTOUT::PrintPage(), and KIGFX::VIEW::SetScale().
|
overridevirtual |
Shows/hides the GAL canvas.
Reimplemented from KIGFX::GAL.
Definition at line 1905 of file opengl_gal.cpp.
|
private |
Skip the gesture event to the parent.
aEvent | is the gesture event. |
Definition at line 2622 of file opengl_gal.cpp.
References m_mouseListener.
Referenced by OPENGL_GAL().
|
private |
Skip the mouse event to the parent.
aEvent | is the mouse event. |
Definition at line 2614 of file opengl_gal.cpp.
References m_mouseListener.
Referenced by OPENGL_GAL().
|
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 2114 of file opengl_gal.cpp.
References ClearTarget(), KIGFX::VERTEX_MANAGER::EndDrawing(), m_currentManager, m_tempBuffer, SetTarget(), and KIGFX::TARGET_TEMP.
|
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 734 of file graphics_abstraction_layer.h.
Referenced by KIGFX::VIEW::redrawRect().
Compute the point position in screen coordinates from given world coordinates.
aPoint | the point position in world coordinates. |
Definition at line 913 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::blitCursor().
Compute the point position in world coordinates from given screen coordinates.
aPoint | the point position in screen coordinates. |
Definition at line 902 of file graphics_abstraction_layer.h.
|
overridevirtual |
Transform the context.
aTransformation | is the transformation matrix. |
Reimplemented from KIGFX::GAL.
Definition at line 1933 of file opengl_gal.cpp.
References MATRIX3x3< T >::m_data.
|
overridevirtual |
Translate the context.
aTranslation | is the translation vector. |
Reimplemented from KIGFX::GAL.
Definition at line 1957 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().
|
overridevirtual |
Reimplemented from KIGFX::GAL.
Definition at line 784 of file opengl_gal.cpp.
References GL_CONTEXT_MANAGER::Get(), m_glPrivContext, m_isContextLocked, m_lockClientCookie, and GL_CONTEXT_MANAGER::UnlockCtx().
|
overrideprivatevirtual |
Handle updating display options.
Derived classes should call up to this to set base-class methods.
Reimplemented from KIGFX::GAL.
Definition at line 509 of file opengl_gal.cpp.
References KIGFX::OPENGL_COMPOSITOR::GetAntialiasingMode(), KIGFX::GAL_DISPLAY_OPTIONS::gl_antialiasing_mode, m_compositor, m_isFramebufferInitialized, KIGFX::GAL::m_options, refresh, Refresh(), KIGFX::OPENGL_COMPOSITOR::SetAntialiasingMode(), and KIGFX::GAL::updatedGalDisplayOptions().
|
staticprivate |
Bitmap font texture handle (shared)
Definition at line 340 of file opengl_gal.h.
Referenced by BeginDrawing(), and ~OPENGL_GAL().
|
staticprotectedinherited |
Depth level on which the grid is drawn.
Definition at line 1021 of file graphics_abstraction_layer.h.
|
privateinherited |
Definition at line 1121 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::BitmapText().
|
protectedinherited |
Color of the axes.
Definition at line 1098 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::drawAxes(), and DrawGrid().
|
protectedinherited |
Should the axes be drawn.
Definition at line 1099 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), DrawGrid(), and KIGFX::GAL::updatedGalDisplayOptions().
|
private |
Definition at line 381 of file opengl_gal.h.
Referenced by ClearCache(), DrawBitmap(), and OPENGL_GAL().
|
private |
Container for storing cached VERTEX_ITEMs.
Definition at line 349 of file opengl_gal.h.
Referenced by BeginDrawing(), BeginGroup(), beginUpdate(), ChangeGroupColor(), ChangeGroupDepth(), ClearCache(), DrawGroup(), EnableDepthTest(), EndDrawing(), EndGroup(), endUpdate(), init(), SetTarget(), and ~OPENGL_GAL().
|
protectedinherited |
Definition at line 1086 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_PRINT_GAL::CAIRO_PRINT_GAL(), KIGFX::CAIRO_GAL_BASE::ClearScreen(), and ClearTarget().
|
private |
Handles multiple rendering targets.
Definition at line 355 of file opengl_gal.h.
Referenced by BeginDrawing(), blitCursor(), ClearScreen(), ClearTarget(), DrawGrid(), EndDiffLayer(), EndDrawing(), OPENGL_GAL(), ResizeScreen(), updatedGalDisplayOptions(), and ~OPENGL_GAL().
|
private |
Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs).
Definition at line 347 of file opengl_gal.h.
Referenced by BitmapText(), DrawArc(), DrawArcSegment(), DrawBitmap(), drawBitmapChar(), drawBitmapOverbar(), drawCircle(), drawFilledSemiCircle(), DrawGlyph(), DrawGlyphs(), DrawLine(), drawLineQuad(), drawPolygon(), drawPolyline(), DrawRectangle(), drawSegment(), drawSegmentChain(), drawSemiCircle(), drawStrokedSemiCircle(), drawTriangulatedPolyset(), EndDiffLayer(), reserveLineQuads(), Restore(), Rotate(), Save(), Scale(), SetTarget(), StartDiffLayer(), and Translate().
|
protectedinherited |
Current cursor.
Definition at line 1112 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::SetNativeCursorStyle(), KIGFX::CAIRO_GAL::SetNativeCursorStyle(), and SetNativeCursorStyle().
|
private |
Current rendering target.
Definition at line 359 of file opengl_gal.h.
Referenced by GetTarget(), and SetTarget().
|
private |
wxCursor showing the current native cursor
Definition at line 379 of file opengl_gal.h.
Referenced by onSetNativeCursor(), and SetNativeCursorStyle().
|
protectedinherited |
Cursor color.
Definition at line 1108 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::getCursorColor().
|
protectedinherited |
Current cursor position (world coordinates)
Definition at line 1110 of file graphics_abstraction_layer.h.
Referenced by blitCursor(), KIGFX::CAIRO_GAL_BASE::blitCursor(), KIGFX::CAIRO_GAL_BASE::DrawCursor(), and DrawCursor().
|
protectedinherited |
Range of the depth.
Definition at line 1089 of file graphics_abstraction_layer.h.
Referenced by BeginDrawing(), and KIGFX::CAIRO_GAL_BASE::DrawGrid().
|
protectedinherited |
Stored depth values.
Definition at line 1063 of file graphics_abstraction_layer.h.
|
protectedinherited |
The fill color.
Definition at line 1084 of file graphics_abstraction_layer.h.
Referenced by BeginDrawing(), DrawArc(), DrawArcSegment(), drawCircle(), DrawGlyph(), DrawGlyphs(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), drawPolygon(), DrawRectangle(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), drawSegment(), drawSemiCircle(), drawTriangulatedPolyset(), KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::SetFillColor(), and KIGFX::CAIRO_GAL_BASE::storePath().
|
protectedinherited |
Always show cursor.
Definition at line 1107 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GAL(), and KIGFX::GAL::updatedGalDisplayOptions().
|
protectedinherited |
Shape of the cursor (fullscreen or small cross)
Definition at line 1109 of file graphics_abstraction_layer.h.
Referenced by blitCursor(), KIGFX::CAIRO_GAL_BASE::blitCursor(), KIGFX::GAL::GAL(), and KIGFX::GAL::updatedGalDisplayOptions().
|
staticprivate |
Parent OpenGL context.
Definition at line 333 of file opengl_gal.h.
Referenced by OPENGL_GAL(), and ~OPENGL_GAL().
|
protectedinherited |
Flag for X axis flipping.
Definition at line 1076 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::BitmapText(), BitmapText(), KIGFX::GAL::ComputeWorldScreenMatrix(), and KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix().
|
protectedinherited |
Flag for Y axis flipping.
Definition at line 1077 of file graphics_abstraction_layer.h.
Referenced by BitmapText(), KIGFX::GAL::ComputeWorldScreenMatrix(), and KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix().
|
private |
Canvas-specific OpenGL context.
Definition at line 334 of file opengl_gal.h.
Referenced by LockContext(), OPENGL_GAL(), UnlockContext(), and ~OPENGL_GAL().
|
protectedinherited |
Color of the grid.
Definition at line 1097 of file graphics_abstraction_layer.h.
Referenced by DrawGrid(), KIGFX::CAIRO_GAL_BASE::drawGridCross(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), and KIGFX::CAIRO_GAL_BASE::drawGridPoint().
|
protectedinherited |
Line width of the grid.
Definition at line 1101 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), DrawGrid(), KIGFX::GAL::GAL(), and KIGFX::GAL::updatedGalDisplayOptions().
|
protectedinherited |
Minimum screen size of the grid (pixels) below which the grid is not drawn.
Definition at line 1102 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::computeMinGridSpacing(), KIGFX::GAL::GAL(), and KIGFX::GAL::updatedGalDisplayOptions().
|
protectedinherited |
The grid offset to compensate cursor position.
Definition at line 1096 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GetGridPoint().
|
protectedinherited |
The grid origin.
Definition at line 1095 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), and DrawGrid().
|
protectedinherited |
The grid size.
Definition at line 1094 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), DrawGrid(), and KIGFX::GAL::GetGridPoint().
|
protectedinherited |
Grid display style.
Definition at line 1093 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), DrawGrid(), KIGFX::GAL::GAL(), and KIGFX::GAL::updatedGalDisplayOptions().
|
protectedinherited |
Every tick line gets the double width.
Definition at line 1100 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), and DrawGrid().
|
protectedinherited |
Should the grid be shown.
Definition at line 1092 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), and DrawGrid().
|
private |
Counter used for generating keys for groups.
Definition at line 346 of file opengl_gal.h.
Referenced by getNewGroupNumber(), and OPENGL_GAL().
|
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().
|
staticprivate |
GL GAL instance counter.
Definition at line 336 of file opengl_gal.h.
Referenced by OPENGL_GAL(), and ~OPENGL_GAL().
|
private |
Is the shader set to use bitmap fonts?
Definition at line 368 of file opengl_gal.h.
Referenced by BeginDrawing(), and OPENGL_GAL().
|
staticprivate |
Is the bitmap font texture loaded?
Definition at line 367 of file opengl_gal.h.
Referenced by BeginDrawing(), and ~OPENGL_GAL().
|
private |
Used for assertion checking.
Definition at line 372 of file opengl_gal.h.
Referenced by BeginDrawing(), beginUpdate(), EndDrawing(), init(), LockContext(), and UnlockContext().
|
protectedinherited |
Is the cursor enabled?
Definition at line 1106 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::getCursorColor().
|
protectedinherited |
Is filling of graphic objects enabled ?
Definition at line 1081 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawArc(), DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), DrawArcSegment(), drawCircle(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), drawPolygon(), DrawRectangle(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), drawSegment(), drawSegmentChain(), drawSemiCircle(), drawTriangulatedPolyset(), KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::SetIsFill(), and KIGFX::CAIRO_GAL_BASE::storePath().
|
private |
Are the framebuffers initialized?
Definition at line 366 of file opengl_gal.h.
Referenced by BeginDrawing(), OPENGL_GAL(), ResizeScreen(), and updatedGalDisplayOptions().
|
private |
Was a group started?
Definition at line 371 of file opengl_gal.h.
Referenced by BeginGroup(), EndGroup(), and OPENGL_GAL().
|
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().
|
protectedinherited |
Are the outlines stroked ?
Definition at line 1082 of file graphics_abstraction_layer.h.
Referenced by DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), DrawArcSegment(), drawCircle(), KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), drawPolygon(), DrawRectangle(), drawSemiCircle(), drawTriangulatedPolyset(), KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::SetIsStroke(), and KIGFX::CAIRO_GAL_BASE::storePath().
|
protectedinherited |
The actual layer depth.
Definition at line 1088 of file graphics_abstraction_layer.h.
Referenced by BitmapText(), DrawArc(), DrawBitmap(), drawCircle(), drawFilledSemiCircle(), DrawGlyph(), DrawGlyphs(), drawLineQuad(), DrawPolygon(), DrawRectangle(), drawStrokedSemiCircle(), and drawTriangulatedPolyset().
|
protectedinherited |
The line width.
Definition at line 1079 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::CAIRO_GAL_BASE(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), drawCircle(), drawLineQuad(), drawStrokedSemiCircle(), KIGFX::CAIRO_GAL_BASE::resetContext(), KIGFX::CAIRO_GAL_BASE::SetLineWidth(), and KIGFX::CAIRO_GAL_BASE::syncLineWidth().
|
private |
Definition at line 373 of file opengl_gal.h.
Referenced by LockContext(), and UnlockContext().
|
protectedinherited |
Point to be looked at in world space.
Definition at line 1068 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), and ComputeWorldScreenMatrix().
|
private |
Main rendering target.
Definition at line 356 of file opengl_gal.h.
Referenced by BeginDrawing(), ClearTarget(), DrawGrid(), EndDiffLayer(), and EndDrawing().
|
private |
Definition at line 337 of file opengl_gal.h.
Referenced by skipGestureEvent(), and skipMouseEvent().
|
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().
|
protectedinherited |
Definition at line 1061 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GAL().
|
protectedinherited |
Definition at line 1060 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GAL(), OPENGL_GAL(), KIGFX::CAIRO_GAL::setCompositor(), KIGFX::GAL::updatedGalDisplayOptions(), KIGFX::CAIRO_GAL::updatedGalDisplayOptions(), and updatedGalDisplayOptions().
|
private |
Auxiliary rendering target (for menus etc.)
Definition at line 357 of file opengl_gal.h.
Referenced by BeginDrawing(), ClearTarget(), EndDrawing(), and HasTarget().
|
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().
|
private |
Definition at line 338 of file opengl_gal.h.
Referenced by PostPaint().
|
protectedinherited |
Rotation transformation (radians)
Definition at line 1071 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::ComputeWorldScreenMatrix().
|
protectedinherited |
The dots per inch of the screen.
Definition at line 1067 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), and KIGFX::CAIRO_PRINT_GAL::SetSheetSize().
|
protectedinherited |
Screen size in screen (wx logical) coordinates.
Definition at line 1064 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL::allocateBitmaps(), BeginDrawing(), KIGFX::CAIRO_GAL::CAIRO_GAL(), KIGFX::CAIRO_GAL_BASE::ClearScreen(), KIGFX::GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::DrawGrid(), DrawGrid(), KIGFX::CAIRO_GAL::EndDrawing(), getScreenPixelSize(), KIGFX::GAL::GetVisibleWorldExtents(), KIGFX::CAIRO_GAL::initSurface(), OPENGL_GAL(), KIGFX::CAIRO_GAL_BASE::ResizeScreen(), ResizeScreen(), and KIGFX::CAIRO_GAL::setCompositor().
|
protectedinherited |
Screen transformation.
Definition at line 1073 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::DrawGrid(), and DrawGrid().
|
protectedinherited |
< Current VIEW_CONTROLS settings.
Definition at line 66 of file hidpi_gl_canvas.h.
Referenced by HIDPI_GL_3D_CANVAS::OnMouseWheelCamera().
|
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().
|
protectedinherited |
The color of the outlines.
Definition at line 1085 of file graphics_abstraction_layer.h.
Referenced by BeginDrawing(), BitmapText(), DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), DrawArcSegment(), drawBitmapOverbar(), drawCircle(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), DrawLine(), drawPolyline(), DrawRectangle(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), drawSegment(), drawSegmentChain(), drawSemiCircle(), KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::SetStrokeColor(), and KIGFX::CAIRO_GAL_BASE::storePath().
|
private |
Used to store swap interval information.
Definition at line 335 of file opengl_gal.h.
Referenced by init(), and OPENGL_GAL().
|
private |
Temporary rendering target (for diffing etc.)
Definition at line 358 of file opengl_gal.h.
Referenced by BeginDrawing(), ClearTarget(), EndDiffLayer(), HasTarget(), and StartDiffLayer().
|
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().
|
private |
Definition at line 384 of file opengl_gal.h.
Referenced by drawPolygon(), init(), OPENGL_GAL(), and ~OPENGL_GAL().
|
private |
Definition at line 385 of file opengl_gal.h.
Referenced by drawPolygon().
|
protectedinherited |
The scale factor world->screen.
Definition at line 1074 of file graphics_abstraction_layer.h.
Referenced by blitCursor(), KIGFX::GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), ComputeWorldScreenMatrix(), and KIGFX::CAIRO_GAL_BASE::DrawGrid().
|
protectedinherited |
World transformation.
Definition at line 1072 of file graphics_abstraction_layer.h.
Referenced by BeginDrawing(), KIGFX::GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), and KIGFX::CAIRO_GAL_BASE::resetContext().
|
protectedinherited |
The unit length of the world coordinates [inch].
Definition at line 1066 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::DrawBitmap(), and DrawBitmap().
|
protectedinherited |
The zoom factor.
Definition at line 1070 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix().
|
staticprotectedinherited |
Definition at line 1018 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GAL().
|
staticprotectedinherited |
Possible depth range.
Definition at line 1017 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL::GAL().
|
private |
Definition at line 377 of file opengl_gal.h.
Referenced by BeginDrawing(), and OPENGL_GAL().
|
private |
Definition at line 376 of file opengl_gal.h.
Referenced by BeginDrawing(), and OPENGL_GAL().
|
private |
Definition at line 375 of file opengl_gal.h.
Referenced by BeginDrawing(), and OPENGL_GAL().
|
private |
Definition at line 374 of file opengl_gal.h.
Referenced by BeginDrawing(), and OPENGL_GAL().