TextStudioCornerOffsets
public readonly struct TextStudioCornerOffsetsIndependent 2D offsets for the four vertices of a glyph quad. Values use Text Studio effect units and are applied before the glyph transform.
Fields
Section titled “Fields”
public static readonly TextStudioCornerOffsets ZeroReturns
TextStudio.TextStudioCornerOffsets
Constructors
Section titled “Constructors”
TextStudioCornerOffsets(Vector2, Vector2, Vector2, Vector2)
Section titled “TextStudioCornerOffsets(Vector2, Vector2, Vector2, Vector2)”public TextStudioCornerOffsets(Vector2 bottomLeft, Vector2 topLeft, Vector2 topRight, Vector2 bottomRight)Creates canonical bottom-left, top-left, top-right, and bottom-right offsets in effect units.
Parameters
| Name | Type |
|---|---|
bottomLeft |
UnityEngine.Vector2 |
topLeft |
UnityEngine.Vector2 |
topRight |
UnityEngine.Vector2 |
bottomRight |
UnityEngine.Vector2 |
Methods
Section titled “Methods”
GetCanonicalVertexOffset(int)
Section titled “GetCanonicalVertexOffset(int)”public Vector2 GetCanonicalVertexOffset(int vertexIndex)Gets an offset using canonical TMP quad vertex order, or zero for an invalid index.
Parameters
| Name | Type |
|---|---|
vertexIndex |
System.Int32 |
Returns
UnityEngine.Vector2
Add(in TextStudioCornerOffsets, in TextStudioCornerOffsets)
Section titled “Add(in TextStudioCornerOffsets, in TextStudioCornerOffsets)”public static TextStudioCornerOffsets Add(in TextStudioCornerOffsets a, in TextStudioCornerOffsets b)Adds corresponding corner offsets.
Parameters
| Name | Type |
|---|---|
a |
TextStudio.TextStudioCornerOffsets |
b |
TextStudio.TextStudioCornerOffsets |
Returns
TextStudio.TextStudioCornerOffsets
Scale(in TextStudioCornerOffsets, float)
Section titled “Scale(in TextStudioCornerOffsets, float)”public static TextStudioCornerOffsets Scale(in TextStudioCornerOffsets value, float scale)Multiplies every corner offset by one scalar.
Parameters
| Name | Type |
|---|---|
value |
TextStudio.TextStudioCornerOffsets |
scale |
System.Single |
Returns
TextStudio.TextStudioCornerOffsets
Multiply(in TextStudioCornerOffsets, in TextStudioCornerOffsets)
Section titled “Multiply(in TextStudioCornerOffsets, in TextStudioCornerOffsets)”public static TextStudioCornerOffsets Multiply(in TextStudioCornerOffsets a, in TextStudioCornerOffsets b)Multiplies corresponding corner offset components.
Parameters
| Name | Type |
|---|---|
a |
TextStudio.TextStudioCornerOffsets |
b |
TextStudio.TextStudioCornerOffsets |
Returns
TextStudio.TextStudioCornerOffsets
Lerp(in TextStudioCornerOffsets, in TextStudioCornerOffsets, float)
Section titled “Lerp(in TextStudioCornerOffsets, in TextStudioCornerOffsets, float)”public static TextStudioCornerOffsets Lerp(in TextStudioCornerOffsets a, in TextStudioCornerOffsets b, float t)Interpolates corresponding corners with a clamped normalized amount.
Parameters
| Name | Type |
|---|---|
a |
TextStudio.TextStudioCornerOffsets |
b |
TextStudio.TextStudioCornerOffsets |
t |
System.Single |
Returns
TextStudio.TextStudioCornerOffsets
Properties
Section titled “Properties”
BottomLeft
Section titled “BottomLeft”public Vector2 BottomLeft { get; }Returns
UnityEngine.Vector2
TopLeft
Section titled “TopLeft”public Vector2 TopLeft { get; }Returns
UnityEngine.Vector2
TopRight
Section titled “TopRight”public Vector2 TopRight { get; }Returns
UnityEngine.Vector2
BottomRight
Section titled “BottomRight”public Vector2 BottomRight { get; }Returns
UnityEngine.Vector2