29    return aDeemph ? 0.5 : 1.0;
 
 
   40        str << prefix << 
": ";
 
 
   75    constexpr double aspectRatio = 1.0;
 
   76    constexpr double hdpiSizes[] = { 7,  8,  9,  11,  13, 14, 16 };
 
   77    constexpr double sizes[] =     { 8, 10, 12,  14,  15, 16, 18 };
 
   80    double thicknessFactor;
 
   82    double linePitchFactor;
 
   88        height = hdpiSizes[ 3 + aRelativeSize ];
 
   89        thicknessFactor = 0.15;
 
   91        linePitchFactor = 1.7;
 
   95        height = sizes[ 3 + aRelativeSize ];
 
   96        thicknessFactor = 0.20;
 
   98        linePitchFactor = 1.9;
 
  108    textDims.
LinePitch = height * linePitchFactor;
 
 
  125                                           const wxArrayString& aStrings,
 
  126                                           bool aDrawingDropShadows )
 
  145    if( aTextQuadrant.
y > 0 )
 
  146        textPos.
y -= textDims.
LinePitch * ( aStrings.size() + 1 );
 
  148    if( aTextQuadrant.
x < 0 )
 
  169    int shadowXoffset = aDrawingDropShadows ? textDims.
ShadowWidth : 0;
 
  175    const float adjust = 1.2f;      
 
  176    shadowXoffset *= adjust;
 
  179        textPos.
x -= shadowXoffset;
 
  181        textPos.
x += shadowXoffset;
 
  190    if( aDrawingDropShadows )
 
  197    for( 
const wxString& str : aStrings )
 
 
wxGLCanvas wrapper for HiDPI/Retina support.
 
double GetScaleFactor() const
Get the current scale factor.
 
FONT is an abstract base class for both outline and stroke fonts.
 
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false, const std::vector< wxString > *aEmbeddedFiles=nullptr, bool aForDrawingSheet=false)
 
void Draw(KIGFX::GAL *aGal, const wxString &aText, const VECTOR2I &aPosition, const VECTOR2I &aCursor, const TEXT_ATTRIBUTES &aAttributes, const METRICS &aFontMetrics) const
Draw a string.
 
static const METRICS & Default()
 
A color representation with 4 components: red, green, blue, alpha.
 
double GetBrightness() const
Returns the brightness value of the color ranged from 0.0 to 1.0.
 
static const COLOR4D WHITE
 
static const COLOR4D BLACK
 
Attribute save/restore for GAL attributes.
 
Abstract interface for drawing on a 2D-surface.
 
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
 
const COLOR4D & GetStrokeColor() const
Get the stroke color.
 
virtual void SetStrokeColor(const COLOR4D &aColor)
Set the stroke color.
 
virtual void SetIsStroke(bool aIsStrokeEnabled)
Enable/disable stroked outlines.
 
double GetWorldScale() const
Get the world scale.
 
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
 
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
 
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
 
GAL * GetGAL() const
Return the GAL this view is using to draw graphical primitives.
 
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
 
GR_TEXT_H_ALIGN_T m_Halign
 
@ LAYER_AUX_ITEMS
Auxiliary items (guides, rule, etc).
 
KICOMMON_API double ToUserUnit(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnit, double aValue)
Convert aValue in internal units to the appropriate user units defined by aUnit.
 
KICOMMON_API wxString GetText(EDA_UNITS aUnits, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Get the units string for a given units type.
 
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.
 
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 suffi...
 
double PreviewOverlayDeemphAlpha(bool aDeemph=true)
Default alpha of "de-emphasised" features (like previously locked-in lines.
 
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.
 
VECTOR2< int32_t > VECTOR2I
 
VECTOR2< double > VECTOR2D