Class LabelStyle
- Namespace
- ScottPlot
- Assembly
- ScottPlot.dll
public class LabelStyle
- Inheritance
-
LabelStyle
- Derived
- Inherited Members
- Extension Methods
Fields
AntiAlias
[Obsolete("use AntiAliasBackground and AntiAliasText", true)]
public bool AntiAlias
Field Value
BorderRadiusX
public float BorderRadiusX
Field Value
BorderRadiusY
public float BorderRadiusY
Field Value
Italic
public bool Italic
Field Value
OffsetX
public float OffsetX
Field Value
OffsetY
public float OffsetY
Field Value
PointColor
public Color PointColor
Field Value
PointFilled
public bool PointFilled
Field Value
PointSize
public float PointSize
Field Value
Properties
Alignment
public Alignment Alignment { get; set; }
Property Value
AntiAliasBackground
public bool AntiAliasBackground { get; set; }
Property Value
AntiAliasText
public bool AntiAliasText { get; set; }
Property Value
BackgroundColor
public Color BackgroundColor { get; set; }
Property Value
Bold
public bool Bold { get; set; }
Property Value
BorderColor
public Color BorderColor { get; set; }
Property Value
BorderRadius
public float BorderRadius { get; set; }
Property Value
BorderWidth
public float BorderWidth { get; set; }
Property Value
Default
public static LabelStyle Default { get; }
Property Value
FontName
public string FontName { get; set; }
Property Value
FontSize
public float FontSize { get; set; }
Property Value
ForeColor
public Color ForeColor { get; set; }
Property Value
Image
If supplied, this label will be displayed as an image and its text and styling properties will be ignored
public Image? Image { get; set; }
Property Value
IsVisible
public bool IsVisible { get; set; }
Property Value
LastRenderPixelRect
public PixelRect LastRenderPixelRect { get; }
Property Value
LineSpacing
Manually defined line height in pixels. If not defined, the default line spacing will be used (according to the typeface, size, etc.)
public float? LineSpacing { get; set; }
Property Value
Padding
public float Padding { get; set; }
Property Value
PixelPadding
public PixelPadding PixelPadding { get; set; }
Property Value
RTLSupport
Set this to globally enable support for right-to-left (RTL) languages
public static bool RTLSupport { get; set; }
Property Value
Rotation
Rotation in degrees clockwise from 0 (horizontal text)
public float Rotation { get; set; }
Property Value
ShadowColor
public Color ShadowColor { get; set; }
Property Value
ShadowOffset
public PixelOffset ShadowOffset { get; set; }
Property Value
SubpixelText
public bool SubpixelText { get; set; }
Property Value
Text
public string Text { get; set; }
Property Value
Methods
ApplyToPaint(SKPaint)
public void ApplyToPaint(SKPaint paint)
Parameters
paint
SKPaint
GetRenderLocation(PixelRect, Alignment, float, float, SKPaint)
Use the Label's size and Alignment to determine where it should be drawn
relative to the given rectangle (aligned to the rectangle according to rectAlignment
).
public Pixel GetRenderLocation(PixelRect rect, Alignment rectAlignment, float offsetX, float offsetY, SKPaint paint)
Parameters
Returns
Measure()
Return size information for the contents of the Text property
public MeasuredText Measure()
Returns
Measure(string)
Return size information for the given text
public MeasuredText Measure(string text)
Parameters
text
string
Returns
Measure(string, SKPaint)
public MeasuredText Measure(string text, SKPaint paint)
Parameters
Returns
MeasureHighestString(string[], SKPaint)
public (string text, float height) MeasureHighestString(string[] strings, SKPaint paint)
Parameters
Returns
MeasureWidestString(string[], SKPaint)
public (string text, PixelLength width) MeasureWidestString(string[] strings, SKPaint paint)
Parameters
Returns
Render(SKCanvas, Pixel, SKPaint, bool)
public void Render(SKCanvas canvas, Pixel px, SKPaint paint, bool bottom = true)
Parameters
Render(SKCanvas, Pixel, SKPaint, string, bool)
public void Render(SKCanvas canvas, Pixel px, SKPaint paint, string text, bool bottom = true)
Parameters
SetBestFont()
Use the characters in Text to determine an installed system font most likely to support this character set.
public void SetBestFont()