KiCad PCB EDA Suite
|
Classes | |
class | ARC_ASSISTANT |
Represents an assistant draw when interactively drawing an arc on a canvas. More... | |
class | ARC_GEOM_MANAGER |
Manage the construction of a circular arc though sequential setting of critical points: center, arc start and arc end. More... | |
class | BEZIER_ASSISTANT |
Represents an assistant draw when interactively drawing a bezier on a canvas. More... | |
class | BEZIER_GEOM_MANAGER |
Manage the construction of a bezier through a series of steps. More... | |
class | CENTRELINE_RECT_ITEM |
Represent an area drawn by drawing a rectangle of a given aspect along a vector, with the midpoint of one side on the start point and the mid point of the opposite side on the end. More... | |
class | DRAW_CONTEXT |
A KIGFX::PREVIEW::DRAW_CONTEXT is a wrapper around a GAL and some other settings that makes it easy to draw preview items consistently. More... | |
class | MULTISTEP_GEOM_MANAGER |
A geometry manager that works by accepting a sequence of points and advancing though stages of geometric construction with each point "locked in". More... | |
class | POLYGON_ITEM |
A preview item which shows an in-progress polygon, which can be used for zone outlines, etc. More... | |
class | RULER_ITEM |
A drawn ruler item for showing the distance between two points. More... | |
class | SELECTION_AREA |
Represent a selection area (currently a rectangle) in a VIEW, drawn corner-to-corner between two points. More... | |
class | SIMPLE_OVERLAY_ITEM |
SIMPLE_OVERLAY_ITEM is class that represents a visual area drawn on a canvas, used to temporarily demarcate an area or show something on an overlay. More... | |
struct | TEXT_DIMS |
class | TWO_POINT_ASSISTANT |
Represents an assistant draw when interactively drawing a line or circle on a canvas. More... | |
class | TWO_POINT_GEOMETRY_MANAGER |
Represent a very simple geometry manager for items that have a start and end point. More... | |
Enumerations | |
enum class | GEOM_SHAPE { SEGMENT = 0 , RECT , ARC , CIRCLE , POLYGON , CURVE } |
Functions | |
double | PreviewOverlayDeemphAlpha (bool aDeemph=true) |
Default alpha of "de-emphasised" features (like previously locked-in lines. | |
wxString | DimensionLabel (const wxString &prefix, double aVal, const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, bool aIncludeUnits=true) |
Get a formatted string showing a dimension to a sane precision with an optional prefix and unit suffix. | |
TEXT_DIMS | GetConstantGlyphHeight (KIGFX::GAL *aGal, int aRelativeSize=0) |
Set the GAL glyph height to a constant scaled value, so that it always looks the same on screen. | |
COLOR4D | GetShadowColor (const COLOR4D &aColor) |
void | DrawTextNextToCursor (KIGFX::VIEW *aView, const VECTOR2D &aCursorPos, const VECTOR2D &aTextQuadrant, const wxArrayString &aStrings, bool aDrawingDropShadows) |
Draw strings next to the cursor. | |
|
strong |
Enumerator | |
---|---|
SEGMENT | |
RECT | |
ARC | |
CIRCLE | |
POLYGON | |
CURVE |
Definition at line 37 of file two_point_assistant.h.
wxString KIGFX::PREVIEW::DimensionLabel | ( | const wxString & | prefix, |
double | aVal, | ||
const EDA_IU_SCALE & | aIuScale, | ||
EDA_UNITS | aUnits, | ||
bool | aIncludeUnits = true |
||
) |
Get a formatted string showing a dimension to a sane precision with an optional prefix and unit suffix.
Definition at line 33 of file preview_utils.cpp.
References CENTIMETRES, DEGREES, EDA_UNIT_UTILS::GetText(), INCHES, MICROMETRES, MILLIMETRES, MILS, PERCENT, EDA_UNIT_UTILS::UI::ToUserUnit(), and UNSCALED.
Referenced by drawTicksAlongLine(), KIGFX::PREVIEW::RULER_ITEM::GetDimensionStrings(), KIGFX::PREVIEW::ARC_ASSISTANT::ViewDraw(), and KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewDraw().
void KIGFX::PREVIEW::DrawTextNextToCursor | ( | KIGFX::VIEW * | aView, |
const VECTOR2D & | aCursorPos, | ||
const VECTOR2D & | aTextQuadrant, | ||
const wxArrayString & | aStrings, | ||
bool | aDrawingDropShadows | ||
) |
Draw strings next to the cursor.
The GAL attribute context will be restored to its original state after this function is called.
aGal | the GAL to draw on. |
aCursorPos | the position of the cursor to draw next to. |
aTextQuadrant | a vector pointing to the quadrant to draw the text in. |
aStrings | list of strings to draw, top to bottom. |
Definition at line 118 of file preview_utils.cpp.
References KIFONT::METRICS::Default(), KIFONT::FONT::Draw(), GetConstantGlyphHeight(), KIFONT::FONT::GetFont(), KIGFX::VIEW::GetGAL(), KIGFX::RENDER_SETTINGS::GetLayerColor(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), GetShadowColor(), KIGFX::GAL::GetStrokeColor(), KIGFX::GAL::GetWorldScale(), KIGFX::PREVIEW::TEXT_DIMS::GlyphSize, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, KIGFX::GAL::IsFlippedX(), LAYER_AUX_ITEMS, KIGFX::PREVIEW::TEXT_DIMS::LinePitch, TEXT_ATTRIBUTES::m_Halign, TEXT_ATTRIBUTES::m_Mirrored, TEXT_ATTRIBUTES::m_Size, TEXT_ATTRIBUTES::m_StrokeWidth, KIGFX::GAL::SetIsFill(), KIGFX::GAL::SetIsStroke(), KIGFX::GAL::SetStrokeColor(), KIGFX::PREVIEW::TEXT_DIMS::ShadowWidth, KIGFX::PREVIEW::TEXT_DIMS::StrokeWidth, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by KIGFX::PREVIEW::ARC_ASSISTANT::ViewDraw(), KIGFX::PREVIEW::BEZIER_ASSISTANT::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), and KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewDraw().
KIGFX::PREVIEW::TEXT_DIMS KIGFX::PREVIEW::GetConstantGlyphHeight | ( | KIGFX::GAL * | aGal, |
int | aRelativeSize = 0 |
||
) |
Set the GAL glyph height to a constant scaled value, so that it always looks the same on screen.
aGal | the GAL to draw on. |
aRelativeSize | similar to HTML font sizes; 0 will give a standard size while +1 etc. will give larger and -1 etc. will give smaller. |
Definition at line 67 of file preview_utils.cpp.
References HIDPI_GL_CANVAS::GetScaleFactor(), KIGFX::GAL::GetWorldScale(), KIGFX::PREVIEW::TEXT_DIMS::GlyphSize, KIGFX::PREVIEW::TEXT_DIMS::LinePitch, KIGFX::PREVIEW::TEXT_DIMS::ShadowWidth, and KIGFX::PREVIEW::TEXT_DIMS::StrokeWidth.
Referenced by drawBacksideTicks(), DrawTextNextToCursor(), drawTicksAlongLine(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
KIGFX::COLOR4D KIGFX::PREVIEW::GetShadowColor | ( | const COLOR4D & | aColor | ) |
Definition at line 109 of file preview_utils.cpp.
References KIGFX::COLOR4D::GetBrightness().
Referenced by DrawTextNextToCursor(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().
double KIGFX::PREVIEW::PreviewOverlayDeemphAlpha | ( | bool | aDeemph = true | ) |
Default alpha of "de-emphasised" features (like previously locked-in lines.
Definition at line 27 of file preview_utils.cpp.
Referenced by deemphasise().