159 {
161 if (sourceRectangle.HasValue)
162 {
163 sourceRectangle2.X = sourceRectangle.Value.
X;
164 sourceRectangle2.Y = sourceRectangle.Value.Y;
165 sourceRectangle2.Z = sourceRectangle.Value.Width;
166 sourceRectangle2.W = sourceRectangle.Value.Height;
167 }
168 else
169 {
170 sourceRectangle2.X = 0f;
171 sourceRectangle2.Y = 0f;
172 sourceRectangle2.Z = texture.
Width;
173 sourceRectangle2.W = texture.
Height;
174 }
176 texCoordTL.X = sourceRectangle2.X / (float)texture.
Width;
177 texCoordTL.Y = sourceRectangle2.Y / (float)texture.
Height;
179 texCoordBR.X = (sourceRectangle2.X + sourceRectangle2.
Z) / (
float)texture.
Width;
180 texCoordBR.Y = (sourceRectangle2.Y + sourceRectangle2.
W) / (
float)texture.
Height;
182 {
183 float y = texCoordBR.
Y;
184 texCoordBR.Y = texCoordTL.Y;
185 texCoordTL.Y = y;
186 }
188 {
189 float x = texCoordBR.
X;
190 texCoordBR.X = texCoordTL.X;
191 texCoordTL.X = x;
192 }
193 QueueSprite(destinationRectangle, -origin, colors, sourceRectangle2, texCoordTL, texCoordBR, texture, depth, rotation);
194 }
void QueueSprite(Vector4 destinationRect, Vector2 origin, VertexColors colors, Vector4 sourceRectangle, Vector2 texCoordTL, Vector2 texCoordBR, Texture2D texture, float depth, float rotation)