Struct DWriteUnderline
The DWRITE_UNDERLINE structure contains information about the size and
placement of underlines. All coordinates are in device independent
pixels (DIPs).
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
public struct DWriteUnderline : IEquatable<DWriteUnderline>
Constructors
|
Edit this page
View Source
DWriteUnderline(float, float, float, float, DWriteReadingDirection, DWriteFlowDirection, char*, DWriteMeasuringMode)
Declaration
public DWriteUnderline(float width, float thickness, float offset, float runHeight, DWriteReadingDirection readingDirection, DWriteFlowDirection flowDirection, char* localeName, DWriteMeasuringMode measuringMode)
Parameters
| Type |
Name |
Description |
| float |
width |
Width of the underline, measured parallel to the baseline.
|
| float |
thickness |
Thickness of the underline, measured perpendicular to the baseline.
|
| float |
offset |
Offset of the underline from the baseline.
|
| float |
runHeight |
Height of the tallest run where the underline applies.
|
| DWriteReadingDirection |
readingDirection |
Reading direction of the text associated with the underline.
|
| DWriteFlowDirection |
flowDirection |
Flow direction of the text associated with the underline.
|
| char* |
localeName |
Locale of the text the underline is being drawn under.
|
| DWriteMeasuringMode |
measuringMode |
The measuring mode.
|
Properties
|
Edit this page
View Source
FlowDirection
Gets or sets the flow direction of the text associated with the underline. This value
is used to interpret whether the thickness value advances top to
bottom, left to right, or right to left.
Declaration
public DWriteFlowDirection FlowDirection { get; set; }
Property Value
|
Edit this page
View Source
LocaleName
Gets or sets the locale of the text the underline is being drawn under. Can be
pertinent where the locale affects how the underline is drawn.
For example, in vertical text, the underline belongs on the
left for Chinese but on the right for Japanese.
This choice is completely left up to higher levels.
Declaration
public char* LocaleName { get; set; }
Property Value
|
Edit this page
View Source
MeasuringMode
Gets or sets the measuring mode can be useful to the renderer to determine how
underlines are rendered, e.g. rounding the thickness to a whole pixel
in GDI-compatible modes.
Declaration
public DWriteMeasuringMode MeasuringMode { get; set; }
Property Value
|
Edit this page
View Source
Offset
Gets or sets the offset of the underline from the baseline.
A positive offset represents a position below the baseline and
a negative offset is above.
Declaration
public float Offset { get; set; }
Property Value
|
Edit this page
View Source
ReadingDirection
Gets or sets the reading direction of the text associated with the underline. This
value is used to interpret whether the width value runs horizontally
or vertically.
Declaration
public DWriteReadingDirection ReadingDirection { get; set; }
Property Value
|
Edit this page
View Source
RunHeight
Gets or sets the height of the tallest run where the underline applies.
Declaration
public float RunHeight { get; set; }
Property Value
|
Edit this page
View Source
Thickness
Gets or sets the thickness of the underline, measured perpendicular to the
baseline.
Declaration
public float Thickness { get; set; }
Property Value
|
Edit this page
View Source
Width
Gets or sets the width of the underline, measured parallel to the baseline.
Declaration
public float Width { get; set; }
Property Value
Methods
|
Edit this page
View Source
Equals(DWriteUnderline)
Declaration
public readonly bool Equals(DWriteUnderline 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 DWriteUnderline NativeReadFrom(nint buffer)
Parameters
| Type |
Name |
Description |
| nint |
buffer |
|
Returns
|
Edit this page
View Source
NativeReadFrom(nint, Span<DWriteUnderline>)
Declaration
public static void NativeReadFrom(nint buffer, Span<DWriteUnderline> 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 DWriteUnderline)
Declaration
public static void NativeWriteTo(nint buffer, in DWriteUnderline obj)
Parameters
|
Edit this page
View Source
NativeWriteTo(nint, ReadOnlySpan<DWriteUnderline>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<DWriteUnderline> objects)
Parameters
Operators
|
Edit this page
View Source
operator ==(DWriteUnderline, DWriteUnderline)
Declaration
public static bool operator ==(DWriteUnderline left, DWriteUnderline right)
Parameters
Returns
|
Edit this page
View Source
operator !=(DWriteUnderline, DWriteUnderline)
Declaration
public static bool operator !=(DWriteUnderline left, DWriteUnderline right)
Parameters
Returns
Implements