Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DrawData.cs
Go to the documentation of this file.
3
5
6public struct DrawData
7{
9
11
13
15
16 public Color color;
17
18 public float rotation;
19
21
22 public Vector2 scale;
23
25
26 public int shader;
27
29
30 public readonly bool useDestinationRectangle;
31
32 public static Rectangle? nullRectangle;
33
35 {
36 this.texture = texture;
37 this.position = position;
38 this.color = color;
41 rotation = 0f;
44 effect = SpriteEffects.None;
45 shader = 0;
48 }
49
51 {
52 this.texture = texture;
53 this.position = position;
54 this.color = color;
56 this.sourceRect = sourceRect;
57 rotation = 0f;
60 effect = SpriteEffects.None;
61 shader = 0;
64 }
65
67 {
68 this.texture = texture;
69 this.position = position;
70 this.sourceRect = sourceRect;
71 this.color = color;
72 this.rotation = rotation;
73 this.origin = origin;
74 this.scale = new Vector2(scale, scale);
75 this.effect = effect;
77 shader = 0;
80 }
81
83 {
84 this.texture = texture;
85 this.position = position;
86 this.sourceRect = sourceRect;
87 this.color = color;
88 this.rotation = rotation;
89 this.origin = origin;
90 this.scale = scale;
91 this.effect = effect;
93 shader = 0;
96 }
97
99 {
100 this.texture = texture;
101 this.destinationRectangle = destinationRectangle;
102 this.color = color;
105 rotation = 0f;
107 scale = Vector2.One;
108 effect = SpriteEffects.None;
109 shader = 0;
110 ignorePlayerRotation = false;
112 }
113
115 {
116 this.texture = texture;
117 this.destinationRectangle = destinationRectangle;
118 this.color = color;
120 this.sourceRect = sourceRect;
121 rotation = 0f;
123 scale = Vector2.One;
124 effect = SpriteEffects.None;
125 shader = 0;
126 ignorePlayerRotation = false;
128 }
129
131 {
132 this.texture = texture;
133 this.destinationRectangle = destinationRectangle;
134 this.sourceRect = sourceRect;
135 this.color = color;
136 this.rotation = rotation;
137 this.origin = origin;
138 this.effect = effect;
140 scale = Vector2.One;
141 shader = 0;
142 ignorePlayerRotation = false;
144 }
145
146 public void Draw(SpriteBatch sb)
147 {
149 {
151 }
152 else
153 {
155 }
156 }
157
158 public void Draw(SpriteDrawBuffer sb)
159 {
161 {
163 }
164 else
165 {
167 }
168 }
169}
void Draw(Texture2D texture, Vector2 position, Color color)
void Draw(Texture2D texture, Vector2 position, VertexColors colors)
DrawData(Texture2D texture, Rectangle destinationRectangle, Color color)
Definition DrawData.cs:98
DrawData(Texture2D texture, Vector2 position, Rectangle? sourceRect, Color color)
Definition DrawData.cs:50
void Draw(SpriteDrawBuffer sb)
Definition DrawData.cs:158
void Draw(SpriteBatch sb)
Definition DrawData.cs:146
DrawData(Texture2D texture, Rectangle destinationRectangle, Rectangle? sourceRect, Color color)
Definition DrawData.cs:114
DrawData(Texture2D texture, Vector2 position, Rectangle? sourceRect, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effect, float inactiveLayerDepth=0f)
Definition DrawData.cs:82
readonly bool useDestinationRectangle
Definition DrawData.cs:30
static ? Rectangle nullRectangle
Definition DrawData.cs:32
DrawData(Texture2D texture, Vector2 position, Rectangle? sourceRect, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effect, float inactiveLayerDepth=0f)
Definition DrawData.cs:66
DrawData(Texture2D texture, Rectangle destinationRectangle, Rectangle? sourceRect, Color color, float rotation, Vector2 origin, SpriteEffects effect, float inactiveLayerDepth=0f)
Definition DrawData.cs:130
DrawData(Texture2D texture, Vector2 position, Color color)
Definition DrawData.cs:34