36 using namespace KIGFX;
40 m_options( aDisplayOptions ),
231 extents.SetSize( halfSize * 2 );
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...
EDA_TEXT_VJUSTIFY_T GetVertJustify() const
The Cairo implementation of the graphics abstraction layer.
bool m_axesEnabled
Should the axes be drawn.
const MATRIX3x3D & GetScreenWorldMatrix() const
Get the screen <-> world transformation matrix.
void SetRotation(T aAngle)
Set the rotation components of the matrix.
double computeMinGridSpacing() const
compute minimum grid spacing from the grid settings
STROKE_FONT m_strokeFont
Instance of object that stores information about how to draw texts.
KIGFX::GRID_STYLE m_gridStyle
Snapping options for the grid.
MATRIX3x3D m_screenWorldMatrix
Screen transformation.
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).
MATRIX3x3 Inverse() const
Determine the inverse of the matrix.
LINK Subscribe(ObserverInterface *aObserver)
Add a subscription returning an RAII link.
VECTOR2D m_gridSize
The grid size.
void SetFontBold(bool aBold)
Set bold property of current font.
void SetFlip(bool xAxis, bool yAxis)
Sets flipping of the screen.
VECTOR2D m_lookAtPoint
Point to be looked at in world space.
bool LoadNewStrokeFont(const char *const aNewStrokeFont[], int aNewStrokeFontSize)
Load the new stroke font.
bool m_forceDisplayCursor
The pixel scale factor (>1 for hi-DPI scaled displays)
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)
VECTOR2< T > GetScale() const
Get the scale components of the matrix.
float m_gridLineWidth
Line width of the grid.
MATRIX3x3D m_worldScreenMatrix
World transformation.
virtual void SetLineWidth(float aLineWidth)
Set the line width.
bool m_axesEnabled
Fullscreen crosshair or small cross.
double m_worldScale
The scale factor world->screen.
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_DISPLAY_OPTIONS & m_options
GAL(GAL_DISPLAY_OPTIONS &aOptions)
bool m_globalFlipX
Flag for X axis flipping.
EDA_TEXT_HJUSTIFY_T GetHorizJustify() const
const char *const newstroke_font[]
Array containing strokes for unicode glyphs.
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.
int m_gridMinSpacing
Minimum screen size of the grid (pixels) below which the grid is not drawn.
bool m_isCursorEnabled
Is the cursor enabled?
const wxSize & GetTextSize() const
VECTOR2D computeTextLineSize(const UTF8 &aText) const
Compute the X and Y size of a given 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.
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.
COLOR4D m_cursorColor
Cursor color.
void SetGlyphSize(const VECTOR2D &aSize)
Set the font glyph size.
virtual bool updatedGalDisplayOptions(const GAL_DISPLAY_OPTIONS &aOptions)
Handle updating display options.
virtual bool SetNativeCursorStyle(KICURSOR aCursor)
Set the cursor in the native panel.
UTIL::LINK m_observerLink
const int newstroke_font_bufsize
void computeWorldScale()
Compute the scaling factor for the world->screen matrix.
GRID_STYLE m_gridStyle
Grid display style.
void SetTextMirrored(bool aMirrored)
Set a mirrored property of text.
const VECTOR2D & GetLookAtPoint() const
Get the look at point.
virtual void SetStrokeColor(const COLOR4D &aColor)
Set the stroke color.
void SetCoarseGrid(int aInterval)
Draw every tick line wider.
double m_rotation
Rotation transformation (radians)
bool m_forceDisplayCursor
Always show cursor.
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 m_globalFlipY
Flag for Y axis flipping.
VECTOR2D m_gridOffset
The grid offset to compensate cursor position.
void SetOrigin(const Vec &pos)
double m_gridLineWidth
Minimum pixel distance between displayed grid lines.
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".
BOX2D GetVisibleWorldExtents() const
void SetGridVisibility(bool aVisibility)
Set the visibility setting of the grid.
bool m_fullscreenCursor
Shape of the cursor (fullscreen or small cross)
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.
VECTOR2I m_screenSize
Screen size in screen coordinates.
bool m_fullscreenCursor
Force cursor display.
KICURSOR m_currentNativeCursor
Current cursor.
static const int MAX_DEPTH
A color representation with 4 components: red, green, blue, alpha.