Struct GlyphRect
A rectangle that defines the position of a glyph within an atlas texture.
Assembly: UnityEngine.dll
Syntax
[Serializable]
public struct GlyphRect : IEquatable<GlyphRect>
Constructors
|
Improve this Doc
View Source
GlyphRect(Int32, Int32, Int32, Int32)
Constructor for new GlyphRect.
Declaration
public GlyphRect(int x, int y, int width, int height)
Parameters
Type |
Name |
Description |
Int32 |
x |
The x position of the glyph in the atlas texture.
|
Int32 |
y |
The y position of the glyph in the atlas texture.
|
Int32 |
width |
The width of the glyph.
|
Int32 |
height |
The height of the glyph.
|
|
Improve this Doc
View Source
GlyphRect(Rect)
Construct new GlyphRect from a Rect.
Declaration
public GlyphRect(Rect rect)
Parameters
Type |
Name |
Description |
Rect |
rect |
The Rect used to construct the new GlyphRect.
|
Properties
|
Improve this Doc
View Source
height
Declaration
public int height { get; set; }
Property Value
|
Improve this Doc
View Source
width
Declaration
public int width { get; set; }
Property Value
|
Improve this Doc
View Source
x
The x position of the glyph in the font atlas texture.
Declaration
public int x { get; set; }
Property Value
|
Improve this Doc
View Source
y
The y position of the glyph in the font atlas texture.
Declaration
public int y { get; set; }
Property Value
|
Improve this Doc
View Source
zero
A GlyphRect with all values set to zero. Shorthand for writing GlyphRect(0, 0, 0, 0).
Declaration
public static GlyphRect zero { get; }
Property Value
Methods
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
|
Improve this Doc
View Source
Equals(GlyphRect)
Declaration
public bool Equals(GlyphRect other)
Parameters
Returns
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
Operators
|
Improve this Doc
View Source
Equality(GlyphRect, GlyphRect)
Declaration
public static bool operator ==(GlyphRect lhs, GlyphRect rhs)
Parameters
Returns
|
Improve this Doc
View Source
Inequality(GlyphRect, GlyphRect)
Declaration
public static bool operator !=(GlyphRect lhs, GlyphRect rhs)
Parameters
Returns
Implements
Extension Methods