forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCharacterInfo.cs
More file actions
131 lines (131 loc) · 2.37 KB
/
Copy pathCharacterInfo.cs
File metadata and controls
131 lines (131 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
using System;
namespace UnityEngine
{
public struct CharacterInfo
{
public int index;
[Obsolete("CharacterInfo.uv is deprecated. Use uvBottomLeft, uvBottomRight, uvTopRight or uvTopLeft instead.")]
public Rect uv;
[Obsolete("CharacterInfo.vert is deprecated. Use minX, maxX, minY, maxY instead.")]
public Rect vert;
[Obsolete("CharacterInfo.width is deprecated. Use advance instead.")]
public float width;
public int size;
public FontStyle style;
[Obsolete("CharacterInfo.flipped is deprecated. Use uvBottomLeft, uvBottomRight, uvTopRight or uvTopLeft instead, which will be correct regardless of orientation.")]
public bool flipped;
private int ascent;
public int advance
{
get
{
return (int)this.width;
}
}
public int glyphWidth
{
get
{
return (int)this.vert.width;
}
}
public int glyphHeight
{
get
{
return (int)(-(int)this.vert.height);
}
}
public int bearing
{
get
{
return (int)this.vert.x;
}
}
public int minY
{
get
{
return this.ascent + (int)(this.vert.y + this.vert.height);
}
}
public int maxY
{
get
{
return this.ascent + (int)this.vert.y;
}
}
public int minX
{
get
{
return (int)this.vert.x;
}
}
public int maxX
{
get
{
return (int)(this.vert.x + this.vert.width);
}
}
internal Vector2 uvBottomLeftUnFlipped
{
get
{
return new Vector2(this.uv.x, this.uv.y);
}
}
internal Vector2 uvBottomRightUnFlipped
{
get
{
return new Vector2(this.uv.x + this.uv.width, this.uv.y);
}
}
internal Vector2 uvTopRightUnFlipped
{
get
{
return new Vector2(this.uv.x + this.uv.width, this.uv.y + this.uv.height);
}
}
internal Vector2 uvTopLeftUnFlipped
{
get
{
return new Vector2(this.uv.x, this.uv.y + this.uv.height);
}
}
public Vector2 uvBottomLeft
{
get
{
return (!this.flipped) ? this.uvBottomLeftUnFlipped : this.uvBottomLeftUnFlipped;
}
}
public Vector2 uvBottomRight
{
get
{
return (!this.flipped) ? this.uvBottomRightUnFlipped : this.uvTopLeftUnFlipped;
}
}
public Vector2 uvTopRight
{
get
{
return (!this.flipped) ? this.uvTopRightUnFlipped : this.uvTopRightUnFlipped;
}
}
public Vector2 uvTopLeft
{
get
{
return (!this.flipped) ? this.uvTopLeftUnFlipped : this.uvBottomRightUnFlipped;
}
}
}
}