Struct DWriteLineMetrics
The DWRITE_LINE_METRICS structure contains information about a formatted line of text.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DWrite
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
public struct DWriteLineMetrics : IEquatable<DWriteLineMetrics>
Properties
| Edit this page View SourceBaseline
Gets the distance from the top of the line to its baseline.
Declaration
public float Baseline { get; }
Property Value
Type | Description |
---|---|
float |
Height
Gets the height of the line as measured from top to bottom.
Declaration
public float Height { get; }
Property Value
Type | Description |
---|---|
float |
IsTrimmed
Gets a value indicating whether the line is trimmed.
Declaration
public bool IsTrimmed { get; }
Property Value
Type | Description |
---|---|
bool |
Length
Gets the number of total text positions in the line. This includes any trailing whitespace and newline characters.
Declaration
public uint Length { get; }
Property Value
Type | Description |
---|---|
uint |
NewlineLength
Gets the number of characters in the newline sequence at the end of the line. If the count is zero, then the line was either wrapped or it is the end of the text.
Declaration
public uint NewlineLength { get; }
Property Value
Type | Description |
---|---|
uint |
TrailingWhitespaceLength
Gets the number of whitespace positions at the end of the line. Newline sequences are considered whitespace.
Declaration
public uint TrailingWhitespaceLength { get; }
Property Value
Type | Description |
---|---|
uint |
Methods
| Edit this page View SourceEquals(DWriteLineMetrics)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(DWriteLineMetrics other)
Parameters
Type | Name | Description |
---|---|---|
DWriteLineMetrics | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
Operators
| Edit this page View Sourceoperator ==(DWriteLineMetrics, DWriteLineMetrics)
Compares two DWriteLineMetrics objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(DWriteLineMetrics left, DWriteLineMetrics right)
Parameters
Type | Name | Description |
---|---|---|
DWriteLineMetrics | left | The left DWriteLineMetrics to compare. |
DWriteLineMetrics | right | The right DWriteLineMetrics to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(DWriteLineMetrics, DWriteLineMetrics)
Compares two DWriteLineMetrics objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(DWriteLineMetrics left, DWriteLineMetrics right)
Parameters
Type | Name | Description |
---|---|---|
DWriteLineMetrics | left | The left DWriteLineMetrics to compare. |
DWriteLineMetrics | right | The right DWriteLineMetrics to compare. |
Returns
Type | Description |
---|---|
bool |