Table of Contents

Struct LineMetrics

Namespace
Xui.Core.Canvas
Assembly
Core.dll

Represents text layout metrics that depend on the specific string being measured. Includes actual bounding box and visual advance width.

public readonly struct LineMetrics
Inherited Members

Constructors

LineMetrics(NFloat, NFloat, NFloat, NFloat, NFloat)

Initializes a new LineMetrics instance.

public LineMetrics(NFloat width, NFloat left, NFloat right, NFloat ascent, NFloat descent)

Parameters

width NFloat

Advance width of the rendered text.

left NFloat

Furthest left pixel offset relative to the origin.

right NFloat

Furthest right pixel offset relative to the origin.

ascent NFloat

Maximum pixel height above the baseline.

descent NFloat

Maximum pixel depth below the baseline.

Fields

ActualBoundingBoxAscent

Distance from the baseline to the topmost pixel of any glyph.

public readonly NFloat ActualBoundingBoxAscent

Field Value

NFloat

ActualBoundingBoxDescent

Distance from the baseline to the bottommost pixel of any glyph.

public readonly NFloat ActualBoundingBoxDescent

Field Value

NFloat

ActualBoundingBoxLeft

Distance from the text origin to the furthest left pixel of any glyph. May be negative for italic or overhanging glyphs.

public readonly NFloat ActualBoundingBoxLeft

Field Value

NFloat

ActualBoundingBoxRight

Distance from the text origin to the furthest right pixel of any glyph.

public readonly NFloat ActualBoundingBoxRight

Field Value

NFloat

Width

Advance width of the string, including kerning and shaping. This is how far the cursor should advance after drawing the text.

public readonly NFloat Width

Field Value

NFloat

Properties

ActualHeight

Full height of the visual bounding box (ascent + descent).

public NFloat ActualHeight { get; }

Property Value

NFloat