KiCad PCB EDA Suite
|
Abstract interface for drawing on a 2D-surface. More...
#include <graphics_abstraction_layer.h>
Public Member Functions | |
GAL (GAL_DISPLAY_OPTIONS &aOptions) | |
virtual | ~GAL () |
virtual bool | IsInitialized () const |
Return the initialization status for the canvas. | |
virtual bool | IsVisible () const |
Return true if the GAL canvas is visible on the screen. | |
virtual bool | IsCairoEngine () |
Return true if the GAL engine is a Cairo based type. | |
virtual bool | IsOpenGlEngine () |
Return true if the GAL engine is a OpenGL based type. | |
virtual void | DrawLine (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) |
Draw a line. | |
virtual void | DrawSegment (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth) |
Draw a rounded segment. | |
virtual void | DrawSegmentChain (const std::vector< VECTOR2D > &aPointList, double aWidth) |
Draw a chain of rounded segments. | |
virtual void | DrawSegmentChain (const SHAPE_LINE_CHAIN &aLineChain, double aWidth) |
virtual void | DrawPolyline (const std::deque< VECTOR2D > &aPointList) |
Draw a polyline. | |
virtual void | DrawPolyline (const std::vector< VECTOR2D > &aPointList) |
virtual void | DrawPolyline (const VECTOR2D aPointList[], int aListSize) |
virtual void | DrawPolyline (const SHAPE_LINE_CHAIN &aLineChain) |
virtual void | DrawPolylines (const std::vector< std::vector< VECTOR2D > > &aPointLists) |
Draw multiple polylines. | |
virtual void | DrawCircle (const VECTOR2D &aCenterPoint, double aRadius) |
Draw a circle using world coordinates. | |
virtual void | DrawHoleWall (const VECTOR2D &aCenterPoint, double aHoleRadius, double aWallWidth) |
Draw a hole wall ring. | |
virtual void | DrawArc (const VECTOR2D &aCenterPoint, double aRadius, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aAngle) |
Draw an arc. | |
virtual void | DrawArcSegment (const VECTOR2D &aCenterPoint, double aRadius, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aAngle, double aWidth, double aMaxError) |
Draw an arc segment. | |
virtual void | DrawRectangle (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) |
Draw a rectangle. | |
void | DrawRectangle (const BOX2I &aRect) |
virtual void | DrawGlyph (const KIFONT::GLYPH &aGlyph, int aNth=0, int aTotal=1) |
Draw a polygon representing a font glyph. | |
virtual void | DrawGlyphs (const std::vector< std::unique_ptr< KIFONT::GLYPH > > &aGlyphs) |
Draw polygons representing font glyphs. | |
virtual void | DrawPolygon (const std::deque< VECTOR2D > &aPointList) |
Draw a polygon. | |
virtual void | DrawPolygon (const VECTOR2D aPointList[], int aListSize) |
virtual void | DrawPolygon (const SHAPE_POLY_SET &aPolySet, bool aStrokeTriangulation=false) |
virtual void | DrawPolygon (const SHAPE_LINE_CHAIN &aPolySet) |
virtual void | DrawCurve (const VECTOR2D &startPoint, const VECTOR2D &controlPointA, const VECTOR2D &controlPointB, const VECTOR2D &endPoint, double aFilterValue=0.0) |
Draw a cubic bezier spline. | |
virtual void | DrawBitmap (const BITMAP_BASE &aBitmap, double alphaBlend=1.0) |
Draw a bitmap image. | |
virtual void | ResizeScreen (int aWidth, int aHeight) |
Resize the canvas. | |
virtual bool | Show (bool aShow) |
Show/hide the GAL canvas. | |
const VECTOR2I & | GetScreenPixelSize () const |
Return GAL canvas size in pixels. | |
virtual int | GetSwapInterval () const |
Return the swap interval. -1 for adaptive, 0 for disabled/unknown. | |
virtual void | Flush () |
Force all remaining objects to be drawn. | |
void | SetClearColor (const COLOR4D &aColor) |
const COLOR4D & | GetClearColor () const |
virtual void | ClearScreen () |
Clear the screen. | |
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. | |
virtual void | SetMinLineWidth (float aLineWidth) |
Set the minimum line width in pixels. | |
float | GetLineWidth () const |
Get the line width. | |
float | GetMinLineWidth () const |
Get the minimum line width in pixels. | |
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. | |
virtual void | BitmapText (const wxString &aText, const VECTOR2I &aPosition, const EDA_ANGLE &aAngle) |
Draw a text using a bitmap font. | |
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 |
virtual void | Transform (const MATRIX3x3D &aTransformation) |
Transform the context. | |
virtual void | Rotate (double aAngle) |
Rotate the context. | |
virtual void | Translate (const VECTOR2D &aTranslation) |
Translate the context. | |
virtual void | Scale (const VECTOR2D &aScale) |
Scale the context. | |
virtual void | Save () |
Save the context. | |
virtual void | Restore () |
Restore the context. | |
virtual int | BeginGroup () |
Begin a group. | |
virtual void | EndGroup () |
End the group. | |
virtual void | DrawGroup (int aGroupNumber) |
Draw the stored group. | |
virtual void | ChangeGroupColor (int aGroupNumber, const COLOR4D &aNewColor) |
Change the color used to draw the group. | |
virtual void | ChangeGroupDepth (int aGroupNumber, int aDepth) |
Change the depth (Z-axis position) of the group. | |
virtual void | DeleteGroup (int aGroupNumber) |
Delete the group from the memory. | |
virtual void | ClearCache () |
Delete all data created during caching of graphic items. | |
virtual void | ComputeWorldScreenMatrix () |
Compute the world <-> screen transformation matrix. | |
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. | |
double | GetScreenDPI () const |
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 | SetTarget (RENDER_TARGET aTarget) |
Set the target for rendering. | |
virtual RENDER_TARGET | GetTarget () const |
Get the currently used target for rendering. | |
virtual void | ClearTarget (RENDER_TARGET aTarget) |
Clear the target for rendering. | |
virtual bool | HasTarget (RENDER_TARGET aTarget) |
Return true if the target exists. | |
virtual void | SetNegativeDrawMode (bool aSetting) |
Set negative draw mode in the renderer. | |
virtual void | StartDiffLayer () |
Begins rendering of a differential layer. | |
virtual void | EndDiffLayer () |
Ends rendering of a differential layer. | |
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. | |
virtual void | DrawGrid () |
VECTOR2D | GetGridPoint (const VECTOR2D &aPoint) const |
For a given point it returns the nearest point belonging to the grid in world coordinates. | |
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. | |
virtual bool | SetNativeCursorStyle (KICURSOR aCursor, bool aHiDPI) |
Set the cursor in the native panel. | |
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 void | DrawCursor (const VECTOR2D &aCursorPosition) |
Draw the cursor. | |
virtual void | EnableDepthTest (bool aEnabled=false) |
virtual bool | IsContextLocked () |
Checks the state of the context lock. | |
virtual void | LockContext (int aClientCookie) |
Use GAL_CONTEXT_LOCKER RAII object unless you know what you're doing. | |
virtual void | UnlockContext (int aClientCookie) |
virtual void | BeginDrawing () |
Start/end drawing functions, draw calls can be only made in between the calls to BeginDrawing()/EndDrawing(). | |
virtual void | EndDrawing () |
End the drawing, needs to be called for every new frame. | |
Protected Member Functions | |
virtual void | beginUpdate () |
Enable item update mode. | |
virtual void | endUpdate () |
Disable item update mode. | |
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. | |
virtual bool | updatedGalDisplayOptions (const GAL_DISPLAY_OPTIONS &aOptions) |
Handle updating display options. | |
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. | |
float | m_minLineWidth |
Minimum line width in pixels. | |
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. | |
KIGFX::CROSS_HAIR_MODE | m_crossHairMode |
Crosshair drawing mode. | |
VECTOR2D | m_cursorPosition |
Current cursor position (world coordinates) | |
KICURSOR | m_currentNativeCursor |
Current cursor. | |
Static Protected Attributes | |
static const int | MIN_DEPTH = -2*MAX_LAYERS_FOR_VIEW |
Possible depth range. | |
static const int | MAX_DEPTH = 2*MAX_LAYERS_FOR_VIEW - 1 |
static const int | GRID_DEPTH = MAX_DEPTH - 1 |
Depth level on which the grid is drawn. | |
Private Member Functions | |
double | getLayerDepth () const |
Private Attributes | |
TEXT_ATTRIBUTES | m_attributes |
Friends | |
class | GAL_CONTEXT_LOCKER |
class | GAL_UPDATE_CONTEXT |
class | GAL_DRAWING_CONTEXT |
class | GAL_SCOPED_ATTRS |
Abstract interface for drawing on a 2D-surface.
The functions are optimized for drawing shapes of an EDA-program such as KiCad. Most methods are abstract and need to be implemented by a lower layer, for example by a Cairo or OpenGL implementation. Almost all methods use world coordinates as arguments. The board design is defined in world space units for drawing purposes these are transformed to screen units with this layer. So zooming is handled here as well.
Definition at line 62 of file graphics_abstraction_layer.h.
GAL::GAL | ( | GAL_DISPLAY_OPTIONS & | aOptions | ) |
Definition at line 40 of file graphics_abstraction_layer.cpp.
References ARROW, computeWorldScale(), DEFAULT, ADVANCED_CFG::GetCfg(), KIGFX::LINES, m_crossHairMode, m_currentNativeCursor, m_forceDisplayCursor, m_gridLineWidth, m_gridMinSpacing, m_gridStyle, m_observerLink, m_options, MAX_DEPTH, MIN_DEPTH, ResetTextAttributes(), SetAxesEnabled(), SetCoarseGrid(), SetCursorColor(), SetCursorEnabled(), SetDepthRange(), SetFillColor(), SetFlip(), SetGridVisibility(), SetIsFill(), SetIsStroke(), SetLayerDepth(), SetLineWidth(), SetLookAtPoint(), SetMinLineWidth(), SetNativeCursorStyle(), SetRotation(), SetScreenDPI(), SetStrokeColor(), SetWorldUnitLength(), SetZoomFactor(), and KIGFX::SMALL_CROSS.
Referenced by KIGFX::CAIRO_GAL_BASE::CAIRO_GAL_BASE(), CALLBACK_GAL::CALLBACK_GAL(), CALLBACK_GAL::CALLBACK_GAL(), CALLBACK_GAL::CALLBACK_GAL(), GAL_DRAWING_CONTEXT, and KIGFX::OPENGL_GAL::OPENGL_GAL().
|
virtual |
Definition at line 98 of file graphics_abstraction_layer.cpp.
|
inline |
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 439 of file graphics_abstraction_layer.h.
References m_layerDepth, and SetLayerDepth().
Referenced by KIGFX::VIEW_GROUP::ViewDraw().
|
inlinevirtual |
Start/end drawing functions, draw calls can be only made in between the calls to BeginDrawing()/EndDrawing().
Normally you should create a GAL_DRAWING_CONTEXT RAII object, but I'm leaving these functions public for more precise (i.e. timing/profiling) control of the drawing process - Tom Begin the drawing, needs to be called for every new frame. Use GAL_DRAWING_CONTEXT RAII object unless you know what you're doing.
Reimplemented in KIGFX::CAIRO_GAL, KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 1027 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Begin a group.
A group is a collection of graphic items. Hierarchical groups are possible, attributes and transformations can be used.
Reimplemented in KIGFX::CAIRO_GAL, KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 547 of file graphics_abstraction_layer.h.
|
inlineprotectedvirtual |
Enable item update mode.
Private: use GAL_UPDATE_CONTEXT RAII object
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 1036 of file graphics_abstraction_layer.h.
|
virtual |
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 in KIGFX::OPENGL_GAL.
Definition at line 271 of file graphics_abstraction_layer.cpp.
References KIFONT::METRICS::Default(), KIFONT::FONT::Draw(), KIFONT::FONT::GetFont(), GetLineWidth(), TEXT_ATTRIBUTES::m_Angle, m_attributes, m_globalFlipX, TEXT_ATTRIBUTES::m_Mirrored, TEXT_ATTRIBUTES::m_Size, and TEXT_ATTRIBUTES::m_StrokeWidth.
Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::bitmapText(), KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape(), and KIGFX::VIEW_OVERLAY::COMMAND_BITMAP_TEXT::Execute().
|
inlinevirtual |
Change the color used to draw the group.
aGroupNumber | is the group number. |
aNewColor | is the new color. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 565 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Change the depth (Z-axis position) of the group.
aGroupNumber | is the group number. |
aDepth | is the new depth. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 573 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Delete all data created during caching of graphic items.
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 585 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Clear the screen.
aColor | is the color used for clearing. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 288 of file graphics_abstraction_layer.h.
Referenced by BOARD_PRINTOUT::DrawPage(), and SCH_PRINTOUT::PrintPage().
|
inlinevirtual |
Clear the target for rendering.
aTarget | is the target to be cleared. |
Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.
Definition at line 723 of file graphics_abstraction_layer.h.
|
protected |
Compute minimum grid spacing from the grid settings.
Definition at line 218 of file graphics_abstraction_layer.cpp.
References m_gridMinSpacing.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), and GetVisibleGridSize().
|
inlineprotected |
Compute the scaling factor for the world->screen matrix.
Definition at line 1044 of file graphics_abstraction_layer.h.
References PGM_BASE::GetCommonSettings(), COMMON_SETTINGS::m_Appearance, m_screenDPI, m_worldScale, m_worldUnitLength, m_zoomFactor, Pgm(), and COMMON_SETTINGS::APPEARANCE::zoom_correction_factor.
Referenced by ComputeWorldScreenMatrix(), KIGFX::OPENGL_GAL::ComputeWorldScreenMatrix(), and GAL().
|
virtual |
Compute the world <-> screen transformation matrix.
Reimplemented in KIGFX::CAIRO_PRINT_GAL, and KIGFX::OPENGL_GAL.
Definition at line 173 of file graphics_abstraction_layer.cpp.
References computeWorldScale(), m_globalFlipX, m_globalFlipY, m_lookAtPoint, m_rotation, m_screenSize, m_screenWorldMatrix, m_worldScale, m_worldScreenMatrix, scale, MATRIX3x3< T >::SetIdentity(), MATRIX3x3< T >::SetRotation(), MATRIX3x3< T >::SetScale(), and MATRIX3x3< T >::SetTranslation().
Referenced by KIGFX::OPENGL_GAL::ComputeWorldScreenMatrix(), and KIGFX::CAIRO_GAL_BASE::resetContext().
|
inlinevirtual |
Delete the group from the memory.
aGroupNumber | is the group number. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 580 of file graphics_abstraction_layer.h.
|
inlinevirtual |
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 in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 165 of file graphics_abstraction_layer.h.
Referenced by KIGFX::drawAltPinModesIcon(), ROUTER_PREVIEW_ITEM::drawLineChain(), KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape(), DrawQuadrantPointIcon(), ROUTER_PREVIEW_ITEM::drawShape(), KIGFX::VIEW_OVERLAY::COMMAND_ARC::Execute(), and KIGFX::CONSTRUCTION_GEOM::ViewDraw().
|
inlinevirtual |
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.
This has meaning only for back ends that can't draw a true arc, and use segments to approximate.
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. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 188 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Draw a bitmap image.
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 249 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Draw a circle using world coordinates.
aCenterPoint | is the center point of the circle. |
aRadius | is the radius of the circle. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 145 of file graphics_abstraction_layer.h.
Referenced by DrawCentrePointIcon(), ROUTER_PREVIEW_ITEM::drawLineChain(), ROUTER_PREVIEW_ITEM::drawShape(), DrawSnapNode(), KIGFX::VIEW_OVERLAY::COMMAND_CIRCLE::Execute(), screenSpaceCircle(), EDIT_POINTS::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), and KIGFX::ORIGIN_VIEWITEM::ViewDraw().
|
inlinevirtual |
Draw the cursor.
aCursorPosition | is the cursor position in screen coordinates. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 1001 of file graphics_abstraction_layer.h.
|
inlinevirtual |
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 in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 242 of file graphics_abstraction_layer.h.
Referenced by RATSNEST_VIEW_ITEM::ViewDraw().
|
inlinevirtual |
Draw a polygon representing a font glyph.
Reimplemented in CALLBACK_GAL, KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 208 of file graphics_abstraction_layer.h.
Referenced by DrawGlyphs().
|
inlinevirtual |
Draw polygons representing font glyphs.
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 213 of file graphics_abstraction_layer.h.
References DrawGlyph().
Referenced by KIFONT::FONT::drawSingleLineText(), EDA_TEXT::GetEffectiveTextShape(), BRDITEMS_PLOTTER::PlotText(), PCB_TEXT::TransformTextToPolySet(), and PCB_TEXTBOX::TransformTextToPolySet().
|
inlinevirtual |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 926 of file graphics_abstraction_layer.h.
Referenced by SYMBOL_VIEWER_FRAME::CommonSettingsChanged().
|
inlinevirtual |
Draw the stored group.
aGroupNumber | is the group number. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 557 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Draw a hole wall ring.
aCenterPoint | is the center point of the hole. |
aHoleRadius | is the radius of the hole. |
aWallWidth | is the wall thickness. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 154 of file graphics_abstraction_layer.h.
|
inlinevirtual |
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 in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 99 of file graphics_abstraction_layer.h.
Referenced by KIGFX::SCH_PAINTER::draw(), KIGFX::drawAltPinModesIcon(), drawBacksideTicks(), DrawCentrePointIcon(), DrawCornerIcon(), KIGFX::DrawCross(), KIGFX::DrawDashedLine(), DrawIntersectionIcon(), ROUTER_PREVIEW_ITEM::drawLineChain(), DrawLineEndpointIcon(), DrawMidpointIcon(), DrawOnElementIcon(), KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape(), KIGFX::PREVIEW::CENTRELINE_RECT_ITEM::drawPreviewShape(), ROUTER_PREVIEW_ITEM::drawShape(), drawTicksAlongLine(), KIGFX::VIEW_OVERLAY::COMMAND_LINE::Execute(), screenSpaceLine(), EDIT_POINTS::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), and RATSNEST_VIEW_ITEM::ViewDraw().
|
inlinevirtual |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 229 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 227 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Draw a polygon.
aPointList | is the list of the polygon points. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 225 of file graphics_abstraction_layer.h.
Referenced by KIGFX::PREVIEW::CENTRELINE_RECT_ITEM::drawPreviewShape(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), ROUTER_PREVIEW_ITEM::drawShape(), KIGFX::VIEW_OVERLAY::COMMAND_POINT_POLYGON::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_POLY_POLYGON::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_POLYGON::Execute(), KIGFX::knockoutText(), and KIGFX::PREVIEW::SELECTION_AREA::ViewDraw().
|
inlinevirtual |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 226 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 130 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Draw a polyline.
aPointList | is a list of 2D-Vectors containing the polyline points. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 127 of file graphics_abstraction_layer.h.
Referenced by KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), and ROUTER_PREVIEW_ITEM::drawShape().
|
inlinevirtual |
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 128 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 129 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Draw multiple polylines.
aPointLists | are lists of 2D-Vectors containing the polyline points. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 137 of file graphics_abstraction_layer.h.
|
inline |
Definition at line 200 of file graphics_abstraction_layer.h.
References DrawRectangle(), BOX2< Vec >::GetEnd(), and BOX2< Vec >::GetOrigin().
|
inlinevirtual |
Draw a rectangle.
aStartPoint | is the start point of the rectangle. |
aEndPoint | is the end point of the rectangle. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 198 of file graphics_abstraction_layer.h.
Referenced by KIGFX::boxText(), DrawRectangle(), ROUTER_PREVIEW_ITEM::drawShape(), KIGFX::VIEW_OVERLAY::COMMAND_RECTANGLE::Execute(), EDIT_POINTS::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inlinevirtual |
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 in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 110 of file graphics_abstraction_layer.h.
Referenced by ROUTER_PREVIEW_ITEM::drawShape().
|
inlinevirtual |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 120 of file graphics_abstraction_layer.h.
|
inlinevirtual |
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 in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 119 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 1003 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Ends rendering of a differential layer.
Objects drawn after the StartDiffLayer() will be drawn and composited with a differential blend mode, then drawing is returned to normal.
Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.
Definition at line 762 of file graphics_abstraction_layer.h.
|
inlinevirtual |
End the drawing, needs to be called for every new frame.
Use GAL_DRAWING_CONTEXT RAII object unless you know what you're doing.
Reimplemented in KIGFX::CAIRO_GAL, KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 1031 of file graphics_abstraction_layer.h.
|
inlinevirtual |
End the group.
Reimplemented in KIGFX::CAIRO_GAL, KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 550 of file graphics_abstraction_layer.h.
|
inlinevirtual |
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 778 of file graphics_abstraction_layer.h.
|
inlineprotectedvirtual |
Disable item update mode.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 1039 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Force all remaining objects to be drawn.
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 271 of file graphics_abstraction_layer.h.
|
inline |
Definition at line 278 of file graphics_abstraction_layer.h.
References m_clearColor.
Referenced by EDIT_POINTS::ViewDraw().
|
protected |
Get the actual cursor color to draw.
Definition at line 258 of file graphics_abstraction_layer.cpp.
References color, m_cursorColor, and m_isCursorEnabled.
Referenced by KIGFX::CAIRO_GAL_BASE::blitCursor(), and KIGFX::OPENGL_GAL::blitCursor().
|
inline |
Get the fill color.
Definition at line 349 of file graphics_abstraction_layer.h.
References m_fillColor.
Referenced by KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS().
|
inline |
Definition at line 468 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by KIGFX::OPENGL_GAL::BitmapText(), and KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape().
|
inline |
Get the grid line width.
Definition at line 920 of file graphics_abstraction_layer.h.
References m_gridLineWidth.
|
inline |
Definition at line 819 of file graphics_abstraction_layer.h.
References m_gridOrigin.
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 226 of file graphics_abstraction_layer.cpp.
References KiROUND(), m_gridOffset, m_gridSize, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by KIGFX::WX_VIEW_CONTROLS::GetRawCursorPosition().
|
inline |
Return the grid size.
Definition at line 846 of file graphics_abstraction_layer.h.
References m_gridSize.
Referenced by COMMON_TOOLS::CursorControl(), GERBVIEW_FRAME::DisplayGridMsg(), EDA_DRAW_FRAME::GetNearestGridPosition(), EDA_DRAW_FRAME::GetNearestHalfGridPosition(), and COMMON_TOOLS::PanControl().
|
inline |
Definition at line 793 of file graphics_abstraction_layer.h.
References KIGFX::ALWAYS, m_gridVisibility, m_options, and KIGFX::WITH_GRID.
Referenced by KIGFX::WX_VIEW_CONTROLS::GetRawCursorPosition(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), PNS::TOOL_BASE::updateEndItem(), and PNS::TOOL_BASE::updateStartItem().
|
inline |
Definition at line 791 of file graphics_abstraction_layer.h.
References m_gridVisibility.
|
inline |
Definition at line 487 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by KIGFX::OPENGL_GAL::BitmapText().
|
inline |
Get the fill status.
Definition at line 309 of file graphics_abstraction_layer.h.
References m_isFillEnabled.
Referenced by KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS().
|
inline |
Get the stroke status.
Definition at line 329 of file graphics_abstraction_layer.h.
References m_isStrokeEnabled.
Referenced by KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS().
|
inlineprivate |
Definition at line 1160 of file graphics_abstraction_layer.h.
References m_layerDepth.
Referenced by KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS().
|
inline |
Get the line width.
Definition at line 399 of file graphics_abstraction_layer.h.
References m_lineWidth.
Referenced by BitmapText(), CALLBACK_GAL::DrawGlyph(), KIGFX::OPENGL_GAL::DrawGrid(), ROUTER_PREVIEW_ITEM::drawLineChain(), and KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS().
|
inline |
Definition at line 655 of file graphics_abstraction_layer.h.
References m_lookAtPoint.
Referenced by GetVisibleWorldExtents().
|
inline |
Definition at line 676 of file graphics_abstraction_layer.h.
References m_depthRange.
|
inline |
Definition at line 675 of file graphics_abstraction_layer.h.
References m_depthRange.
Referenced by EDIT_POINTS::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), and KIGFX::VIEW_OVERLAY::ViewDraw().
|
inline |
Get the minimum line width in pixels.
Definition at line 409 of file graphics_abstraction_layer.h.
References m_minLineWidth.
Referenced by KIGFX::OPENGL_GAL::BeginDrawing().
|
inline |
Definition at line 664 of file graphics_abstraction_layer.h.
References m_rotation.
|
inline |
Definition at line 647 of file graphics_abstraction_layer.h.
References m_screenDPI.
|
inline |
Return GAL canvas size in pixels.
Definition at line 262 of file graphics_abstraction_layer.h.
References m_screenSize.
Referenced by BOARD_PRINTOUT::DrawPage(), SCH_PRINTOUT::PrintPage(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
|
inline |
Get the screen <-> world transformation matrix.
Definition at line 609 of file graphics_abstraction_layer.h.
References m_screenWorldMatrix.
Referenced by GetVisibleWorldExtents(), KIGFX::OPENGL_GAL::getWorldPixelSize(), screenSpaceCircle(), screenSpaceLine(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inline |
Get the stroke color.
Definition at line 369 of file graphics_abstraction_layer.h.
References m_strokeColor.
Referenced by KIGFX::PREVIEW::DrawTextNextToCursor(), KIGFX::GAL_SCOPED_ATTRS::GAL_SCOPED_ATTRS(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
|
inlinevirtual |
Return the swap interval. -1 for adaptive, 0 for disabled/unknown.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 268 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Get the currently used target for rendering.
Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.
Definition at line 716 of file graphics_abstraction_layer.h.
References KIGFX::TARGET_CACHED.
|
inline |
Definition at line 494 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by KIGFX::OPENGL_GAL::BitmapText().
|
inline |
Return the visible grid size in x and y directions.
Definition at line 856 of file graphics_abstraction_layer.h.
References computeMinGridSpacing(), m_gridSize, m_gridStyle, m_gridTick, m_worldScale, KIGFX::SMALL_CROSS, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by KIGFX::OPENGL_GAL::DrawGrid().
BOX2D GAL::GetVisibleWorldExtents | ( | ) | const |
Definition at line 203 of file graphics_abstraction_layer.cpp.
References GetLookAtPoint(), MATRIX3x3< T >::GetScale(), GetScreenWorldMatrix(), m_screenSize, BOX2< Vec >::SetOrigin(), BOX2< Vec >::SetSize(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ROUTER_TOOL::handleCommonEvents(), and ROUTER_TOOL::InlineDrag().
|
inline |
Get the world scale.
Definition at line 683 of file graphics_abstraction_layer.h.
References m_worldScale.
Referenced by KIGFX::SCH_PAINTER::draw(), KIGFX::DrawDashedLine(), KIGFX::PREVIEW::DrawTextNextToCursor(), drawTicksAlongLine(), KIGFX::PREVIEW::GetConstantGlyphHeight(), SCH_BASE_FRAME::RefreshZoomDependentItems(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), and RATSNEST_VIEW_ITEM::ViewDraw().
|
inline |
Get the world <-> screen transformation matrix.
Definition at line 599 of file graphics_abstraction_layer.h.
References m_worldScreenMatrix.
|
inline |
Definition at line 658 of file graphics_abstraction_layer.h.
References m_zoomFactor.
Referenced by COMMON_TOOLS::doZoomInOut(), and EDA_DRAW_FRAME::OnUpdateSelectZoom().
|
inlinevirtual |
Return true if the target exists.
aTarget | is the target to be checked. |
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 730 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Return true if the GAL engine is a Cairo based type.
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 82 of file graphics_abstraction_layer.h.
Referenced by getShadowLayer().
|
inlinevirtual |
Checks the state of the context lock.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 1009 of file graphics_abstraction_layer.h.
|
inline |
Return information about cursor visibility.
Definition at line 981 of file graphics_abstraction_layer.h.
References m_forceDisplayCursor, and m_isCursorEnabled.
Referenced by KIGFX::CAIRO_GAL_BASE::blitCursor(), and KIGFX::OPENGL_GAL::blitCursor().
|
inline |
Definition at line 697 of file graphics_abstraction_layer.h.
References m_globalFlipX.
Referenced by KIGFX::CAIRO_GAL_BASE::angle_xform(), KIGFX::CAIRO_GAL_BASE::arc_angles_xform_and_normalize(), KIGFX::PREVIEW::DrawTextNextToCursor(), DS_PROXY_VIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inline |
Definition at line 698 of file graphics_abstraction_layer.h.
References m_globalFlipY.
|
inline |
Definition at line 471 of file graphics_abstraction_layer.h.
References m_attributes.
|
inline |
Definition at line 474 of file graphics_abstraction_layer.h.
References m_attributes.
|
inline |
Definition at line 477 of file graphics_abstraction_layer.h.
References m_attributes.
|
inlinevirtual |
Return the initialization status for the canvas.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 76 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Return true if the GAL engine is a OpenGL based type.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 85 of file graphics_abstraction_layer.h.
|
inline |
Definition at line 480 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by KIGFX::OPENGL_GAL::BitmapText().
|
inlinevirtual |
Return true if the GAL canvas is visible on the screen.
Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.
Definition at line 79 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Use GAL_CONTEXT_LOCKER RAII object unless you know what you're doing.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 1016 of file graphics_abstraction_layer.h.
Ensure that the first element is smaller than the second.
Definition at line 1093 of file graphics_abstraction_layer.h.
References T.
Referenced by KIGFX::CAIRO_GAL_BASE::arc_angles_xform_and_normalize(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::CAIRO_GAL_BASE::DrawGrid(), and KIGFX::OPENGL_GAL::DrawGrid().
|
overrideprotectedvirtual |
Handler for observer settings changes.
Implements KIGFX::GAL_DISPLAY_OPTIONS_OBSERVER.
Definition at line 103 of file graphics_abstraction_layer.cpp.
References updatedGalDisplayOptions().
void GAL::ResetTextAttributes | ( | ) |
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 157 of file graphics_abstraction_layer.cpp.
References GR_TEXT_H_ALIGN_CENTER, GR_TEXT_V_ALIGN_CENTER, SetFontBold(), SetFontItalic(), SetFontUnderlined(), SetGlyphSize(), SetHorizontalJustify(), SetTextMirrored(), and SetVerticalJustify().
Referenced by GAL(), KIGFX::PREVIEW::ARC_ASSISTANT::ViewDraw(), KIGFX::PREVIEW::BEZIER_ASSISTANT::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), and KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewDraw().
|
inlinevirtual |
Resize the canvas.
Reimplemented in KIGFX::CAIRO_GAL, KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 256 of file graphics_abstraction_layer.h.
Referenced by BOARD_PRINTOUT::DrawPage(), EDA_DRAW_FRAME::OnMove(), and SCH_PRINTOUT::PrintPage().
|
inlinevirtual |
Restore the context.
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 533 of file graphics_abstraction_layer.h.
Referenced by KIGFX::drawAltPinModesIcon(), DS_PROXY_VIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inlinevirtual |
Rotate the context.
aAngle | is the rotation angle in radians. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 513 of file graphics_abstraction_layer.h.
Referenced by KIGFX::drawAltPinModesIcon().
|
inlinevirtual |
Save the context.
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 530 of file graphics_abstraction_layer.h.
Referenced by KIGFX::drawAltPinModesIcon(), DS_PROXY_VIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inlinevirtual |
Scale the context.
aScale | is the scale factor for the x- and y-axis. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 527 of file graphics_abstraction_layer.h.
Referenced by DS_PROXY_VIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inline |
Set the axes color.
aAxesColor | is the color to draw the axes if enabled. |
Definition at line 892 of file graphics_abstraction_layer.h.
References m_axesColor.
Referenced by KIGFX::CAIRO_GAL_BASE::CAIRO_GAL_BASE(), SCH_BASE_FRAME::CommonSettingsChanged(), SYMBOL_VIEWER_FRAME::CommonSettingsChanged(), KIGFX::OPENGL_GAL::OPENGL_GAL(), and SYMBOL_EDIT_FRAME::SwitchCanvas().
|
inline |
Enable drawing the axes.
Definition at line 900 of file graphics_abstraction_layer.h.
References m_axesEnabled.
Referenced by FOOTPRINT_EDIT_FRAME::ActivateGalCanvas(), GAL(), DIALOG_PAD_PROPERTIES::prepareCanvas(), FP_TREE_SYNCHRONIZING_ADAPTER::ShowPreview(), FOOTPRINT_EDIT_FRAME::SwitchCanvas(), and SYMBOL_EDIT_FRAME::SwitchCanvas().
|
inline |
Definition at line 273 of file graphics_abstraction_layer.h.
References m_clearColor.
Referenced by BOARD_PRINTOUT::DrawPage(), and SCH_PRINTOUT::PrintPage().
|
inline |
Draw every tick line wider.
aInterval | increase the width of every aInterval line, if 0 do not use this feature. |
Definition at line 910 of file graphics_abstraction_layer.h.
References m_gridTick.
Referenced by GAL().
|
inline |
Set the cursor color.
aCursorColor | is the color of the cursor. |
Definition at line 991 of file graphics_abstraction_layer.h.
References m_cursorColor.
Referenced by GAL().
|
inline |
Enable/disable cursor.
aCursorEnabled | is true if the cursor should be drawn, else false. |
Definition at line 971 of file graphics_abstraction_layer.h.
References m_isCursorEnabled.
Referenced by GAL().
|
inline |
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 674 of file graphics_abstraction_layer.h.
References m_depthRange.
Referenced by GAL().
|
inlinevirtual |
Set the fill color.
aColor | is the color for filling. |
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 339 of file graphics_abstraction_layer.h.
References m_fillColor.
Referenced by KIGFX::OPENGL_GAL::BeginDrawing(), KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape(), ROUTER_PREVIEW_ITEM::drawShape(), KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::Execute(), GAL(), KIGFX::knockoutText(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::setupGal(), EDIT_POINTS::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::SNAP_INDICATOR::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inline |
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 691 of file graphics_abstraction_layer.h.
References m_globalFlipX, and m_globalFlipY.
Referenced by GAL(), and BOARD_PRINTOUT::setupGal().
|
inline |
Definition at line 470 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by ResetTextAttributes().
|
inline |
Definition at line 473 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by ResetTextAttributes().
|
inline |
Definition at line 476 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by ResetTextAttributes().
|
inline |
Definition at line 467 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by KIGFX::bitmapText(), KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape(), KIGFX::VIEW_OVERLAY::COMMAND_GLYPH_SIZE::Execute(), and ResetTextAttributes().
|
inline |
Set the grid color.
aGridColor | is the grid color, it should have a low alpha value for the best effect. |
Definition at line 882 of file graphics_abstraction_layer.h.
References m_gridColor.
Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), KIGFX::CAIRO_GAL_BASE::CAIRO_GAL_BASE(), KIGFX::OPENGL_GAL::OPENGL_GAL(), GERBVIEW_FRAME::SetGridColor(), and PCB_EDIT_FRAME::SetGridColor().
|
inline |
Set the origin point for the grid.
aGridOrigin | is a vector containing the grid origin point, in world coordinates. |
Definition at line 804 of file graphics_abstraction_layer.h.
References m_gridOffset, m_gridOrigin, and m_gridSize.
Referenced by PCB_CONTROL::DoSetGridOrigin(), PCB_EDIT_FRAME::RebuildAndRefresh(), and PCB_BASE_EDIT_FRAME::SetBoard().
|
inline |
Set the grid size.
aGridSize | is a vector containing the grid size in x and y direction. |
Definition at line 829 of file graphics_abstraction_layer.h.
References m_gridOffset, m_gridOrigin, and m_gridSize.
Referenced by FOOTPRINT_PREVIEW_PANEL::New(), COMMON_TOOLS::OnGridChanged(), and DIALOG_PAD_PROPERTIES::prepareCanvas().
|
inline |
Set the visibility setting of the grid.
aVisibility | is the new visibility setting of the grid. |
Definition at line 789 of file graphics_abstraction_layer.h.
References m_gridVisibility.
Referenced by GAL(), FOOTPRINT_PREVIEW_PANEL::New(), COMMON_TOOLS::OnGridChanged(), DIALOG_PAD_PROPERTIES::prepareCanvas(), and EDA_DRAW_FRAME::SetGridVisibility().
|
inline |
Definition at line 482 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by KIGFX::bitmapText(), and ResetTextAttributes().
|
inlinevirtual |
Enable/disable fill.
aIsFillEnabled | is true, when the graphics objects should be filled, else false. |
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 299 of file graphics_abstraction_layer.h.
References m_isFillEnabled.
Referenced by KIGFX::boxText(), KIGFX::SCH_PAINTER::draw(), KIGFX::drawAltPinModesIcon(), ROUTER_PREVIEW_ITEM::drawLineChain(), KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape(), ROUTER_PREVIEW_ITEM::drawShape(), DrawSnapNode(), KIGFX::PREVIEW::DrawTextNextToCursor(), KIGFX::VIEW_OVERLAY::COMMAND_SET_FILL::Execute(), GAL(), KIGFX::knockoutText(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::setupGal(), KIGFX::strokeText(), EDIT_POINTS::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), RATSNEST_VIEW_ITEM::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inlinevirtual |
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 319 of file graphics_abstraction_layer.h.
References m_isStrokeEnabled.
Referenced by KIGFX::boxText(), KIGFX::SCH_PAINTER::draw(), KIGFX::drawAltPinModesIcon(), ROUTER_PREVIEW_ITEM::drawLineChain(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), ROUTER_PREVIEW_ITEM::drawShape(), DrawSnapNode(), KIGFX::PREVIEW::DrawTextNextToCursor(), KIGFX::VIEW_OVERLAY::COMMAND_SET_STROKE::Execute(), GAL(), KIGFX::knockoutText(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::setupGal(), KIGFX::strokeText(), EDIT_POINTS::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), RATSNEST_VIEW_ITEM::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inlinevirtual |
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 422 of file graphics_abstraction_layer.h.
References m_depthRange, and m_layerDepth.
Referenced by AdvanceDepth(), ROUTER_PREVIEW_ITEM::drawShape(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), GAL(), KIGFX::CAIRO_GAL_BASE::SetLayerDepth(), EDIT_POINTS::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::VIEW_OVERLAY::ViewDraw(), and ROUTER_PREVIEW_ITEM::ViewDraw().
|
inlinevirtual |
Set the line width.
aLineWidth | is the line width. |
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 379 of file graphics_abstraction_layer.h.
References m_lineWidth.
Referenced by KIGFX::bitmapText(), KIFONT::FONT::Draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::drawAltPinModesIcon(), KIGFX::OPENGL_GAL::DrawArcSegment(), drawBacksideTicks(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), KIGFX::OPENGL_GAL::drawSegment(), ROUTER_PREVIEW_ITEM::drawShape(), drawTicksAlongLine(), KIGFX::VIEW_OVERLAY::COMMAND_SET_WIDTH::Execute(), PCB_IO_KICAD_SEXPR::formatRenderCache(), GAL(), screenSpaceCircle(), screenSpaceLine(), KIGFX::CAIRO_GAL_BASE::SetLineWidth(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::setupGal(), EDIT_POINTS::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), RATSNEST_VIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inline |
Get/set the Point in world space to look at.
This point corresponds with the center of the actual drawing area.
Definition at line 654 of file graphics_abstraction_layer.h.
References m_lookAtPoint.
Referenced by BOARD_PRINTOUT::DrawPage(), GAL(), and SCH_PRINTOUT::PrintPage().
|
inlinevirtual |
Set the minimum line width in pixels.
aLineWidth | is the minimum line width. |
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 389 of file graphics_abstraction_layer.h.
References m_minLineWidth.
Referenced by GAL(), and KIGFX::OPENGL_GAL::SetMinLineWidth().
|
virtual |
Set the cursor in the native panel.
aCursor | is the cursor to use in the native panel |
Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.
Definition at line 291 of file graphics_abstraction_layer.cpp.
References m_currentNativeCursor.
Referenced by GAL(), KIGFX::CAIRO_GAL::SetNativeCursorStyle(), and KIGFX::OPENGL_GAL::SetNativeCursorStyle().
|
inlinevirtual |
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 in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 746 of file graphics_abstraction_layer.h.
|
inline |
Get/set the rotation angle (in radians).
Definition at line 663 of file graphics_abstraction_layer.h.
References m_rotation.
Referenced by GAL().
|
inline |
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 646 of file graphics_abstraction_layer.h.
References m_screenDPI.
Referenced by KIGFX::CAIRO_PRINT_GAL::CAIRO_PRINT_GAL(), and GAL().
|
inline |
Definition at line 638 of file graphics_abstraction_layer.h.
References m_screenSize.
Referenced by KIGFX::CAIRO_PRINT_GAL::SetSheetSize().
|
inlinevirtual |
Set the stroke color.
aColor | is the color for stroking the outline. |
Reimplemented in KIGFX::CAIRO_GAL_BASE.
Definition at line 359 of file graphics_abstraction_layer.h.
References m_strokeColor.
Referenced by KIGFX::OPENGL_GAL::BeginDrawing(), KIGFX::drawAltPinModesIcon(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), ROUTER_PREVIEW_ITEM::drawShape(), KIGFX::PREVIEW::DrawTextNextToCursor(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::Execute(), GAL(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::setupGal(), EDIT_POINTS::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), RATSNEST_VIEW_ITEM::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and TUNING_STATUS_VIEW_ITEM::ViewDraw().
|
inlinevirtual |
Set the target for rendering.
aTarget | is the new target for rendering. |
Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.
Definition at line 709 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), and MY_DRAWING::ViewDraw().
|
inline |
Definition at line 479 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by ResetTextAttributes(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
|
inline |
Definition at line 489 of file graphics_abstraction_layer.h.
References m_attributes.
Referenced by KIGFX::bitmapText(), and ResetTextAttributes().
|
inline |
Set the world <-> screen transformation matrix.
aMatrix | is the 3x3 world <-> screen transformation matrix. |
Definition at line 619 of file graphics_abstraction_layer.h.
References m_worldScreenMatrix.
|
inline |
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 636 of file graphics_abstraction_layer.h.
References m_worldUnitLength.
Referenced by GAL(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), SCH_PRINTOUT::PrintPage(), GERBVIEW_PRINTOUT::setupGal(), PCBNEW_PRINTOUT::setupGal(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), and PL_DRAW_PANEL_GAL::SwitchBackend().
|
inline |
Definition at line 657 of file graphics_abstraction_layer.h.
References m_zoomFactor.
Referenced by BOARD_PRINTOUT::DrawPage(), GAL(), and SCH_PRINTOUT::PrintPage().
|
inlinevirtual |
Show/hide the GAL canvas.
Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.
Definition at line 259 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Begins rendering of a differential layer.
Used by gerbview's differential mode.
Differential layers have their drawn objects blended onto the lower layers differently so we need to end drawing of current objects and start a new set to be completed with a different blend mode.
Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.
Definition at line 755 of file graphics_abstraction_layer.h.
|
inlinevirtual |
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 772 of file graphics_abstraction_layer.h.
Compute the point position in screen coordinates from given world coordinates.
aPoint | the point position in world coordinates. |
Definition at line 953 of file graphics_abstraction_layer.h.
References m_worldScreenMatrix.
Referenced by KIGFX::CAIRO_GAL_BASE::blitCursor(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
Compute the point position in world coordinates from given screen coordinates.
aPoint | the point position in screen coordinates. |
Definition at line 942 of file graphics_abstraction_layer.h.
References m_screenWorldMatrix.
|
inlinevirtual |
Transform the context.
aTransformation | is the transformation matrix. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 506 of file graphics_abstraction_layer.h.
|
inlinevirtual |
Translate the context.
aTranslation | is the translation vector. |
Reimplemented in KIGFX::CAIRO_GAL_BASE, and KIGFX::OPENGL_GAL.
Definition at line 520 of file graphics_abstraction_layer.h.
Referenced by KIGFX::drawAltPinModesIcon(), and DS_PROXY_VIEW_ITEM::ViewDraw().
|
inlinevirtual |
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 1018 of file graphics_abstraction_layer.h.
|
protectedvirtual |
Handle updating display options.
Derived classes should call up to this to set base-class methods.
Reimplemented in KIGFX::CAIRO_GAL, and KIGFX::OPENGL_GAL.
Definition at line 112 of file graphics_abstraction_layer.cpp.
References m_axesEnabled, m_crossHairMode, m_forceDisplayCursor, m_gridLineWidth, m_gridMinSpacing, m_gridStyle, m_options, and refresh.
Referenced by OnGalDisplayOptionsChanged(), KIGFX::CAIRO_GAL::updatedGalDisplayOptions(), and KIGFX::OPENGL_GAL::updatedGalDisplayOptions().
|
friend |
Definition at line 66 of file graphics_abstraction_layer.h.
References GAL_CONTEXT_LOCKER.
Referenced by KIGFX::OPENGL_GAL::CheckFeatures(), GAL_CONTEXT_LOCKER, and KIGFX::OPENGL_GAL::updatedGalDisplayOptions().
|
friend |
Definition at line 68 of file graphics_abstraction_layer.h.
References GAL(), and GAL_DRAWING_CONTEXT.
Referenced by GAL_DRAWING_CONTEXT.
|
friend |
Definition at line 1167 of file graphics_abstraction_layer.h.
References GAL_SCOPED_ATTRS.
Referenced by KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), and GAL_SCOPED_ATTRS.
|
friend |
Definition at line 67 of file graphics_abstraction_layer.h.
References GAL_UPDATE_CONTEXT.
Referenced by GAL_UPDATE_CONTEXT.
|
staticprotected |
Depth level on which the grid is drawn.
Definition at line 1064 of file graphics_abstraction_layer.h.
|
private |
Definition at line 1165 of file graphics_abstraction_layer.h.
Referenced by BitmapText(), GetGlyphSize(), GetHorizontalJustify(), GetVerticalJustify(), IsFontBold(), IsFontItalic(), IsFontUnderlined(), IsTextMirrored(), SetFontBold(), SetFontItalic(), SetFontUnderlined(), SetGlyphSize(), SetHorizontalJustify(), SetTextMirrored(), and SetVerticalJustify().
|
protected |
Color of the axes.
Definition at line 1142 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::drawAxes(), KIGFX::OPENGL_GAL::DrawGrid(), and SetAxesColor().
|
protected |
Should the axes be drawn.
Definition at line 1143 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::OPENGL_GAL::DrawGrid(), SetAxesEnabled(), and updatedGalDisplayOptions().
|
protected |
Definition at line 1130 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_PRINT_GAL::CAIRO_PRINT_GAL(), KIGFX::CAIRO_GAL_BASE::ClearScreen(), KIGFX::OPENGL_GAL::ClearTarget(), GetClearColor(), and SetClearColor().
|
protected |
Crosshair drawing mode.
Definition at line 1153 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::blitCursor(), KIGFX::OPENGL_GAL::blitCursor(), GAL(), and updatedGalDisplayOptions().
|
protected |
Current cursor.
Definition at line 1156 of file graphics_abstraction_layer.h.
Referenced by GAL(), KIGFX::CAIRO_GAL::SetNativeCursorStyle(), SetNativeCursorStyle(), and KIGFX::OPENGL_GAL::SetNativeCursorStyle().
|
protected |
Cursor color.
Definition at line 1152 of file graphics_abstraction_layer.h.
Referenced by getCursorColor(), and SetCursorColor().
|
protected |
Current cursor position (world coordinates)
Definition at line 1154 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::blitCursor(), KIGFX::OPENGL_GAL::blitCursor(), KIGFX::CAIRO_GAL_BASE::DrawCursor(), and KIGFX::OPENGL_GAL::DrawCursor().
|
protected |
Range of the depth.
Definition at line 1133 of file graphics_abstraction_layer.h.
Referenced by KIGFX::OPENGL_GAL::BeginDrawing(), KIGFX::CAIRO_GAL_BASE::DrawGrid(), GetMaxDepth(), GetMinDepth(), SetDepthRange(), and SetLayerDepth().
|
protected |
Stored depth values.
Definition at line 1106 of file graphics_abstraction_layer.h.
|
protected |
The fill color.
Definition at line 1128 of file graphics_abstraction_layer.h.
Referenced by KIGFX::OPENGL_GAL::BeginDrawing(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::drawCircle(), KIGFX::OPENGL_GAL::DrawGlyph(), KIGFX::OPENGL_GAL::DrawGlyphs(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::DrawHoleWall(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::DrawRectangle(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), KIGFX::OPENGL_GAL::drawSegment(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::CAIRO_GAL_BASE::flushPath(), GetFillColor(), KIGFX::CAIRO_GAL_BASE::SetFillColor(), SetFillColor(), and KIGFX::CAIRO_GAL_BASE::storePath().
|
protected |
Always show cursor.
Definition at line 1151 of file graphics_abstraction_layer.h.
Referenced by GAL(), IsCursorEnabled(), and updatedGalDisplayOptions().
|
protected |
Flag for X axis flipping.
Definition at line 1119 of file graphics_abstraction_layer.h.
Referenced by BitmapText(), KIGFX::OPENGL_GAL::BitmapText(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), ComputeWorldScreenMatrix(), IsFlippedX(), and SetFlip().
|
protected |
Flag for Y axis flipping.
Definition at line 1120 of file graphics_abstraction_layer.h.
Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), ComputeWorldScreenMatrix(), IsFlippedY(), and SetFlip().
|
protected |
Color of the grid.
Definition at line 1141 of file graphics_abstraction_layer.h.
Referenced by KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL_BASE::drawGridCross(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), KIGFX::CAIRO_GAL_BASE::drawGridPoint(), and SetGridColor().
|
protected |
Line width of the grid.
Definition at line 1145 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::OPENGL_GAL::DrawGrid(), GAL(), GetGridLineWidth(), and updatedGalDisplayOptions().
|
protected |
Minimum screen size of the grid (pixels) below which the grid is not drawn.
Definition at line 1146 of file graphics_abstraction_layer.h.
Referenced by computeMinGridSpacing(), GAL(), and updatedGalDisplayOptions().
|
protected |
The grid offset to compensate cursor position.
Definition at line 1140 of file graphics_abstraction_layer.h.
Referenced by GetGridPoint(), SetGridOrigin(), and SetGridSize().
|
protected |
The grid origin.
Definition at line 1139 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::OPENGL_GAL::DrawGrid(), GetGridOrigin(), SetGridOrigin(), and SetGridSize().
|
protected |
The grid size.
Definition at line 1138 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::OPENGL_GAL::DrawGrid(), GetGridPoint(), GetGridSize(), GetVisibleGridSize(), SetGridOrigin(), and SetGridSize().
|
protected |
Grid display style.
Definition at line 1137 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::OPENGL_GAL::DrawGrid(), GAL(), GetVisibleGridSize(), and updatedGalDisplayOptions().
|
protected |
Every tick line gets the double width.
Definition at line 1144 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::OPENGL_GAL::DrawGrid(), GetVisibleGridSize(), and SetCoarseGrid().
|
protected |
Should the grid be shown.
Definition at line 1136 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::OPENGL_GAL::DrawGrid(), GetGridSnapping(), GetGridVisibility(), and SetGridVisibility().
|
protected |
Is the cursor enabled?
Definition at line 1150 of file graphics_abstraction_layer.h.
Referenced by getCursorColor(), IsCursorEnabled(), and SetCursorEnabled().
|
protected |
Is filling of graphic objects enabled ?
Definition at line 1125 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawArc(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::drawCircle(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::DrawHoleWall(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::DrawRectangle(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), KIGFX::OPENGL_GAL::drawSegment(), KIGFX::OPENGL_GAL::drawSegmentChain(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::CAIRO_GAL_BASE::flushPath(), GetIsFill(), KIGFX::CAIRO_GAL_BASE::SetIsFill(), SetIsFill(), and KIGFX::CAIRO_GAL_BASE::storePath().
|
protected |
Are the outlines stroked ?
Definition at line 1126 of file graphics_abstraction_layer.h.
Referenced by KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::drawCircle(), KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::DrawRectangle(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::CAIRO_GAL_BASE::flushPath(), GetIsStroke(), KIGFX::CAIRO_GAL_BASE::SetIsStroke(), SetIsStroke(), and KIGFX::CAIRO_GAL_BASE::storePath().
|
protected |
The actual layer depth.
Definition at line 1132 of file graphics_abstraction_layer.h.
Referenced by AdvanceDepth(), KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::OPENGL_GAL::DrawBitmap(), KIGFX::OPENGL_GAL::drawCircle(), KIGFX::OPENGL_GAL::drawFilledSemiCircle(), KIGFX::OPENGL_GAL::DrawGlyph(), KIGFX::OPENGL_GAL::DrawGlyphs(), KIGFX::OPENGL_GAL::DrawHoleWall(), KIGFX::OPENGL_GAL::drawLineQuad(), KIGFX::OPENGL_GAL::DrawPolygon(), KIGFX::OPENGL_GAL::DrawPolygon(), KIGFX::OPENGL_GAL::DrawPolygon(), KIGFX::OPENGL_GAL::DrawRectangle(), KIGFX::OPENGL_GAL::drawStrokedSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), getLayerDepth(), and SetLayerDepth().
|
protected |
The line width.
Definition at line 1122 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL_BASE::CAIRO_GAL_BASE(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::drawCircle(), KIGFX::OPENGL_GAL::drawLineQuad(), KIGFX::OPENGL_GAL::drawStrokedSemiCircle(), GetLineWidth(), KIGFX::CAIRO_GAL_BASE::resetContext(), KIGFX::CAIRO_GAL_BASE::SetLineWidth(), SetLineWidth(), and KIGFX::CAIRO_GAL_BASE::syncLineWidth().
|
protected |
Point to be looked at in world space.
Definition at line 1111 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), ComputeWorldScreenMatrix(), KIGFX::OPENGL_GAL::ComputeWorldScreenMatrix(), GetLookAtPoint(), and SetLookAtPoint().
|
protected |
Minimum line width in pixels.
Definition at line 1123 of file graphics_abstraction_layer.h.
Referenced by GetMinLineWidth(), and SetMinLineWidth().
|
protected |
Definition at line 1104 of file graphics_abstraction_layer.h.
Referenced by GAL().
|
protected |
Definition at line 1103 of file graphics_abstraction_layer.h.
Referenced by GAL(), GetGridSnapping(), KIGFX::OPENGL_GAL::OPENGL_GAL(), KIGFX::CAIRO_GAL::setCompositor(), KIGFX::CAIRO_GAL::updatedGalDisplayOptions(), updatedGalDisplayOptions(), and KIGFX::OPENGL_GAL::updatedGalDisplayOptions().
|
protected |
Rotation transformation (radians)
Definition at line 1114 of file graphics_abstraction_layer.h.
Referenced by ComputeWorldScreenMatrix(), GetRotation(), and SetRotation().
|
protected |
The dots per inch of the screen.
Definition at line 1110 of file graphics_abstraction_layer.h.
Referenced by computeWorldScale(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), GetScreenDPI(), SetScreenDPI(), and KIGFX::CAIRO_PRINT_GAL::SetSheetSize().
|
protected |
Screen size in screen (wx logical) coordinates.
Definition at line 1107 of file graphics_abstraction_layer.h.
Referenced by KIGFX::CAIRO_GAL::allocateBitmaps(), KIGFX::OPENGL_GAL::BeginDrawing(), KIGFX::CAIRO_GAL_BASE::blitCursor(), KIGFX::OPENGL_GAL::blitCursor(), KIGFX::CAIRO_GAL::CAIRO_GAL(), KIGFX::CAIRO_GAL_BASE::ClearScreen(), ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL::EndDrawing(), GetScreenPixelSize(), KIGFX::OPENGL_GAL::getScreenPixelSize(), GetVisibleWorldExtents(), KIGFX::CAIRO_GAL::initSurface(), KIGFX::OPENGL_GAL::OPENGL_GAL(), KIGFX::CAIRO_GAL_BASE::ResizeScreen(), KIGFX::OPENGL_GAL::ResizeScreen(), KIGFX::CAIRO_GAL::setCompositor(), and SetScreenSize().
|
protected |
Screen transformation.
Definition at line 1116 of file graphics_abstraction_layer.h.
Referenced by KIGFX::OPENGL_GAL::blitCursor(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::DrawGrid(), KIGFX::OPENGL_GAL::DrawGrid(), GetScreenWorldMatrix(), and ToWorld().
|
protected |
The color of the outlines.
Definition at line 1129 of file graphics_abstraction_layer.h.
Referenced by KIGFX::OPENGL_GAL::BeginDrawing(), KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::drawCircle(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), KIGFX::OPENGL_GAL::drawSegment(), KIGFX::OPENGL_GAL::drawSegmentChain(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::CAIRO_GAL_BASE::flushPath(), GetStrokeColor(), KIGFX::CAIRO_GAL_BASE::SetStrokeColor(), SetStrokeColor(), and KIGFX::CAIRO_GAL_BASE::storePath().
|
protected |
The scale factor world->screen.
Definition at line 1117 of file graphics_abstraction_layer.h.
Referenced by KIGFX::OPENGL_GAL::blitCursor(), computeWorldScale(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), ComputeWorldScreenMatrix(), KIGFX::OPENGL_GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::DrawGrid(), GetVisibleGridSize(), and GetWorldScale().
|
protected |
World transformation.
Definition at line 1115 of file graphics_abstraction_layer.h.
Referenced by KIGFX::OPENGL_GAL::BeginDrawing(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), ComputeWorldScreenMatrix(), GetWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::resetContext(), SetWorldScreenMatrix(), and ToScreen().
|
protected |
The unit length of the world coordinates [inch].
Definition at line 1109 of file graphics_abstraction_layer.h.
Referenced by computeWorldScale(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::DrawBitmap(), KIGFX::OPENGL_GAL::DrawBitmap(), and SetWorldUnitLength().
|
protected |
The zoom factor.
Definition at line 1113 of file graphics_abstraction_layer.h.
Referenced by computeWorldScale(), KIGFX::CAIRO_PRINT_GAL::ComputeWorldScreenMatrix(), GetZoomFactor(), and SetZoomFactor().
|
staticprotected |
Definition at line 1061 of file graphics_abstraction_layer.h.
Referenced by GAL().
|
staticprotected |
Possible depth range.
Definition at line 1060 of file graphics_abstraction_layer.h.
Referenced by GAL().