Struct DWriteTextMetrics
Overall metrics associated with text after layout.
All coordinates are in device independent pixels (DIPs).
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
public struct DWriteTextMetrics : IEquatable<DWriteTextMetrics>
Properties
|
Edit this page
View Source
Height
Gets the height of the formatted text. The height of an empty string
is determined by the size of the default font's line height.
Declaration
public float Height { get; }
Property Value
|
Edit this page
View Source
LayoutHeight
Gets the initial height given to the layout. Depending on the length of the
text, it may be larger or smaller than the text content height.
Declaration
public float LayoutHeight { get; }
Property Value
|
Edit this page
View Source
LayoutWidth
Gets the initial width given to the layout. Depending on whether the text
was wrapped or not, it can be either larger or smaller than the
text content width.
Declaration
public float LayoutWidth { get; }
Property Value
|
Edit this page
View Source
Left
Gets the left-most point of formatted text relative to layout box
(excluding any glyph overhang).
Declaration
public float Left { get; }
Property Value
|
Edit this page
View Source
LineCount
Gets the total number of lines.
Declaration
public uint LineCount { get; }
Property Value
|
Edit this page
View Source
MaxBidiReorderingDepth
Gets the maximum reordering count of any line of text, used
to calculate the most number of hit-testing boxes needed.
If the layout has no bidirectional text or no text at all,
the minimum level is 1.
Declaration
public uint MaxBidiReorderingDepth { get; }
Property Value
|
Edit this page
View Source
Top
Gets the top-most point of formatted text relative to layout box
(excluding any glyph overhang).
Declaration
public float Top { get; }
Property Value
|
Edit this page
View Source
Width
Gets the width of the formatted text ignoring trailing whitespace
at the end of each line.
Declaration
public float Width { get; }
Property Value
|
Edit this page
View Source
WidthIncludingTrailingWhitespace
Gets the width of the formatted text taking into account the
trailing whitespace at the end of each line.
Declaration
public float WidthIncludingTrailingWhitespace { get; }
Property Value
Methods
|
Edit this page
View Source
Equals(DWriteTextMetrics)
Declaration
public readonly bool Equals(DWriteTextMetrics other)
Parameters
Returns
|
Edit this page
View Source
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Overrides
|
Edit this page
View Source
NativeReadFrom(nint)
Declaration
public static DWriteTextMetrics NativeReadFrom(nint buffer)
Parameters
| Type |
Name |
Description |
| nint |
buffer |
|
Returns
|
Edit this page
View Source
NativeReadFrom(nint, Span<DWriteTextMetrics>)
Declaration
public static void NativeReadFrom(nint buffer, Span<DWriteTextMetrics> objects)
Parameters
|
Edit this page
View Source
NativeRequiredSize()
Declaration
public static int NativeRequiredSize()
Returns
|
Edit this page
View Source
NativeRequiredSize(int)
Declaration
public static int NativeRequiredSize(int count)
Parameters
| Type |
Name |
Description |
| int |
count |
|
Returns
|
Edit this page
View Source
NativeWriteTo(nint, in DWriteTextMetrics)
Declaration
public static void NativeWriteTo(nint buffer, in DWriteTextMetrics obj)
Parameters
|
Edit this page
View Source
NativeWriteTo(nint, ReadOnlySpan<DWriteTextMetrics>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<DWriteTextMetrics> objects)
Parameters
Operators
|
Edit this page
View Source
operator ==(DWriteTextMetrics, DWriteTextMetrics)
Declaration
public static bool operator ==(DWriteTextMetrics left, DWriteTextMetrics right)
Parameters
Returns
|
Edit this page
View Source
operator !=(DWriteTextMetrics, DWriteTextMetrics)
Declaration
public static bool operator !=(DWriteTextMetrics left, DWriteTextMetrics right)
Parameters
Returns
Implements