Show / Hide Table of Contents

Struct GlyphRect

A rectangle that defines the position of a glyph within an atlas texture.

Implements
IEquatable<GlyphRect>
Inherited Members
ValueType.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Namespace: UnityEngine.TextCore
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

The height of the glyph.

Declaration
public int height { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

width

The width of the glyph.

Declaration
public int width { get; set; }
Property Value
Type Description
Int32
| 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
Type Description
Int32
| 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
Type Description
Int32
| 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
Type Description
GlyphRect

Methods

| Improve this Doc View Source

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
ValueType.Equals(Object)
| Improve this Doc View Source

Equals(GlyphRect)

Declaration
public bool Equals(GlyphRect other)
Parameters
Type Name Description
GlyphRect other
Returns
Type Description
Boolean
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
ValueType.GetHashCode()

Operators

| Improve this Doc View Source

Equality(GlyphRect, GlyphRect)

Declaration
public static bool operator ==(GlyphRect lhs, GlyphRect rhs)
Parameters
Type Name Description
GlyphRect lhs
GlyphRect rhs
Returns
Type Description
Boolean
| Improve this Doc View Source

Inequality(GlyphRect, GlyphRect)

Declaration
public static bool operator !=(GlyphRect lhs, GlyphRect rhs)
Parameters
Type Name Description
GlyphRect lhs
GlyphRect rhs
Returns
Type Description
Boolean

Implements

System.IEquatable<T>

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX