![]() |
KiCad PCB EDA Suite
|
#include <cairo_gal.h>
Public Member Functions | |
CAIRO_GAL (GAL_DISPLAY_OPTIONS &aDisplayOptions, wxWindow *aParent, wxEvtHandler *aMouseListener=nullptr, wxEvtHandler *aPaintListener=nullptr, const wxString &aName=wxT("CairoCanvas")) | |
~CAIRO_GAL () | |
Return true if the GAL canvas is visible on the screen. More... | |
bool | IsVisible () const override |
Return true if the GAL canvas is visible on the screen. More... | |
void | ResizeScreen (int aWidth, int aHeight) override |
Resizes the canvas. More... | |
bool | Show (bool aShow) override |
Show/hide the GAL canvas. More... | |
int | BeginGroup () override |
Begin a group. More... | |
void | EndGroup () override |
End the group. More... | |
void | SetTarget (RENDER_TARGET aTarget) override |
Set the target for rendering. More... | |
RENDER_TARGET | GetTarget () const override |
Get the currently used target for rendering. More... | |
void | ClearTarget (RENDER_TARGET aTarget) override |
Clear the target for rendering. More... | |
void | StartDiffLayer () override |
Begins rendering of a differential layer. More... | |
void | EndDiffLayer () override |
Ends rendering of a differential layer. More... | |
void | StartNegativesLayer () override |
Begins rendering in a new layer that will be copied to the main layer in EndNegativesLayer(). More... | |
void | EndNegativesLayer () override |
Ends rendering of a negatives layer and draws it to the main layer. More... | |
void | PostPaint (wxPaintEvent &aEvent) |
Post an event to m_paint_listener. More... | |
void | SetMouseListener (wxEvtHandler *aMouseListener) |
void | SetPaintListener (wxEvtHandler *aPaintListener) |
bool | SetNativeCursorStyle (KICURSOR aCursor) override |
Set the cursor in the native panel. More... | |
void | BeginDrawing () override |
Start/end drawing functions, draw calls can be only made in between the calls to BeginDrawing()/EndDrawing(). More... | |
void | EndDrawing () override |
End the drawing, needs to be called for every new frame. More... | |
void | initSurface () |
Prepare Cairo surfaces for drawing. More... | |
void | deinitSurface () |
Destroy Cairo surfaces when are not needed anymore. More... | |
void | allocateBitmaps () |
Allocate the bitmaps for drawing. More... | |
void | deleteBitmaps () |
Allocate the bitmaps for drawing. More... | |
void | setCompositor () |
Prepare the compositor. More... | |
void | onPaint (wxPaintEvent &aEvent) |
Paint event handler. More... | |
void | skipMouseEvent (wxMouseEvent &aEvent) |
Mouse event handler, forwards the event to the child. More... | |
void | onSetNativeCursor (wxSetCursorEvent &aEvent) |
Give the correct cursor image when the native widget asks for it. More... | |
bool | updatedGalDisplayOptions (const GAL_DISPLAY_OPTIONS &aOptions) override |
Handle updating display options. More... | |
bool | IsCairoEngine () override |
Return true if the GAL engine is a Cairo based type. More... | |
void | DrawLine (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) override |
Draw a line. More... | |
void | DrawSegment (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth) override |
Draw a rounded segment. More... | |
void | DrawCircle (const VECTOR2D &aCenterPoint, double aRadius) override |
Draw a circle using world coordinates. More... | |
void | DrawArc (const VECTOR2D &aCenterPoint, double aRadius, double aStartAngle, double aEndAngle) override |
Draw an arc. More... | |
void | DrawArcSegment (const VECTOR2D &aCenterPoint, double aRadius, double aStartAngle, double aEndAngle, double aWidth, double aMaxError) override |
Draw an arc segment. More... | |
void | DrawRectangle (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) override |
Draw a rectangle. More... | |
void | DrawPolyline (const std::deque< VECTOR2D > &aPointList) override |
Draw a polyline. More... | |
void | DrawPolyline (const VECTOR2D aPointList[], int aListSize) override |
void | DrawPolyline (const SHAPE_LINE_CHAIN &aLineChain) override |
void | DrawPolygon (const std::deque< VECTOR2D > &aPointList) override |
Draw a polygon. More... | |
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 |
void | DrawCurve (const VECTOR2D &startPoint, const VECTOR2D &controlPointA, const VECTOR2D &controlPointB, const VECTOR2D &endPoint, double aFilterValue=0.0) override |
Draw a cubic bezier spline. More... | |
void | DrawBitmap (const BITMAP_BASE &aBitmap) override |
Draw a bitmap image. More... | |
void | Flush () override |
Force all remaining objects to be drawn. More... | |
void | ClearScreen () override |
Clear the screen. More... | |
void | SetIsFill (bool aIsFillEnabled) override |
Enable/disable fill. More... | |
void | SetIsStroke (bool aIsStrokeEnabled) override |
Enable/disable stroked outlines. More... | |
void | SetStrokeColor (const COLOR4D &aColor) override |
Set the stroke color. More... | |
void | SetFillColor (const COLOR4D &aColor) override |
Set the fill color. More... | |
void | SetLineWidth (float aLineWidth) override |
Set the line width. More... | |
void | SetLayerDepth (double aLayerDepth) override |
Set the depth of the layer (position on the z-axis) More... | |
void | Transform (const MATRIX3x3D &aTransformation) override |
Transform the context. More... | |
void | Rotate (double aAngle) override |
Rotate the context. More... | |
void | Translate (const VECTOR2D &aTranslation) override |
Translate the context. More... | |
void | Scale (const VECTOR2D &aScale) override |
Scale the context. More... | |
void | Save () override |
Save the context. More... | |
void | Restore () override |
Restore the context. More... | |
void | DrawGroup (int aGroupNumber) override |
Draw the stored group. More... | |
void | ChangeGroupColor (int aGroupNumber, const COLOR4D &aNewColor) override |
Change the color used to draw the group. More... | |
void | ChangeGroupDepth (int aGroupNumber, int aDepth) override |
Change the depth (Z-axis position) of the group. More... | |
void | DeleteGroup (int aGroupNumber) override |
Delete the group from the memory. More... | |
void | ClearCache () override |
Delete all data created during caching of graphic items. More... | |
void | SetNegativeDrawMode (bool aSetting) override |
Set negative draw mode in the renderer. More... | |
void | DrawCursor (const VECTOR2D &aCursorPosition) override |
Draw the cursor. More... | |
void | EnableDepthTest (bool aEnabled=false) override |
void | DrawGrid () override |
virtual bool | IsInitialized () const |
Return the initialization status for the canvas. More... | |
virtual bool | IsOpenGlEngine () |
Return true if the GAL engine is a OpenGL based type. More... | |
const VECTOR2I & | GetScreenPixelSize () const |
Return GAL canvas size in pixels. More... | |
void | SetClearColor (const COLOR4D &aColor) |
const COLOR4D & | GetClearColor () const |
const COLOR4D & | GetFillColor () const |
Get the fill color. More... | |
const COLOR4D & | GetStrokeColor () const |
Get the stroke color. More... | |
float | GetLineWidth () const |
Get the line width. More... | |
const STROKE_FONT & | GetStrokeFont () const |
virtual void | StrokeText (const wxString &aText, const VECTOR2D &aPosition, double aRotationAngle) |
Draw a vector type text using preloaded Newstroke font. More... | |
virtual void | BitmapText (const wxString &aText, const VECTOR2D &aPosition, double aRotationAngle) |
Draw a text using a bitmap font. More... | |
VECTOR2D | GetTextLineSize (const UTF8 &aText) const |
Compute the X and Y size of a given text. More... | |
virtual void | SetTextAttributes (const EDA_TEXT *aText) |
Loads attributes of the given text (bold/italic/underline/mirrored and so on). More... | |
void | ResetTextAttributes () |
Reset text attributes to default styling. More... | |
void | SetGlyphSize (const VECTOR2D &aSize) |
Set the font glyph size. More... | |
const VECTOR2D & | GetGlyphSize () const |
void | SetFontBold (bool aBold) |
Set bold property of current font. More... | |
bool | IsFontBold () const |
void | SetFontItalic (bool aItalic) |
Set italic property of current font. More... | |
bool | IsFontItalic () const |
void | SetFontUnderlined (bool aUnderlined) |
bool | IsFontUnderlined () const |
void | SetTextMirrored (bool aMirrored) |
Set a mirrored property of text. More... | |
bool | IsTextMirrored () const |
void | SetHorizontalJustify (const EDA_TEXT_HJUSTIFY_T aHorizontalJustify) |
Set the horizontal justify for text drawing. More... | |
EDA_TEXT_HJUSTIFY_T | GetHorizontalJustify () const |
Return current text horizontal justification setting. More... | |
void | SetVerticalJustify (const EDA_TEXT_VJUSTIFY_T aVerticalJustify) |
Set the vertical justify for text drawing. More... | |
EDA_TEXT_VJUSTIFY_T | GetVerticalJustify () const |
Returns current text vertical justification setting. More... | |
virtual void | ComputeWorldScreenMatrix () |
Compute the world <-> screen transformation matrix. More... | |
const MATRIX3x3D & | GetWorldScreenMatrix () const |
Get the world <-> screen transformation matrix. More... | |
const MATRIX3x3D & | GetScreenWorldMatrix () const |
Get the screen <-> world transformation matrix. More... | |
void | SetWorldScreenMatrix (const MATRIX3x3D &aMatrix) |
Set the world <-> screen transformation matrix. More... | |
BOX2D | GetVisibleWorldExtents () const |
void | SetWorldUnitLength (double aWorldUnitLength) |
Set the unit length. More... | |
void | SetScreenSize (const VECTOR2I &aSize) |
void | SetScreenDPI (double aScreenDPI) |
Set the dots per inch of the screen. More... | |
void | SetLookAtPoint (const VECTOR2D &aPoint) |
Set the Point in world space to look at. More... | |
const VECTOR2D & | GetLookAtPoint () const |
Get the look at point. More... | |
void | SetZoomFactor (double aZoomFactor) |
Set the zoom factor of the scene. More... | |
double | GetZoomFactor () const |
Get the zoom factor. More... | |
void | SetRotation (double aRotation) |
Set the rotation angle. More... | |
double | GetRotation () const |
Get the rotation angle. More... | |
void | SetDepthRange (const VECTOR2D &aDepthRange) |
Set the range of the layer depth. More... | |
double | GetMinDepth () const |
Return the minimum depth in the currently used range (the top). More... | |
double | GetMaxDepth () const |
Return the maximum depth in the currently used range (the bottom). More... | |
double | GetWorldScale () const |
Get the world scale. More... | |
void | SetFlip (bool xAxis, bool yAxis) |
Sets flipping of the screen. More... | |
bool | IsFlippedX () const |
Return true if flip flag for the X axis is set. More... | |
bool | IsFlippedY () const |
Return true if flip flag for the Y axis is set. More... | |
virtual bool | HasTarget (RENDER_TARGET aTarget) |
Return true if the target exists. More... | |
void | SetGridVisibility (bool aVisibility) |
Set the visibility setting of the grid. More... | |
bool | GetGridVisibility () const |
bool | GetGridSnapping () const |
void | SetGridOrigin (const VECTOR2D &aGridOrigin) |
Set the origin point for the grid. More... | |
const VECTOR2D & | GetGridOrigin () const |
void | SetGridSize (const VECTOR2D &aGridSize) |
Set the grid size. More... | |
const VECTOR2D & | GetGridSize () const |
Return the grid size. More... | |
void | SetGridColor (const COLOR4D &aGridColor) |
Set the grid color. More... | |
void | SetAxesColor (const COLOR4D &aAxesColor) |
Set the axes color. More... | |
void | SetAxesEnabled (bool aAxesEnabled) |
Enable drawing the axes. More... | |
void | SetCoarseGrid (int aInterval) |
Draw every tick line wider. More... | |
float | GetGridLineWidth () const |
Get the grid line width. More... | |
VECTOR2D | GetGridPoint (const VECTOR2D &aPoint) const |
For a given point it returns the nearest point belonging to the grid in world coordinates. More... | |
VECTOR2D | ToWorld (const VECTOR2D &aPoint) const |
Compute the point position in world coordinates from given screen coordinates. More... | |
VECTOR2D | ToScreen (const VECTOR2D &aPoint) const |
Compute the point position in screen coordinates from given world coordinates. More... | |
void | SetCursorEnabled (bool aCursorEnabled) |
Enable/disable cursor. More... | |
bool | IsCursorEnabled () const |
Return information about cursor visibility. More... | |
void | SetCursorColor (const COLOR4D &aCursorColor) |
Set the cursor color. More... | |
void | AdvanceDepth () |
Change the current depth to deeper, so it is possible to draw objects right beneath other. More... | |
void | PushDepth () |
Store current drawing depth on the depth stack. More... | |
void | PopDepth () |
Restore previously stored drawing depth for the depth stack. More... | |
virtual bool | IsContextLocked () |
Checks the state of the context lock. More... | |
virtual void | LockContext (int aClientCookie) |
Use GAL_CONTEXT_LOCKER RAII object unless you know what you're doing. More... | |
virtual void | UnlockContext (int aClientCookie) |
Protected Types | |
enum | GRAPHICS_COMMAND { CMD_SET_FILL, CMD_SET_STROKE, CMD_SET_FILLCOLOR, CMD_SET_STROKECOLOR, CMD_SET_LINE_WIDTH, CMD_STROKE_PATH, CMD_FILL_PATH, CMD_ROTATE, CMD_TRANSLATE, CMD_SCALE, CMD_SAVE, CMD_RESTORE, CMD_CALL_GROUP } |
Definitions for the command recorder. More... | |
typedef GAL | super |
Super class definition. More... | |
typedef std::deque< GROUP_ELEMENT > | GROUP |
A graphic group type definition. More... | |
Protected Member Functions | |
const double | xform (double x) |
const VECTOR2D | xform (double x, double y) |
const VECTOR2D | xform (const VECTOR2D &aP) |
const double | angle_xform (const double aAngle) |
Transform according to the rotation from m_currentWorld2Screen transform matrix. More... | |
void | arc_angles_xform_and_normalize (double &aStartAngle, double &aEndAngle) |
Transform according to the rotation from m_currentWorld2Screen transform matrix for the start angle and the end angle of an arc. More... | |
void | resetContext () |
void | drawGridLine (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) |
Draw a grid line (usually a simplified line function). More... | |
void | drawGridCross (const VECTOR2D &aPoint) |
void | drawGridPoint (const VECTOR2D &aPoint, double aWidth, double aHeight) |
void | drawAxes (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) |
void | flushPath () |
void | storePath () |
Store the actual path. More... | |
void | blitCursor (wxMemoryDC &clientDC) |
Blit cursor into the current screen. More... | |
void | drawPoly (const std::deque< VECTOR2D > &aPointList) |
Drawing polygons & polylines is the same in Cairo, so here is the common code. More... | |
void | drawPoly (const VECTOR2D aPointList[], int aListSize) |
void | drawPoly (const SHAPE_LINE_CHAIN &aLineChain) |
unsigned int | getNewGroupNumber () |
Return a valid key that can be used as a new group number. More... | |
void | syncLineWidth (bool aForceWidth=false, double aWidth=0.0) |
void | updateWorldScreenMatrix () |
const VECTOR2D | roundp (const VECTOR2D &v) |
virtual void | beginUpdate () |
Enable item update mode. More... | |
virtual void | endUpdate () |
Disable item update mode. More... | |
void | computeWorldScale () |
Compute the scaling factor for the world->screen matrix. More... | |
double | computeMinGridSpacing () const |
compute minimum grid spacing from the grid settings More... | |
COLOR4D | getCursorColor () const |
Get the actual cursor color to draw. More... | |
void | OnGalDisplayOptionsChanged (const GAL_DISPLAY_OPTIONS &aOptions) override |
Handler for observer settings changes. More... | |
Protected Attributes | |
std::shared_ptr< CAIRO_COMPOSITOR > | m_compositor |
Object for layers compositing. More... | |
unsigned int | m_mainBuffer |
Handle to the main buffer. More... | |
unsigned int | m_overlayBuffer |
Handle to the overlay buffer. More... | |
unsigned int | m_tempBuffer |
Handle to the temp buffer. More... | |
unsigned int | m_savedBuffer |
Handle to buffer to restore after rendering to temp buffer. More... | |
RENDER_TARGET | m_currentTarget |
Current rendering target. More... | |
bool | m_validCompositor |
Compositor initialization flag. More... | |
wxWindow * | m_parentWindow |
Parent window. More... | |
wxEvtHandler * | m_mouseListener |
Mouse listener. More... | |
wxEvtHandler * | m_paintListener |
Paint listener. More... | |
unsigned int | m_bufferSize |
Size of buffers cairoOutput, bitmapBuffers. More... | |
unsigned char * | m_wxOutput |
wxImage compatible buffer More... | |
unsigned char * | m_bitmapBuffer |
Storage of the Cairo image. More... | |
int | m_stride |
Stride value for Cairo. More... | |
int | m_wxBufferWidth |
bool | m_isInitialized |
Are Cairo image & surface ready to use. More... | |
COLOR4D | m_backgroundColor |
Background color. More... | |
wxCursor | m_currentwxCursor |
wxCursor showing the current native cursor More... | |
bool | m_isGrouping |
Is grouping enabled ? More... | |
bool | m_isElementAdded |
Was an graphic element added ? More... | |
std::map< int, GROUP > | m_groups |
List of graphic groups. More... | |
unsigned int | m_groupCounter |
Counter used for generating group keys. More... | |
GROUP * | m_currentGroup |
Currently used group. More... | |
double | m_lineWidthInPixels |
bool | m_lineWidthIsOdd |
cairo_matrix_t | m_cairoWorldScreenMatrix |
Cairo world to screen transform matrix. More... | |
cairo_matrix_t | m_currentXform |
cairo_matrix_t | m_currentWorld2Screen |
cairo_t * | m_currentContext |
Currently used Cairo context for drawing. More... | |
cairo_t * | m_context |
Cairo image. More... | |
cairo_surface_t * | m_surface |
Cairo surface. More... | |
std::vector< cairo_surface_t * > | m_imageSurfaces |
List of surfaces that were created by painting images, to be cleaned up later. More... | |
std::vector< cairo_matrix_t > | m_xformStack |
GAL_DISPLAY_OPTIONS & | m_options |
UTIL::LINK | m_observerLink |
std::stack< double > | m_depthStack |
Stored depth values. More... | |
VECTOR2I | m_screenSize |
Screen size in screen coordinates. More... | |
double | m_worldUnitLength |
The unit length of the world coordinates [inch]. More... | |
double | m_screenDPI |
The dots per inch of the screen. More... | |
VECTOR2D | m_lookAtPoint |
Point to be looked at in world space. More... | |
double | m_zoomFactor |
The zoom factor. More... | |
double | m_rotation |
Rotation transformation (radians) More... | |
MATRIX3x3D | m_worldScreenMatrix |
World transformation. More... | |
MATRIX3x3D | m_screenWorldMatrix |
Screen transformation. More... | |
double | m_worldScale |
The scale factor world->screen. More... | |
bool | m_globalFlipX |
Flag for X axis flipping. More... | |
bool | m_globalFlipY |
Flag for Y axis flipping. More... | |
float | m_lineWidth |
The line width. More... | |
bool | m_isFillEnabled |
Is filling of graphic objects enabled ? More... | |
bool | m_isStrokeEnabled |
Are the outlines stroked ? More... | |
COLOR4D | m_fillColor |
The fill color. More... | |
COLOR4D | m_strokeColor |
The color of the outlines. More... | |
COLOR4D | m_clearColor |
double | m_layerDepth |
The actual layer depth. More... | |
VECTOR2D | m_depthRange |
Range of the depth. More... | |
bool | m_gridVisibility |
Should the grid be shown. More... | |
GRID_STYLE | m_gridStyle |
Grid display style. More... | |
VECTOR2D | m_gridSize |
The grid size. More... | |
VECTOR2D | m_gridOrigin |
The grid origin. More... | |
VECTOR2D | m_gridOffset |
The grid offset to compensate cursor position. More... | |
COLOR4D | m_gridColor |
Color of the grid. More... | |
COLOR4D | m_axesColor |
Color of the axes. More... | |
bool | m_axesEnabled |
Should the axes be drawn. More... | |
int | m_gridTick |
Every tick line gets the double width. More... | |
float | m_gridLineWidth |
Line width of the grid. More... | |
int | m_gridMinSpacing |
Minimum screen size of the grid (pixels) below which the grid is not drawn. More... | |
bool | m_isCursorEnabled |
Is the cursor enabled? More... | |
bool | m_forceDisplayCursor |
Always show cursor. More... | |
COLOR4D | m_cursorColor |
Cursor color. More... | |
bool | m_fullscreenCursor |
Shape of the cursor (fullscreen or small cross) More... | |
VECTOR2D | m_cursorPosition |
Current cursor position (world coordinates) More... | |
STROKE_FONT | m_strokeFont |
Instance of object that stores information about how to draw texts. More... | |
KICURSOR | m_currentNativeCursor |
Current cursor. More... | |
Static Protected Attributes | |
static const int | MAX_CAIRO_ARGUMENTS = 4 |
Maximum number of arguments for one command. More... | |
static constexpr cairo_format_t | GAL_FORMAT = CAIRO_FORMAT_ARGB32 |
Format used to store pixels. More... | |
static const int | MIN_DEPTH = -1024 |
Possible depth range. More... | |
static const int | MAX_DEPTH = 1023 |
static const int | GRID_DEPTH = MAX_DEPTH - 1 |
Depth level on which the grid is drawn. More... | |
Definition at line 354 of file cairo_gal.h.
|
protectedinherited |
A graphic group type definition.
Definition at line 326 of file cairo_gal.h.
|
protectedinherited |
Super class definition.
Definition at line 290 of file cairo_gal.h.
|
protectedinherited |
Definitions for the command recorder.
Definition at line 296 of file cairo_gal.h.
CAIRO_GAL::CAIRO_GAL | ( | GAL_DISPLAY_OPTIONS & | aDisplayOptions, |
wxWindow * | aParent, | ||
wxEvtHandler * | aMouseListener = nullptr , |
||
wxEvtHandler * | aPaintListener = nullptr , |
||
const wxString & | aName = wxT( "CairoCanvas" ) |
||
) |
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 1260 of file cairo_gal.cpp.
References allocateBitmaps(), m_bitmapBuffer, m_isInitialized, m_mainBuffer, m_mouseListener, m_overlayBuffer, m_paintListener, m_parentWindow, m_savedBuffer, KIGFX::GAL::m_screenSize, m_tempBuffer, m_validCompositor, m_wxOutput, onPaint(), onSetNativeCursor(), SetTarget(), skipMouseEvent(), and KIGFX::TARGET_NONCACHED.
CAIRO_GAL::~CAIRO_GAL | ( | ) |
Return true if the GAL canvas is visible on the screen.
Definition at line 1314 of file cairo_gal.cpp.
References deleteBitmaps().
|
inlineinherited |
Change the current depth to deeper, so it is possible to draw objects right beneath other.
Definition at line 1056 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_layerDepth.
Referenced by KIGFX::VIEW_GROUP::ViewDraw().
void CAIRO_GAL::allocateBitmaps | ( | ) |
Allocate the bitmaps for drawing.
Definition at line 1509 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::GAL_FORMAT, m_bitmapBuffer, m_bufferSize, KIGFX::GAL::m_screenSize, m_stride, m_wxBufferWidth, m_wxOutput, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by CAIRO_GAL(), and ResizeScreen().
|
protectedinherited |
Transform according to the rotation from m_currentWorld2Screen transform matrix.
aAngle | is the angle in radians to transform. |
Definition at line 127 of file cairo_gal.cpp.
References KIGFX::GAL::IsFlippedX(), and KIGFX::CAIRO_GAL_BASE::m_currentWorld2Screen.
Referenced by KIGFX::CAIRO_GAL_BASE::arc_angles_xform_and_normalize().
|
protectedinherited |
Transform according to the rotation from m_currentWorld2Screen transform matrix for the start angle and the end angle of an arc.
aStartAngle | is the arc starting point in radians to transform |
aEndAngle | is the arc ending point in radians to transform |
Definition at line 141 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::angle_xform(), KIGFX::GAL::IsFlippedX(), and SWAP.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawArc(), and KIGFX::CAIRO_GAL_BASE::DrawArcSegment().
|
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::CAIRO_GAL_BASE.
Definition at line 1320 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::BeginDrawing(), initSurface(), m_compositor, KIGFX::CAIRO_GAL_BASE::m_context, m_mainBuffer, m_validCompositor, and setCompositor().
|
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::CAIRO_GAL_BASE.
Definition at line 1408 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::BeginGroup(), and initSurface().
|
inlineprotectedvirtualinherited |
Enable item update mode.
Private: use GAL_UPDATE_CONTEXT RAII object
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 1111 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL_UPDATE_CONTEXT::GAL_UPDATE_CONTEXT().
|
inlinevirtualinherited |
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. |
aRotationAngle | is the text rotation angle. |
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 361 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_globalFlipX, KIGFX::GAL::TEXT_PROPERTIES::m_glyphSize, KIGFX::GAL::m_lineWidth, KIGFX::GAL::TEXT_PROPERTIES::m_mirrored, KIGFX::GAL::StrokeText(), and KIGFX::GAL::textProperties.
Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), and KIGFX::VIEW_OVERLAY::COMMAND_BITMAP_TEXT::Execute().
|
protectedinherited |
Blit cursor into the current screen.
Definition at line 1155 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, color, KIGFX::COLOR4D::g, KIGFX::GAL::getCursorColor(), KIGFX::GAL::IsCursorEnabled(), KIGFX::GAL::m_cursorPosition, KIGFX::GAL::m_fullscreenCursor, KIGFX::COLOR4D::r, KIGFX::GAL::ToScreen(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by EndDrawing().
|
overridevirtualinherited |
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 885 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::CAIRO_GAL_BASE::CMD_SET_FILLCOLOR, KIGFX::CAIRO_GAL_BASE::CMD_SET_STROKECOLOR, KIGFX::COLOR4D::g, KIGFX::CAIRO_GAL_BASE::m_groups, KIGFX::COLOR4D::r, and KIGFX::CAIRO_GAL_BASE::storePath().
|
overridevirtualinherited |
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 902 of file cairo_gal.cpp.
|
overridevirtualinherited |
Delete all data created during caching of graphic items.
Reimplemented from KIGFX::GAL.
Definition at line 927 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::DeleteGroup(), and KIGFX::CAIRO_GAL_BASE::m_groups.
Referenced by KIGFX::CAIRO_GAL_BASE::~CAIRO_GAL_BASE().
|
overridevirtualinherited |
Clear the screen.
aColor | is the color used for clearing. |
Reimplemented from KIGFX::GAL.
Definition at line 555 of file cairo_gal.cpp.
References KIGFX::COLOR4D::b, KIGFX::COLOR4D::g, KIGFX::GAL::m_clearColor, KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::GAL::m_screenSize, KIGFX::COLOR4D::r, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by KIGFX::CAIRO_GAL_BASE::resetContext().
|
overridevirtual |
Clear the target for rendering.
aTarget | is the target to be cleared. |
Reimplemented from KIGFX::GAL.
Definition at line 1452 of file cairo_gal.cpp.
References KIGFX::COLOR4D::BLACK, m_compositor, m_mainBuffer, m_overlayBuffer, m_tempBuffer, KIGFX::TARGET_CACHED, KIGFX::TARGET_NONCACHED, KIGFX::TARGET_OVERLAY, and KIGFX::TARGET_TEMP.
Referenced by StartDiffLayer(), and StartNegativesLayer().
|
protectedinherited |
compute minimum grid spacing from the grid settings
Definition at line 237 of file graphics_abstraction_layer.cpp.
References KIGFX::GAL::m_gridMinSpacing.
Referenced by KIGFX::OPENGL_GAL::DrawGrid(), and KIGFX::CAIRO_GAL_BASE::DrawGrid().
|
inlineprotectedinherited |
Compute the scaling factor for the world->screen matrix.
Definition at line 1119 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_screenDPI, KIGFX::GAL::m_worldScale, KIGFX::GAL::m_worldUnitLength, and KIGFX::GAL::m_zoomFactor.
Referenced by KIGFX::OPENGL_GAL::ComputeWorldScreenMatrix(), KIGFX::GAL::ComputeWorldScreenMatrix(), and KIGFX::GAL::GAL().
|
virtualinherited |
Compute the world <-> screen transformation matrix.
Reimplemented in KIGFX::OPENGL_GAL, and KIGFX::CAIRO_PRINT_GAL.
Definition at line 192 of file graphics_abstraction_layer.cpp.
References KIGFX::GAL::computeWorldScale(), MATRIX3x3< T >::Inverse(), KIGFX::GAL::m_globalFlipX, KIGFX::GAL::m_globalFlipY, KIGFX::GAL::m_lookAtPoint, KIGFX::GAL::m_rotation, KIGFX::GAL::m_screenSize, KIGFX::GAL::m_screenWorldMatrix, KIGFX::GAL::m_worldScale, KIGFX::GAL::m_worldScreenMatrix, scale, MATRIX3x3< T >::SetIdentity(), MATRIX3x3< T >::SetRotation(), MATRIX3x3< T >::SetScale(), MATRIX3x3< T >::SetTranslation(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by KIGFX::OPENGL_GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::resetContext(), KIGFX::VIEW::SetCenter(), and KIGFX::VIEW::SetScale().
void CAIRO_GAL::deinitSurface | ( | ) |
Destroy Cairo surfaces when are not needed anymore.
Definition at line 1495 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::m_context, m_isInitialized, and KIGFX::CAIRO_GAL_BASE::m_surface.
Referenced by EndDrawing(), EndGroup(), and updatedGalDisplayOptions().
void CAIRO_GAL::deleteBitmaps | ( | ) |
Allocate the bitmaps for drawing.
Definition at line 1528 of file cairo_gal.cpp.
References m_bitmapBuffer, and m_wxOutput.
Referenced by ResizeScreen(), and ~CAIRO_GAL().
|
overridevirtualinherited |
Delete the group from the memory.
aGroupNumber | is the group number. |
Reimplemented from KIGFX::GAL.
Definition at line 909 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::CMD_FILL_PATH, KIGFX::CAIRO_GAL_BASE::CMD_STROKE_PATH, KIGFX::CAIRO_GAL_BASE::m_groups, and KIGFX::CAIRO_GAL_BASE::storePath().
Referenced by KIGFX::CAIRO_GAL_BASE::ClearCache().
|
overridevirtualinherited |
Draw an arc.
aCenterPoint | is the center point of the arc. |
aRadius | is the arc radius. |
aStartAngle | is the start angle of the arc. |
aEndAngle | is the end angle of the arc. |
Reimplemented from KIGFX::GAL.
Definition at line 318 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::arc_angles_xform_and_normalize(), KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::GAL::m_isFillEnabled, KIGFX::CAIRO_GAL_BASE::m_lineWidthInPixels, KIGFX::CAIRO_GAL_BASE::m_lineWidthIsOdd, r, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), and KIGFX::CAIRO_GAL_BASE::xform().
Referenced by KIGFX::CAIRO_GAL_BASE::DrawArcSegment().
|
overridevirtualinherited |
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. |
aEndAngle | is the end 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. Note: aMaxError is not used in Cairo, because Cairo can draw true arcs |
Reimplemented from KIGFX::GAL.
Definition at line 354 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::CAIRO_GAL_BASE::arc_angles_xform_and_normalize(), KIGFX::COLOR4D::b, KIGFX::CAIRO_GAL_BASE::DrawArc(), KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::COLOR4D::g, KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_isStrokeEnabled, KIGFX::GAL::m_lineWidth, KIGFX::CAIRO_GAL_BASE::m_lineWidthIsOdd, KIGFX::GAL::m_strokeColor, r, KIGFX::COLOR4D::r, VECTOR2< T >::Rotate(), KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
|
protectedinherited |
Definition at line 1009 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::COLOR4D::g, KIGFX::GAL::m_axesColor, KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::COLOR4D::r, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid().
|
overridevirtualinherited |
Draw a bitmap image.
Reimplemented from KIGFX::GAL.
Definition at line 475 of file cairo_gal.cpp.
References BITMAP_BASE::GetImageData(), BITMAP_BASE::GetPPI(), BITMAP_BASE::GetSizePixels(), image, KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::CAIRO_GAL_BASE::m_currentWorld2Screen, KIGFX::CAIRO_GAL_BASE::m_imageSurfaces, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::GAL::m_worldUnitLength, and scale.
|
overridevirtualinherited |
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 302 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::CAIRO_GAL_BASE::m_lineWidthInPixels, r, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
|
overridevirtualinherited |
Draw the cursor.
aCursorPosition | is the cursor position in screen coordinates. |
Reimplemented from KIGFX::GAL.
Definition at line 966 of file cairo_gal.cpp.
References KIGFX::GAL::m_cursorPosition.
|
overridevirtualinherited |
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 453 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
|
overridevirtualinherited |
Reimplemented from KIGFX::GAL.
Definition at line 1613 of file cairo_gal.cpp.
References KIGFX::GAL::computeMinGridSpacing(), KIGFX::DOTS, KIGFX::CAIRO_GAL_BASE::drawAxes(), KIGFX::CAIRO_GAL_BASE::drawGridCross(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), KIGFX::CAIRO_GAL_BASE::drawGridPoint(), KiROUND(), KIGFX::LINES, KIGFX::GAL::m_axesEnabled, KIGFX::GAL::m_depthRange, KIGFX::GAL::m_gridLineWidth, KIGFX::GAL::m_gridOrigin, KIGFX::GAL::m_gridSize, KIGFX::GAL::m_gridStyle, KIGFX::GAL::m_gridTick, KIGFX::GAL::m_gridVisibility, KIGFX::GAL::m_isStrokeEnabled, KIGFX::CAIRO_GAL_BASE::m_lineWidthIsOdd, KIGFX::GAL::m_screenSize, KIGFX::GAL::m_screenWorldMatrix, KIGFX::GAL::m_worldScale, KIGFX::CAIRO_GAL_BASE::SetLayerDepth(), KIGFX::CAIRO_GAL_BASE::SetLineWidth(), KIGFX::GAL::SetTarget(), KIGFX::SMALL_CROSS, SWAP, KIGFX::TARGET_NONCACHED, VECTOR2< T >::x, and VECTOR2< T >::y.
|
protectedinherited |
Definition at line 1041 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::COLOR4D::g, KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::GAL::m_gridColor, KIGFX::CAIRO_GAL_BASE::m_lineWidthInPixels, KIGFX::COLOR4D::r, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid().
|
protectedinherited |
Draw a grid line (usually a simplified line function).
aStartPoint | is the start point of the line. |
aEndPoint | is the end point of the line. |
Definition at line 1027 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::COLOR4D::g, KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::GAL::m_gridColor, KIGFX::COLOR4D::r, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid().
|
protectedinherited |
Definition at line 1062 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::COLOR4D::g, KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::GAL::m_gridColor, KIGFX::COLOR4D::r, KIGFX::CAIRO_GAL_BASE::roundp(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid().
|
overridevirtualinherited |
Draw the stored group.
aGroupNumber | is the group number. |
Reimplemented from KIGFX::GAL.
Definition at line 792 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::CAIRO_GAL_BASE::CMD_CALL_GROUP, KIGFX::CAIRO_GAL_BASE::CMD_FILL_PATH, KIGFX::CAIRO_GAL_BASE::CMD_RESTORE, KIGFX::CAIRO_GAL_BASE::CMD_ROTATE, KIGFX::CAIRO_GAL_BASE::CMD_SAVE, KIGFX::CAIRO_GAL_BASE::CMD_SCALE, KIGFX::CAIRO_GAL_BASE::CMD_SET_FILL, KIGFX::CAIRO_GAL_BASE::CMD_SET_FILLCOLOR, KIGFX::CAIRO_GAL_BASE::CMD_SET_LINE_WIDTH, KIGFX::CAIRO_GAL_BASE::CMD_SET_STROKE, KIGFX::CAIRO_GAL_BASE::CMD_SET_STROKECOLOR, KIGFX::CAIRO_GAL_BASE::CMD_STROKE_PATH, KIGFX::CAIRO_GAL_BASE::CMD_TRANSLATE, KIGFX::COLOR4D::g, KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::GAL::m_fillColor, KIGFX::CAIRO_GAL_BASE::m_groups, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_isStrokeEnabled, KIGFX::GAL::m_strokeColor, KIGFX::COLOR4D::r, and KIGFX::CAIRO_GAL_BASE::storePath().
|
overridevirtualinherited |
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 198 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
|
protectedinherited |
Drawing polygons & polylines is the same in Cairo, so here is the common code.
Definition at line 1172 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawPolygon(), and KIGFX::CAIRO_GAL_BASE::DrawPolyline().
|
protectedinherited |
Definition at line 1197 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
|
protectedinherited |
Definition at line 1221 of file cairo_gal.cpp.
References SHAPE_LINE_CHAIN::CPoint(), KIGFX::CAIRO_GAL_BASE::flushPath(), SHAPE_LINE_CHAIN::IsClosed(), KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, SHAPE_LINE_CHAIN::PointCount(), KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
|
inlineoverridevirtualinherited |
Draw a polygon.
aPointList | is the list of the polygon points. |
Reimplemented from KIGFX::GAL.
Definition at line 103 of file cairo_gal.h.
References KIGFX::CAIRO_GAL_BASE::drawPoly().
|
inlineoverridevirtualinherited |
Reimplemented from KIGFX::GAL.
Definition at line 104 of file cairo_gal.h.
References KIGFX::CAIRO_GAL_BASE::drawPoly().
|
overridevirtualinherited |
Reimplemented from KIGFX::GAL.
Definition at line 440 of file cairo_gal.cpp.
References SHAPE_POLY_SET::COutline(), KIGFX::CAIRO_GAL_BASE::drawPoly(), and SHAPE_POLY_SET::OutlineCount().
|
overridevirtualinherited |
Reimplemented from KIGFX::GAL.
Definition at line 447 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::drawPoly().
|
inlineoverridevirtualinherited |
Draw a polyline.
aPointList | is a list of 2D-Vectors containing the polyline points. |
Reimplemented from KIGFX::GAL.
Definition at line 94 of file cairo_gal.h.
References KIGFX::CAIRO_GAL_BASE::drawPoly().
|
inlineoverridevirtualinherited |
Reimplemented from KIGFX::GAL.
Definition at line 95 of file cairo_gal.h.
References KIGFX::CAIRO_GAL_BASE::drawPoly().
|
inlineoverridevirtualinherited |
Reimplemented from KIGFX::GAL.
Definition at line 100 of file cairo_gal.h.
References KIGFX::CAIRO_GAL_BASE::drawPoly().
|
overridevirtualinherited |
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 418 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
|
overridevirtualinherited |
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 236 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, EuclideanNorm(), KIGFX::CAIRO_GAL_BASE::flushPath(), KIGFX::COLOR4D::g, KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::GAL::m_fillColor, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_strokeColor, KIGFX::COLOR4D::r, KIGFX::CAIRO_GAL_BASE::roundp(), KIGFX::CAIRO_GAL_BASE::SetLineWidth(), KIGFX::CAIRO_GAL_BASE::syncLineWidth(), VECTOR2< T >::x, KIGFX::CAIRO_GAL_BASE::xform(), and VECTOR2< T >::y.
|
overridevirtualinherited |
|
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 947 of file cairo_gal.cpp.
References m_compositor, 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.
Reimplemented from KIGFX::CAIRO_GAL_BASE.
Definition at line 1334 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::blitCursor(), deinitSurface(), KIGFX::CAIRO_GAL_BASE::EndDrawing(), m_bitmapBuffer, m_compositor, m_mainBuffer, m_overlayBuffer, KIGFX::GAL::m_screenSize, m_wxBufferWidth, m_wxOutput, VECTOR2< T >::x, and VECTOR2< T >::y.
|
overridevirtual |
End the group.
Reimplemented from KIGFX::CAIRO_GAL_BASE.
Definition at line 1415 of file cairo_gal.cpp.
References deinitSurface(), and KIGFX::CAIRO_GAL_BASE::EndGroup().
|
overridevirtual |
Ends rendering of a negatives layer and draws it to the main layer.
No-op in OpenGL.
Reimplemented from KIGFX::GAL.
Definition at line 960 of file cairo_gal.cpp.
References m_compositor, m_mainBuffer, and m_tempBuffer.
|
inlineprotectedvirtualinherited |
Disable item update mode.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 1114 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL_UPDATE_CONTEXT::~GAL_UPDATE_CONTEXT().
|
overridevirtualinherited |
Force all remaining objects to be drawn.
Reimplemented from KIGFX::GAL.
Definition at line 549 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::storePath().
Referenced by KIGFX::CAIRO_GAL_BASE::EndDrawing().
|
protectedinherited |
Definition at line 1078 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::COLOR4D::g, KIGFX::CAIRO_GAL_BASE::m_currentContext, KIGFX::GAL::m_fillColor, KIGFX::GAL::m_isFillEnabled, KIGFX::GAL::m_isStrokeEnabled, KIGFX::CAIRO_GAL_BASE::m_lineWidthInPixels, KIGFX::GAL::m_strokeColor, and KIGFX::COLOR4D::r.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::CAIRO_GAL_BASE::DrawCircle(), KIGFX::CAIRO_GAL_BASE::DrawCurve(), KIGFX::CAIRO_GAL_BASE::DrawLine(), KIGFX::CAIRO_GAL_BASE::drawPoly(), KIGFX::CAIRO_GAL_BASE::DrawRectangle(), and KIGFX::CAIRO_GAL_BASE::DrawSegment().
|
inlineinherited |
Definition at line 222 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_clearColor.
Referenced by EDIT_POINTS::ViewDraw().
|
protectedinherited |
Get the actual cursor color to draw.
Definition at line 267 of file graphics_abstraction_layer.cpp.
References color, KIGFX::GAL::m_cursorColor, and KIGFX::GAL::m_isCursorEnabled.
Referenced by KIGFX::CAIRO_GAL_BASE::blitCursor(), and KIGFX::OPENGL_GAL::blitCursor().
|
inlineinherited |
Get the fill color.
Definition at line 273 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_fillColor.
|
inlineinherited |
Definition at line 416 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_glyphSize, and KIGFX::GAL::textProperties.
Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::SCH_PAINTER::boxText(), KIGFX::STROKE_FONT::computeOverbarVerticalPosition(), KIGFX::STROKE_FONT::computeTextLineSize(), KIGFX::STROKE_FONT::computeUnderlineVerticalPosition(), KIGFX::STROKE_FONT::Draw(), KIGFX::STROKE_FONT::drawSingleLineText(), and KIGFX::PREVIEW::SetConstantGlyphHeight().
|
inlineinherited |
Get the grid line width.
Definition at line 969 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_gridLineWidth.
|
inlineinherited |
Definition at line 894 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_gridOrigin.
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 245 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 921 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_gridSize.
Referenced by COMMON_TOOLS::CursorControl(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), GERBVIEW_FRAME::DisplayGridMsg(), PCB_BASE_FRAME::DisplayGridMsg(), GRID_HELPER::GetGrid(), EDA_DRAW_FRAME::GetNearestGridPosition(), EDA_DRAW_FRAME::GetNearestHalfGridPosition(), COMMON_TOOLS::PanControl(), and EDA_DRAW_PANEL_GAL::SwitchBackend().
|
inlineinherited |
Definition at line 868 of file graphics_abstraction_layer.h.
References KIGFX::ALWAYS, KIGFX::GAL_DISPLAY_OPTIONS::m_gridSnapping, KIGFX::GAL::m_gridVisibility, KIGFX::GAL::m_options, and KIGFX::WITH_GRID.
Referenced by GRID_HELPER::canUseGrid(), KIGFX::WX_VIEW_CONTROLS::GetRawCursorPosition(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), PCB_VIEWER_TOOLS::MeasureTool(), PNS::TOOL_BASE::updateEndItem(), and PNS::TOOL_BASE::updateStartItem().
|
inlineinherited |
Definition at line 866 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_gridVisibility.
Referenced by EDA_DRAW_PANEL_GAL::SwitchBackend().
|
inlineinherited |
Return current text horizontal justification setting.
Definition at line 458 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_horizontalJustify, and KIGFX::GAL::textProperties.
Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::SCH_PAINTER::boxText(), and KIGFX::STROKE_FONT::drawSingleLineText().
|
inlineinherited |
Get the line width.
Definition at line 313 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_lineWidth.
Referenced by KIGFX::SCH_PAINTER::boxText(), KIGFX::STROKE_FONT::computeTextLineSize(), KIGFX::STROKE_FONT::Draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::STROKE_FONT::drawSingleLineText(), and KIGFX::PREVIEW::DrawTextNextToCursor().
|
inlineinherited |
Get the look at point.
Definition at line 663 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_lookAtPoint.
Referenced by KIGFX::GAL::GetVisibleWorldExtents().
|
inlineinherited |
Return the maximum depth in the currently used range (the bottom).
Definition at line 732 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_depthRange, and VECTOR2< T >::y.
|
inlineinherited |
Return the minimum depth in the currently used range (the top).
Definition at line 724 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_depthRange, and VECTOR2< T >::x.
Referenced by KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), and EDIT_POINTS::ViewDraw().
|
protectedinherited |
Return a valid key that can be used as a new group number.
Definition at line 1248 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::m_groupCounter, and KIGFX::CAIRO_GAL_BASE::m_groups.
Referenced by KIGFX::CAIRO_GAL_BASE::BeginGroup().
|
inlineinherited |
Get the rotation angle.
Definition at line 703 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_rotation.
|
inlineinherited |
Return GAL canvas size in pixels.
Definition at line 209 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_screenSize.
Referenced by KIGFX::WX_VIEW_CONTROLS::CenterOnCursor(), KIGFX::VIEW::GetScreenPixelSize(), KIGFX::VIEW::GetViewport(), EDA_DRAW_PANEL_GAL::onSize(), KIGFX::VIEW::Redraw(), KIGFX::VIEW::SetCenter(), KIGFX::WX_VIEW_CONTROLS::SetCrossHairCursorPosition(), KIGFX::VIEW::SetViewport(), and KIGFX::WX_VIEW_CONTROLS::WarpCursor().
|
inlineinherited |
Get the screen <-> world transformation matrix.
Definition at line 594 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_screenWorldMatrix.
Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::getShadowWidth(), KIGFX::GAL::GetVisibleWorldExtents(), KIGFX::OPENGL_GAL::getWorldPixelSize(), screenSpaceCircle(), screenSpaceLine(), and KIGFX::VIEW::ToWorld().
|
inlineinherited |
Get the stroke color.
Definition at line 293 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_strokeColor.
Referenced by KIGFX::PREVIEW::DrawTextNextToCursor(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
|
inlineinherited |
Definition at line 335 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_strokeFont.
Referenced by KIGFX::SCH_PAINTER::boxText(), and EDA_TEXT::GetTextBox().
|
overridevirtual |
Get the currently used target for rendering.
Reimplemented from KIGFX::GAL.
Definition at line 1446 of file cairo_gal.cpp.
References m_currentTarget.
Compute the X and Y size of a given text.
The text is expected to be a only one line text.
aText | is the text string (one line). |
Definition at line 183 of file graphics_abstraction_layer.cpp.
References KIGFX::STROKE_FONT::computeTextLineSize(), and KIGFX::GAL::m_strokeFont.
Referenced by LABEL_MANAGER::Add(), GraphicTextWidth(), and EDA_TEXT::LenSize().
|
inlineinherited |
Returns current text vertical justification setting.
Definition at line 476 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_verticalJustify, and KIGFX::GAL::textProperties.
Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::SCH_PAINTER::boxText(), and KIGFX::STROKE_FONT::Draw().
|
inherited |
Definition at line 222 of file graphics_abstraction_layer.cpp.
References KIGFX::GAL::GetLookAtPoint(), MATRIX3x3< T >::GetScale(), KIGFX::GAL::GetScreenWorldMatrix(), KIGFX::GAL::m_screenSize, BOX2< Vec >::SetOrigin(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ROUTER_TOOL::handleCommonEvents(), and ROUTER_TOOL::InlineDrag().
|
inlineinherited |
Get the world scale.
Definition at line 742 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_worldScale.
Referenced by PCB_GRID_HELPER::BestDragOrigin(), EE_GRID_HELPER::BestDragOrigin(), PCB_GRID_HELPER::BestSnapAnchor(), KIGFX::PCB_PAINTER::draw(), KIGFX::PREVIEW::DrawTextNextToCursor(), drawTicksAlongLine(), KIGFX::PREVIEW::SetConstantGlyphHeight(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
|
inlineinherited |
Get the world <-> screen transformation matrix.
Definition at line 584 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_worldScreenMatrix.
Referenced by KIGFX::VIEW::ToScreen().
|
inlineinherited |
Get the zoom factor.
Definition at line 683 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_zoomFactor.
Referenced by COMMON_TOOLS::doZoomInOut(), KIGFX::PCB_PAINTER::draw(), EDA_DRAW_FRAME::GetZoomLevelIndicator(), ZOOM_MENU::update(), and EDA_DRAW_FRAME::UpdateZoomSelectBox().
|
inlinevirtualinherited |
Return true if the target exists.
aTarget | is the target to be checked. |
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 805 of file graphics_abstraction_layer.h.
Referenced by EDA_DRAW_PANEL_GAL::DoRePaint().
void CAIRO_GAL::initSurface | ( | ) |
Prepare Cairo surfaces for drawing.
Definition at line 1474 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::GAL_FORMAT, m_bitmapBuffer, KIGFX::CAIRO_GAL_BASE::m_context, KIGFX::CAIRO_GAL_BASE::m_currentContext, m_isInitialized, KIGFX::GAL::m_screenSize, m_stride, KIGFX::CAIRO_GAL_BASE::m_surface, m_wxBufferWidth, and VECTOR2< T >::y.
Referenced by BeginDrawing(), and BeginGroup().
|
inlineoverridevirtualinherited |
Return true if the GAL engine is a Cairo based type.
Reimplemented from KIGFX::GAL.
Definition at line 64 of file cairo_gal.h.
|
inlinevirtualinherited |
Checks the state of the context lock.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 1084 of file graphics_abstraction_layer.h.
Referenced by EDA_DRAW_PANEL_GAL::onSize().
|
inlineinherited |
Return information about cursor visibility.
Definition at line 1030 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_forceDisplayCursor, and KIGFX::GAL::m_isCursorEnabled.
Referenced by KIGFX::CAIRO_GAL_BASE::blitCursor(), and KIGFX::OPENGL_GAL::blitCursor().
|
inlineinherited |
Return true if flip flag for the X axis is set.
Definition at line 762 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_globalFlipX.
Referenced by KIGFX::CAIRO_GAL_BASE::angle_xform(), KIGFX::CAIRO_GAL_BASE::arc_angles_xform_and_normalize(), KIGFX::PCB_PAINTER::draw(), KIGFX::PREVIEW::DrawTextNextToCursor(), and DS_PROXY_VIEW_ITEM::ViewDraw().
|
inlineinherited |
Return true if flip flag for the Y axis is set.
Definition at line 770 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_globalFlipY.
|
inlineinherited |
Definition at line 424 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_bold, and KIGFX::GAL::textProperties.
Referenced by KIGFX::STROKE_FONT::Draw().
|
inlineinherited |
Definition at line 432 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_italic, and KIGFX::GAL::textProperties.
Referenced by KIGFX::STROKE_FONT::ComputeStringBoundaryLimits(), and KIGFX::STROKE_FONT::drawSingleLineText().
|
inlineinherited |
Definition at line 435 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_underlined, and KIGFX::GAL::textProperties.
Referenced by KIGFX::STROKE_FONT::drawSingleLineText().
|
inlinevirtualinherited |
Return the initialization status for the canvas.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 74 of file graphics_abstraction_layer.h.
Referenced by SCH_DRAW_PANEL::onPaint(), and EDA_DRAW_PANEL_GAL::onRefreshTimer().
|
inlinevirtualinherited |
Return true if the GAL engine is a OpenGL based type.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 83 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GERBVIEW_PAINTER::draw(), and KIGFX::PCB_PAINTER::draw().
|
inlineinherited |
Definition at line 443 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_mirrored, and KIGFX::GAL::textProperties.
Referenced by KIGFX::OPENGL_GAL::BitmapText(), and KIGFX::STROKE_FONT::drawSingleLineText().
|
inlineoverridevirtual |
Return true if the GAL canvas is visible on the screen.
Reimplemented from KIGFX::GAL.
Definition at line 375 of file cairo_gal.h.
|
inlinevirtualinherited |
Use GAL_CONTEXT_LOCKER RAII object unless you know what you're doing.
Reimplemented in KIGFX::OPENGL_GAL.
Definition at line 1091 of file graphics_abstraction_layer.h.
Referenced by KIGFX::GAL_CONTEXT_LOCKER::GAL_CONTEXT_LOCKER().
|
overrideprotectedvirtualinherited |
Handler for observer settings changes.
Implements KIGFX::GAL_DISPLAY_OPTIONS_OBSERVER.
Definition at line 101 of file graphics_abstraction_layer.cpp.
References KIGFX::GAL::updatedGalDisplayOptions().
void CAIRO_GAL::onPaint | ( | wxPaintEvent & | aEvent | ) |
Paint event handler.
aEvent | is the paint event. |
Definition at line 1554 of file cairo_gal.cpp.
References PostPaint().
Referenced by CAIRO_GAL().
void CAIRO_GAL::onSetNativeCursor | ( | wxSetCursorEvent & | aEvent | ) |
Give the correct cursor image when the native widget asks for it.
aEvent | is the cursor event to plac the cursor into.Cairo-specific update handlers |
Definition at line 1607 of file cairo_gal.cpp.
References m_currentwxCursor.
Referenced by CAIRO_GAL().
|
inlineinherited |
Restore previously stored drawing depth for the depth stack.
Definition at line 1072 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_depthStack, and KIGFX::GAL::m_layerDepth.
Referenced by KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::VIEW_GROUP::ViewDraw(), and EDIT_POINTS::ViewDraw().
void CAIRO_GAL::PostPaint | ( | wxPaintEvent & | aEvent | ) |
Post 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 1372 of file cairo_gal.cpp.
References m_paintListener.
Referenced by onPaint().
|
inlineinherited |
Store current drawing depth on the depth stack.
Definition at line 1064 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_depthStack, and KIGFX::GAL::m_layerDepth.
Referenced by KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::VIEW_GROUP::ViewDraw(), and EDIT_POINTS::ViewDraw().
|
protectedinherited |
Definition at line 977 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::ClearScreen(), KIGFX::GAL::ComputeWorldScreenMatrix(), KIGFX::CAIRO_GAL_BASE::m_cairoWorldScreenMatrix, KIGFX::CAIRO_GAL_BASE::m_context, KIGFX::CAIRO_GAL_BASE::m_currentXform, MATRIX3x3< T >::m_data, KIGFX::CAIRO_GAL_BASE::m_imageSurfaces, KIGFX::CAIRO_GAL_BASE::m_isElementAdded, KIGFX::GAL::m_lineWidth, KIGFX::GAL::m_worldScreenMatrix, and KIGFX::CAIRO_GAL_BASE::updateWorldScreenMatrix().
Referenced by KIGFX::CAIRO_GAL_BASE::BeginDrawing(), and KIGFX::CAIRO_PRINT_GAL::CAIRO_PRINT_GAL().
|
inherited |
Reset text attributes to default styling.
Normally, custom attributes will be set individually after this, otherwise you can use SetTextAttributes()
Definition at line 167 of file graphics_abstraction_layer.cpp.
References GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_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::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::ARC_ASSISTANT::ViewDraw(), and KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewDraw().
|
overridevirtual |
Resizes the canvas.
Reimplemented from KIGFX::CAIRO_GAL_BASE.
Definition at line 1380 of file cairo_gal.cpp.
References allocateBitmaps(), deleteBitmaps(), m_compositor, m_validCompositor, and KIGFX::CAIRO_GAL_BASE::ResizeScreen().
|
overridevirtualinherited |
Restore the context.
Reimplemented from KIGFX::GAL.
Definition at line 747 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::CMD_RESTORE, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Command, KIGFX::CAIRO_GAL_BASE::m_currentGroup, KIGFX::CAIRO_GAL_BASE::m_currentXform, KIGFX::CAIRO_GAL_BASE::m_isGrouping, KIGFX::CAIRO_GAL_BASE::m_xformStack, KIGFX::CAIRO_GAL_BASE::storePath(), and KIGFX::CAIRO_GAL_BASE::updateWorldScreenMatrix().
|
overridevirtualinherited |
Rotate the context.
aAngle | is the rotation angle in radians. |
Reimplemented from KIGFX::GAL.
Definition at line 670 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::CMD_ROTATE, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::DblArg, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Argument, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Command, KIGFX::CAIRO_GAL_BASE::m_currentGroup, KIGFX::CAIRO_GAL_BASE::m_currentXform, KIGFX::CAIRO_GAL_BASE::m_isGrouping, KIGFX::CAIRO_GAL_BASE::storePath(), and KIGFX::CAIRO_GAL_BASE::updateWorldScreenMatrix().
Definition at line 189 of file cairo_gal.cpp.
References KIGFX::GAL::m_isStrokeEnabled, KIGFX::CAIRO_GAL_BASE::m_lineWidthIsOdd, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by KIGFX::CAIRO_GAL_BASE::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::CAIRO_GAL_BASE::drawAxes(), KIGFX::CAIRO_GAL_BASE::DrawCircle(), KIGFX::CAIRO_GAL_BASE::DrawCurve(), KIGFX::CAIRO_GAL_BASE::drawGridCross(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), KIGFX::CAIRO_GAL_BASE::drawGridPoint(), KIGFX::CAIRO_GAL_BASE::DrawLine(), KIGFX::CAIRO_GAL_BASE::drawPoly(), KIGFX::CAIRO_GAL_BASE::DrawRectangle(), and KIGFX::CAIRO_GAL_BASE::DrawSegment().
|
overridevirtualinherited |
Save the context.
Reimplemented from KIGFX::GAL.
Definition at line 729 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::CMD_SAVE, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Command, KIGFX::CAIRO_GAL_BASE::m_currentGroup, KIGFX::CAIRO_GAL_BASE::m_currentXform, KIGFX::CAIRO_GAL_BASE::m_isGrouping, KIGFX::CAIRO_GAL_BASE::m_xformStack, KIGFX::CAIRO_GAL_BASE::storePath(), and KIGFX::CAIRO_GAL_BASE::updateWorldScreenMatrix().
|
overridevirtualinherited |
Scale the context.
aScale | is the scale factor for the x- and y-axis. |
Reimplemented from KIGFX::GAL.
Definition at line 709 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::CMD_SCALE, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::DblArg, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Argument, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Command, KIGFX::CAIRO_GAL_BASE::m_currentGroup, KIGFX::CAIRO_GAL_BASE::m_currentXform, KIGFX::CAIRO_GAL_BASE::m_isGrouping, KIGFX::CAIRO_GAL_BASE::storePath(), KIGFX::CAIRO_GAL_BASE::updateWorldScreenMatrix(), 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 941 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_axesColor.
Referenced by KIGFX::CAIRO_GAL_BASE::CAIRO_GAL_BASE(), SYMBOL_VIEWER_FRAME::CommonSettingsChanged(), SYMBOL_EDIT_FRAME::CommonSettingsChanged(), KIGFX::OPENGL_GAL::OPENGL_GAL(), SYMBOL_EDIT_FRAME::SwitchCanvas(), SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME(), and PCB_DRAW_PANEL_GAL::UpdateColors().
|
inlineinherited |
Enable drawing the axes.
Definition at line 949 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_axesEnabled.
Referenced by FOOTPRINT_EDIT_FRAME::ActivateGalCanvas(), FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME(), KIGFX::GAL::GAL(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), SYMBOL_EDIT_FRAME::SwitchCanvas(), FOOTPRINT_EDIT_FRAME::SwitchCanvas(), and SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().
|
inlineinherited |
Definition at line 217 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_clearColor.
Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), BOARD_PRINTOUT::DrawPage(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET(), PANEL_PCBNEW_COLOR_SETTINGS::updatePreview(), and PANEL_EESCHEMA_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 959 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_gridTick.
Referenced by KIGFX::GAL::GAL().
void CAIRO_GAL::setCompositor | ( | ) |
Prepare the compositor.
Definition at line 1538 of file cairo_gal.cpp.
References KIGFX::GAL_DISPLAY_OPTIONS::cairo_antialiasing_mode, m_compositor, KIGFX::CAIRO_GAL_BASE::m_currentContext, m_mainBuffer, KIGFX::GAL::m_options, m_overlayBuffer, KIGFX::GAL::m_screenSize, m_tempBuffer, m_validCompositor, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BeginDrawing().
|
inlineinherited |
Set the cursor color.
aCursorColor | is the color of the cursor. |
Definition at line 1040 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_cursorColor.
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 1020 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_isCursorEnabled.
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.
aDepthRange | is the depth range where component x is the near clipping plane and y is the far clipping plane. |
Definition at line 716 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_depthRange.
Referenced by KIGFX::GAL::GAL().
|
overridevirtualinherited |
Set the fill color.
aColor | is the color for filling. |
Reimplemented from KIGFX::GAL.
Definition at line 611 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::CAIRO_GAL_BASE::CMD_SET_FILLCOLOR, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::DblArg, KIGFX::COLOR4D::g, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Argument, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Command, KIGFX::CAIRO_GAL_BASE::m_currentGroup, KIGFX::GAL::m_fillColor, KIGFX::CAIRO_GAL_BASE::m_isGrouping, KIGFX::COLOR4D::r, and KIGFX::CAIRO_GAL_BASE::storePath().
|
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 753 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_globalFlipX, and KIGFX::GAL::m_globalFlipY.
Referenced by KIGFX::GAL::GAL(), KIGFX::VIEW::SetMirror(), and BOARD_PRINTOUT::setupGal().
|
inlineinherited |
Set bold property of current font.
aBold | tells if the font should be bold or not. |
Definition at line 423 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_bold, and KIGFX::GAL::textProperties.
Referenced by KIGFX::SCH_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), GraphicTextWidth(), EDA_TEXT::LenSize(), KIGFX::GAL::ResetTextAttributes(), and KIGFX::GAL::SetTextAttributes().
|
inlineinherited |
Set italic property of current font.
aItalic | tells if the font should be italic or not. |
Definition at line 431 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_italic, and KIGFX::GAL::textProperties.
Referenced by KIGFX::SCH_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), GraphicTextWidth(), EDA_TEXT::LenSize(), KIGFX::GAL::ResetTextAttributes(), and KIGFX::GAL::SetTextAttributes().
|
inlineinherited |
Definition at line 434 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_underlined, and KIGFX::GAL::textProperties.
Referenced by KIGFX::SCH_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), EDA_TEXT::LenSize(), KIGFX::GAL::ResetTextAttributes(), and KIGFX::GAL::SetTextAttributes().
|
inlineinherited |
Set the font glyph size.
aGlyphSize | is the new font glyph size. |
Definition at line 415 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_glyphSize, and KIGFX::GAL::textProperties.
Referenced by LABEL_MANAGER::Add(), KIGFX::SCH_PAINTER::Draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::VIEW_OVERLAY::COMMAND_GLYPH_SIZE::Execute(), GraphicTextWidth(), EDA_TEXT::LenSize(), KIGFX::GAL::ResetTextAttributes(), KIGFX::PREVIEW::SetConstantGlyphHeight(), and KIGFX::GAL::SetTextAttributes().
|
inlineinherited |
Set the grid color.
aGridColor | is the grid color, it should have a low alpha value for the best effect. |
Definition at line 931 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_gridColor.
Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), KIGFX::CAIRO_GAL_BASE::CAIRO_GAL_BASE(), EDA_DRAW_PANEL_GAL::DoRePaint(), KIGFX::OPENGL_GAL::OPENGL_GAL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), GERBVIEW_FRAME::SetGridColor(), 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 879 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_gridOffset, KIGFX::GAL::m_gridOrigin, KIGFX::GAL::m_gridSize, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PCB_CONTROL::DoSetGridOrigin(), Refresh(), 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 904 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_gridOffset, KIGFX::GAL::m_gridOrigin, KIGFX::GAL::m_gridSize, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by COMMON_TOOLS::OnGridChanged(), DIALOG_PAD_PROPERTIES::prepareCanvas(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), and EDA_DRAW_PANEL_GAL::SwitchBackend().
|
inlineinherited |
Set the visibility setting of the grid.
aVisibility | is the new visibility setting of the grid. |
Definition at line 864 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_gridVisibility.
Referenced by 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 |
Set the horizontal justify for text drawing.
aHorizontalJustify | is the horizontal justify value. |
Definition at line 450 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_horizontalJustify, and KIGFX::GAL::textProperties.
Referenced by KIGFX::SCH_PAINTER::Draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PREVIEW::DrawTextNextToCursor(), drawTicksAlongLine(), KIGFX::GAL::ResetTextAttributes(), and KIGFX::GAL::SetTextAttributes().
|
overridevirtualinherited |
Enable/disable fill.
aIsFillEnabled | is true, when the graphics objects should be filled, else false. |
Reimplemented from KIGFX::GAL.
Definition at line 563 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::BoolArg, KIGFX::CAIRO_GAL_BASE::CMD_SET_FILL, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Argument, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Command, KIGFX::CAIRO_GAL_BASE::m_currentGroup, KIGFX::GAL::m_isFillEnabled, KIGFX::CAIRO_GAL_BASE::m_isGrouping, and KIGFX::CAIRO_GAL_BASE::storePath().
|
overridevirtualinherited |
Enable/disable stroked outlines.
aIsStrokeEnabled | is true, if the outline of an object should be stroked. |
Reimplemented from KIGFX::GAL.
Definition at line 578 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::BoolArg, KIGFX::CAIRO_GAL_BASE::CMD_SET_STROKE, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Argument, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Command, KIGFX::CAIRO_GAL_BASE::m_currentGroup, KIGFX::CAIRO_GAL_BASE::m_isGrouping, KIGFX::GAL::m_isStrokeEnabled, and KIGFX::CAIRO_GAL_BASE::storePath().
|
overridevirtualinherited |
Set the depth of the layer (position on the z-axis)
aLayerDepth | the layer depth for the objects. |
Reimplemented from KIGFX::GAL.
Definition at line 648 of file cairo_gal.cpp.
References KIGFX::GAL::SetLayerDepth(), and KIGFX::CAIRO_GAL_BASE::storePath().
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid().
|
overridevirtualinherited |
Set the line width.
aLineWidth | is the line width. |
Reimplemented from KIGFX::GAL.
Definition at line 629 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::CMD_SET_LINE_WIDTH, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::DblArg, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Argument, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Command, KIGFX::CAIRO_GAL_BASE::m_currentGroup, KIGFX::CAIRO_GAL_BASE::m_isGrouping, KIGFX::GAL::m_lineWidth, KIGFX::GAL::SetLineWidth(), and KIGFX::CAIRO_GAL_BASE::storePath().
Referenced by KIGFX::CAIRO_GAL_BASE::DrawGrid(), and KIGFX::CAIRO_GAL_BASE::DrawSegment().
|
inlineinherited |
Set the Point in world space to look at.
This point corresponds with the center of the actual drawing area.
aPoint | is the look at point (center of the actual drawing area). |
Definition at line 653 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_lookAtPoint.
Referenced by BOARD_PRINTOUT::DrawPage(), KIGFX::GAL::GAL(), and KIGFX::VIEW::SetCenter().
|
inline |
Definition at line 414 of file cairo_gal.h.
References m_mouseListener.
|
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 1592 of file cairo_gal.cpp.
References CURSOR_STORE::GetCursor(), KIGFX::GAL::m_currentNativeCursor, m_currentwxCursor, and KIGFX::GAL::SetNativeCursorStyle().
|
overridevirtualinherited |
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 934 of file cairo_gal.cpp.
References KIGFX::CAIRO_GAL_BASE::m_currentContext.
|
inline |
Definition at line 419 of file cairo_gal.h.
References m_paintListener.
|
inlineinherited |
Set the rotation angle.
aRotation | is the new rotation angle (radians). |
Definition at line 693 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_rotation.
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.
aScreenDPI | are the screen DPI. |
Definition at line 641 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_screenDPI.
Referenced by KIGFX::CAIRO_PRINT_GAL::CAIRO_PRINT_GAL(), and KIGFX::GAL::GAL().
|
inlineinherited |
Definition at line 628 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_screenSize.
Referenced by KIGFX::CAIRO_PRINT_GAL::SetSheetSize().
|
overridevirtualinherited |
Set the stroke color.
aColor | is the color for stroking the outline. |
Reimplemented from KIGFX::GAL.
Definition at line 593 of file cairo_gal.cpp.
References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::CAIRO_GAL_BASE::CMD_SET_STROKECOLOR, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::DblArg, KIGFX::COLOR4D::g, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Argument, KIGFX::CAIRO_GAL_BASE::GROUP_ELEMENT::m_Command, KIGFX::CAIRO_GAL_BASE::m_currentGroup, KIGFX::CAIRO_GAL_BASE::m_isGrouping, KIGFX::GAL::m_strokeColor, KIGFX::COLOR4D::r, and KIGFX::CAIRO_GAL_BASE::storePath().
|
overridevirtual |
Set the target for rendering.
aTarget | is the new target for rendering. |
Reimplemented from KIGFX::GAL.
Definition at line 1422 of file cairo_gal.cpp.
References m_compositor, m_currentTarget, m_isInitialized, m_mainBuffer, m_overlayBuffer, m_tempBuffer, m_validCompositor, KIGFX::CAIRO_GAL_BASE::storePath(), KIGFX::TARGET_CACHED, KIGFX::TARGET_NONCACHED, KIGFX::TARGET_OVERLAY, and KIGFX::TARGET_TEMP.
Referenced by CAIRO_GAL(), StartDiffLayer(), and StartNegativesLayer().
|
virtualinherited |
Loads attributes of the given text (bold/italic/underline/mirrored and so on).
aText | is the text item. |
Definition at line 155 of file graphics_abstraction_layer.cpp.
References EDA_TEXT::GetHorizJustify(), EDA_TEXT::GetTextSize(), EDA_TEXT::GetVertJustify(), EDA_TEXT::IsBold(), EDA_TEXT::IsItalic(), EDA_TEXT::IsMirrored(), 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::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), and GRText().
|
inlineinherited |
Set a mirrored property of text.
aMirrored | tells if the text should be mirrored or not. |
Definition at line 442 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_mirrored, and KIGFX::GAL::textProperties.
Referenced by KIGFX::SCH_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PREVIEW::DrawTextNextToCursor(), KIGFX::GAL::ResetTextAttributes(), KIGFX::GAL::SetTextAttributes(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
|
inlineinherited |
Set the vertical justify for text drawing.
aVerticalJustify | is the vertical justify value. |
Definition at line 468 of file graphics_abstraction_layer.h.
References KIGFX::GAL::TEXT_PROPERTIES::m_verticalJustify, and KIGFX::GAL::textProperties.
Referenced by KIGFX::SCH_PAINTER::Draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::GAL::ResetTextAttributes(), and KIGFX::GAL::SetTextAttributes().
|
inlineinherited |
Set the world <-> screen transformation matrix.
aMatrix | is the 3x3 world <-> screen transformation matrix. |
Definition at line 604 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_worldScreenMatrix.
|
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.
aWorldUnitLength | is the world Unit length. |
Definition at line 623 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_worldUnitLength.
Referenced by KIGFX::GAL::GAL(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), GERBVIEW_PRINTOUT::setupGal(), PCBNEW_PRINTOUT::setupGal(), PL_DRAW_PANEL_GAL::SwitchBackend(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), SCH_DRAW_PANEL::SwitchBackend(), and PCB_DRAW_PANEL_GAL::SwitchBackend().
|
inlineinherited |
Set the zoom factor of the scene.
aZoomFactor | is the zoom factor. |
Definition at line 673 of file graphics_abstraction_layer.h.
References KIGFX::GAL::m_zoomFactor.
Referenced by BOARD_PRINTOUT::DrawPage(), KIGFX::GAL::GAL(), and KIGFX::VIEW::SetScale().
|
overridevirtual |
Show/hide the GAL canvas.
Reimplemented from KIGFX::GAL.
Definition at line 1397 of file cairo_gal.cpp.
void CAIRO_GAL::skipMouseEvent | ( | wxMouseEvent & | aEvent | ) |
Mouse event handler, forwards the event to the child.
aEvent | is the mouse event to be forwarded. |
Definition at line 1560 of file cairo_gal.cpp.
References m_mouseListener.
Referenced by CAIRO_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 940 of file cairo_gal.cpp.
References ClearTarget(), SetTarget(), and KIGFX::TARGET_TEMP.
|
overridevirtual |
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 from KIGFX::GAL.
Definition at line 953 of file cairo_gal.cpp.
References ClearTarget(), SetTarget(), and KIGFX::TARGET_TEMP.
|
protectedinherited |