Struct DWriteGlyphOffset
Optional adjustment to a glyph's position. A glyph offset changes the position of a glyph without affecting the pen position. Offsets are in logical, pre-transform units.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DWrite
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
public struct DWriteGlyphOffset : IEquatable<DWriteGlyphOffset>
Constructors
| Edit this page View SourceDWriteGlyphOffset(float, float)
Initializes a new instance of the DWriteGlyphOffset struct.
Declaration
public DWriteGlyphOffset(float advanceOffset, float ascenderOffset)
Parameters
Type | Name | Description |
---|---|---|
float | advanceOffset | Offset in the advance direction of the run. |
float | ascenderOffset | Offset in the ascent direction, i.e., the direction ascenders point. |
Properties
| Edit this page View SourceAdvanceOffset
Gets or sets the offset in the advance direction of the run. A positive advance offset moves the glyph to the right (in pre-transform coordinates) if the run is left-to-right or to the left if the run is right-to-left.
Declaration
public float AdvanceOffset { get; set; }
Property Value
Type | Description |
---|---|
float |
AscenderOffset
Gets or sets the offset in the ascent direction, i.e., the direction ascenders point. A positive ascender offset moves the glyph up (in pre-transform coordinates).
Declaration
public float AscenderOffset { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceEquals(DWriteGlyphOffset)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(DWriteGlyphOffset other)
Parameters
Type | Name | Description |
---|---|---|
DWriteGlyphOffset | 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 ==(DWriteGlyphOffset, DWriteGlyphOffset)
Compares two DWriteGlyphOffset objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(DWriteGlyphOffset left, DWriteGlyphOffset right)
Parameters
Type | Name | Description |
---|---|---|
DWriteGlyphOffset | left | The left DWriteGlyphOffset to compare. |
DWriteGlyphOffset | right | The right DWriteGlyphOffset to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(DWriteGlyphOffset, DWriteGlyphOffset)
Compares two DWriteGlyphOffset objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(DWriteGlyphOffset left, DWriteGlyphOffset right)
Parameters
Type | Name | Description |
---|---|---|
DWriteGlyphOffset | left | The left DWriteGlyphOffset to compare. |
DWriteGlyphOffset | right | The right DWriteGlyphOffset to compare. |
Returns
Type | Description |
---|---|
bool |