Table of Contents

Struct MeasuredText

Namespace
ScottPlot
Assembly
ScottPlot.dll
public readonly struct MeasuredText
Inherited Members
Extension Methods

Properties

Bottom

Distance below the baseline the rendered font may occupy.

public required float Bottom { get; init; }

Property Value

float

Height

Height of the entire text.

public float Height { get; }

Property Value

float

LineHeight

Vertical spacing between each line. This is the value returned by GetFontMetrics().

public float LineHeight { get; init; }

Property Value

float

LineWidths

Width of each line of text in pixel units.

public float[] LineWidths { get; init; }

Property Value

float[]

Size

Size of the entire multiline label in pixels. Width is the largest value returned by paint.MeasureText(). Height is the line height multiplied by the number of lines.

public PixelSize Size { get; init; }

Property Value

PixelSize

VerticalOffset

Recommended vertical offset when calling SKCanvas.DrawText(). See https://github.com/ScottPlot/ScottPlot/issues/3700 for details.

public required float VerticalOffset { get; init; }

Property Value

float

Width

Width of the entire text. Equals the length of the widest line.

public float Width { get; }

Property Value

float

Methods

Rect(Alignment)

Return a rectangle representing the bounding box of the entire text with the alignment point centered at the origin.

public PixelRect Rect(Alignment alignment)

Parameters

alignment Alignment

Returns

PixelRect