36 using namespace KIGFX;
40 options( aDisplayOptions ),
103 bool refresh =
false;
static const int GRID_DEPTH
Depth level on which the grid is drawn.
virtual void SetFillColor(const COLOR4D &aColor)
Set the fill color.
An 8 bit string that is assuredly encoded in UTF8, and supplies special conversion support to and fro...
STROKE_FONT strokeFont
Instance of object that stores information about how to draw texts.
bool axesEnabled
Should the axes be drawn.
EDA_TEXT_VJUSTIFY_T GetVertJustify() const
VECTOR2D gridOffset
The grid offset to compensate cursor position.
The Cairo implementation of the graphics abstraction layer.
void SetRotation(T aAngle)
Set the rotation components of the matrix.
double computeMinGridSpacing() const
compute minimum grid spacing from the grid settings
KIGFX::GRID_STYLE m_gridStyle
Snapping options for the grid.
bool isCursorEnabled
Is the cursor enabled?
void SetCursorEnabled(bool aCursorEnabled)
Enable/disable cursor.
virtual void SetTextAttributes(const EDA_TEXT *aText)
Loads attributes of the given text (bold/italic/underline/mirrored and so on).
int gridMinSpacing
Minimum screen size of the grid (pixels) below which the grid is not drawn.
MATRIX3x3 Inverse() const
Determine the inverse of the matrix.
GRID_STYLE gridStyle
Grid display style.
LINK Subscribe(ObserverInterface *aObserver)
Add a subscription returning an RAII link.
GAL_DISPLAY_OPTIONS & options
double rotation
Rotation transformation (radians)
void SetFlip(bool xAxis, bool yAxis)
Sets flipping of the screen.
bool LoadNewStrokeFont(const char *const aNewStrokeFont[], int aNewStrokeFontSize)
Load the new stroke font.
MATRIX3x3D screenWorldMatrix
Screen transformation.
bool m_forceDisplayCursor
The pixel scale factor (>1 for hi-DPI scaled displays)
bool globalFlipX
Flag for X axis flipping.
double m_gridMinSpacing
Whether or not to draw the coordinate system axes.
VECTOR2D GetTextLineSize(const UTF8 &aText) const
Compute the X and Y size of a given text.
virtual void ComputeWorldScreenMatrix()
Compute the world <-> screen transformation matrix.
void SetScreenDPI(double aScreenDPI)
Set the dots per inch of the screen.
void SetIdentity()
Set the matrix to the identity matrix.
virtual void SetLayerDepth(double aLayerDepth)
Set the depth of the layer (position on the z-axis)
VECTOR2D lookAtPoint
Point to be looked at in world space.
virtual void SetLineWidth(float aLineWidth)
Set the line width.
bool m_axesEnabled
Fullscreen crosshair or small cross.
VECTOR2D GetGridPoint(const VECTOR2D &aPoint) const
For a given point it returns the nearest point belonging to the grid in world coordinates.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
static const int MIN_DEPTH
Possible depth range.
GAL(GAL_DISPLAY_OPTIONS &aOptions)
void SetFontBold(const bool aBold)
Set bold property of current font.
COLOR4D cursorColor
Cursor color.
EDA_TEXT_HJUSTIFY_T GetHorizJustify() const
const char *const newstroke_font[]
Array containing strokes for unicode glyphs.
bool fullscreenCursor
Shape of the cursor (fullscreen or small cross)
void OnGalDisplayOptionsChanged(const GAL_DISPLAY_OPTIONS &aOptions) override
Handler for observer settings changes.
void ResetTextAttributes()
Reset text attributes to default styling.
VECTOR2< double > VECTOR2D
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
const wxSize & GetTextSize() const
VECTOR2D computeTextLineSize(const UTF8 &aText) const
Compute the X and Y size of a given text.
float gridLineWidth
Line width of the grid.
void SetTextMirrored(const bool aMirrored)
Set a mirrored property of text.
void SetCursorColor(const COLOR4D &aCursorColor)
Set the cursor color.
void SetVerticalJustify(const EDA_TEXT_VJUSTIFY_T aVerticalJustify)
Set the vertical justify for text drawing.
MATRIX3x3D worldScreenMatrix
World transformation.
void SetFontItalic(bool aItalic)
Set italic property of current font.
void SetAxesEnabled(bool aAxesEnabled)
Enable drawing the axes.
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
COLOR4D getCursorColor() const
Get the actual cursor color to draw.
virtual bool updatedGalDisplayOptions(const GAL_DISPLAY_OPTIONS &aOptions)
Handle updating display options.
const int newstroke_font_bufsize
void computeWorldScale()
Compute the scaling factor for the world->screen matrix.
virtual void SetStrokeColor(const COLOR4D &aColor)
Set the stroke color.
void SetCoarseGrid(int aInterval)
Draw every tick line wider.
void SetGlyphSize(const VECTOR2D aSize)
Set the font glyph size.
void SetFontUnderlined(bool aUnderlined)
void SetScale(VECTOR2< T > aScale)
Set the scale components of the matrix.
void SetRotation(double aRotation)
Set the rotation angle.
bool globalFlipY
Flag for Y axis flipping.
double worldScale
The scale factor world->screen.
VECTOR2D gridSize
The grid size.
double m_gridLineWidth
Minimum pixel distance between displayed grid lines.
VECTOR2I screenSize
Screen size in screen coordinates.
void SetZoomFactor(double aZoomFactor)
Set the zoom factor of the scene.
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
void SetGridVisibility(bool aVisibility)
Set the visibility setting of the grid.
void SetTranslation(VECTOR2< T > aTranslation)
Set the translation components of the matrix.
void SetLookAtPoint(const VECTOR2D &aPoint)
Set the Point in world space to look at.
void SetHorizontalJustify(const EDA_TEXT_HJUSTIFY_T aHorizontalJustify)
Set the horizontal justify for text drawing.
virtual void SetIsStroke(bool aIsStrokeEnabled)
Enable/disable stroked outlines.
void SetDepthRange(const VECTOR2D &aDepthRange)
Set the range of the layer depth.
bool m_fullscreenCursor
Force cursor display.
bool forceDisplayCursor
Always show cursor.
static const int MAX_DEPTH
A color representation with 4 components: red, green, blue, alpha.