fork
Configure Feed
Select the types of activity you want to include in your feed.
this repo has no description
fork
Configure Feed
Select the types of activity you want to include in your feed.
1// Copyright (c) 2021 ezequias2d <ezequiasmoises@gmail.com> and the Peridot contributors
2// This code is licensed under MIT license (see LICENSE for details)
3
4using System.Drawing;
5using System.Numerics;
6
7namespace Peridot;
8
9/// <summary>
10/// Represents a interface for drawing sprites in one or more optimized batches.
11/// </summary>
12public interface ISpriteBatch : IDisposable
13{
14 /// <summary>
15 /// A bool indicating whether this instance has been disposed.
16 /// </summary>
17 public bool IsDisposed { get; }
18
19 /// <summary>
20 /// The view matrix to use to renderer.
21 /// </summary>
22 public Matrix4x4 ViewMatrix { get; set; }
23
24 /// <summary>
25 /// The scissor rectangle.
26 /// </summary>
27 public RectangleF Scissor { get; set; }
28
29 /// <summary>
30 /// Resets the <see cref="Scissor"/> to default value.
31 /// </summary>
32 public void ResetScissor();
33
34 /// <summary>
35 /// Replaces the <see cref="Scissor"/> with the intersection of itself
36 /// and the <paramref name="clip"/> rectangle.
37 /// </summary>
38 /// <param name="clip">The rectangle to intersects.</param>
39 public void IntersectScissor(RectangleF clip);
40
41 /// <summary>
42 /// Begins the sprite branch.
43 /// </summary>
44 /// <exception cref="InvalidOperationException">Thrown if <see cref="Begin"/> is called next time without previous <see cref="End"/>.</exception>
45 public void Begin();
46
47 /// <summary>
48 /// Flushes all batched text and sprites to the screen.
49 /// </summary>
50 /// <exception cref="InvalidOperationException">This command should be called after <see cref="Begin"/> and drawing commands.</exception>
51 public void End();
52
53 /// <summary>
54 /// Submit sprite draw in the batch.
55 /// </summary>
56 /// <param name="image">The source image.</param>
57 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
58 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
59 /// <param name="color">Color multiplier.</param>
60 /// <param name="rotation">The rotation of the sprite.</param>
61 /// <param name="origin">Sprite center.</param>
62 /// <param name="options">Options that modify the drawing.</param>
63 /// <param name="layerDepth">A layer depth of this drawing.</param>
64 public void Draw(Image image,
65 RectangleF destinationRectangle,
66 RectangleF sourceRectangle,
67 Color color,
68 float rotation,
69 Vector2 origin,
70 SpriteOptions options,
71 float layerDepth);
72
73 /// <summary>
74 /// Submit sprite draw in the batch.
75 /// </summary>
76 /// <param name="image">The source image.</param>
77 /// <param name="position">The drawing location on screen.</param>
78 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
79 /// <param name="color">Color multiplier.</param>
80 /// <param name="rotation">The rotation of the sprite.</param>
81 /// <param name="origin">Sprite center.</param>
82 /// <param name="scale">A scaling of this sprite.</param>
83 /// <param name="options">Options that modify the drawing.</param>
84 /// <param name="layerDepth">A layer depth of this drawing.</param>
85 public void Draw(Image image,
86 Vector2 position,
87 RectangleF sourceRectangle,
88 Color color,
89 float rotation,
90 Vector2 origin,
91 Vector2 scale,
92 SpriteOptions options,
93 float layerDepth);
94
95 /// <summary>
96 /// Submit sprite draw in the batch.
97 /// </summary>
98 /// <param name="image">The source image.</param>
99 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
100 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
101 /// <param name="color">Color multiplier.</param>
102 /// <param name="rotation">The rotation of the sprite.</param>
103 /// <param name="origin">Sprite center.</param>
104 /// <param name="layerDepth">A layer depth of this drawing.</param>
105 public void Draw(Image image,
106 RectangleF destinationRectangle,
107 RectangleF sourceRectangle,
108 Color color,
109 float rotation,
110 Vector2 origin,
111 float layerDepth);
112
113 /// <summary>
114 /// Submit sprite draw in the batch.
115 /// </summary>
116 /// <param name="image">The source image.</param>
117 /// <param name="position">The drawing location on screen.</param>
118 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
119 /// <param name="color">Color multiplier.</param>
120 /// <param name="rotation">The rotation of the sprite.</param>
121 /// <param name="origin">Sprite center.</param>
122 /// <param name="scale">A scaling of this sprite.</param>
123 /// <param name="layerDepth">A layer depth of this drawing.</param>
124 public void Draw(Image image,
125 Vector2 position,
126 RectangleF sourceRectangle,
127 Color color,
128 float rotation,
129 Vector2 origin,
130 Vector2 scale,
131 float layerDepth);
132
133 /// <summary>
134 /// Submit a sprite for drawing in the current batch.
135 /// </summary>
136 /// <param name="image">The source image.</param>
137 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
138 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
139 /// <param name="color">Color multiplier.</param>
140 /// <param name="rotation">A rotation of this sprite.</param>
141 /// <param name="origin">Sprite center.</param>
142 /// <param name="options">Options that modify the drawing.</param>
143 /// <param name="layerDepth">A layer depth of this drawing.</param>
144 public void Draw(Image image,
145 RectangleF destinationRectangle,
146 RectangleF? sourceRectangle,
147 Color color,
148 float rotation,
149 Vector2 origin,
150 SpriteOptions options,
151 float layerDepth);
152
153 /// <summary>
154 /// Submit a sprite for drawing in the current batch.
155 /// </summary>
156 /// <param name="image">The source image.</param>
157 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
158 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
159 /// <param name="color">Color multiplier.</param>
160 /// <param name="rotation">A rotation of this sprite.</param>
161 /// <param name="origin">Sprite center.</param>
162 /// <param name="layerDepth">A layer depth of this drawing.</param>
163 public void Draw(Image image,
164 RectangleF destinationRectangle,
165 RectangleF? sourceRectangle,
166 Color color,
167 float rotation,
168 Vector2 origin,
169 float layerDepth);
170
171 /// <summary>
172 /// Submit sprite draw in the batch.
173 /// </summary>
174 /// <param name="image">The source image.</param>
175 /// <param name="position">The drawing location on screen.</param>
176 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
177 /// <param name="color">Color multiplier.</param>
178 /// <param name="rotation">The rotation of the sprite.</param>
179 /// <param name="origin">Sprite center.</param>
180 /// <param name="scale">A scaling of this sprite.</param>
181 /// <param name="options">Options that modify the drawing.</param>
182 /// <param name="layerDepth">A layer depth of this drawing.</param>
183 public void Draw(Image image,
184 Vector2 position,
185 RectangleF? sourceRectangle,
186 Color color,
187 float rotation,
188 Vector2 origin,
189 Vector2 scale,
190 SpriteOptions options,
191 float layerDepth);
192
193 /// <summary>
194 /// Submit sprite draw in the batch.
195 /// </summary>
196 /// <param name="image">The source image.</param>
197 /// <param name="position">The drawing location on screen.</param>
198 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
199 /// <param name="color">Color multiplier.</param>
200 /// <param name="rotation">The rotation of the sprite.</param>
201 /// <param name="origin">Sprite center.</param>
202 /// <param name="scale">A scaling of this sprite.</param>
203 /// <param name="layerDepth">A layer depth of this drawing.</param>
204 public void Draw(Image image,
205 Vector2 position,
206 RectangleF? sourceRectangle,
207 Color color,
208 float rotation,
209 Vector2 origin,
210 Vector2 scale,
211 float layerDepth);
212
213 /// <summary>
214 /// Submit a sprite for drawing in the current batch.
215 /// </summary>
216 /// <param name="image">The source image.</param>
217 /// <param name="position">The drawing location on screen.</param>
218 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
219 /// <param name="color">Color multiplier.</param>
220 /// <param name="rotation">A rotation of this sprite.</param>
221 /// <param name="origin">Sprite center.</param>
222 /// <param name="scale">A scaling of this sprite.</param>
223 /// <param name="options">Options that modify the drawing.</param>
224 /// <param name="layerDepth">A layer depth of this drawing.</param>
225 public void Draw(Image image,
226 Vector2 position,
227 RectangleF? sourceRectangle,
228 Color color,
229 float rotation,
230 Vector2 origin,
231 float scale,
232 SpriteOptions options,
233 float layerDepth);
234
235 /// <summary>
236 /// Submit a sprite for drawing in the current batch.
237 /// </summary>
238 /// <param name="image">The source image.</param>
239 /// <param name="position">The drawing location on screen.</param>
240 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
241 /// <param name="color">Color multiplier.</param>
242 /// <param name="rotation">A rotation of this sprite.</param>
243 /// <param name="origin">Sprite center.</param>
244 /// <param name="scale">A scaling of this sprite.</param>
245 /// <param name="layerDepth">A layer depth of this drawing.</param>
246 public void Draw(Image image,
247 Vector2 position,
248 RectangleF? sourceRectangle,
249 Color color,
250 float rotation,
251 Vector2 origin,
252 float scale,
253 float layerDepth);
254
255 /// <summary>
256 /// Submit a sprite for drawing in the current batch.
257 /// </summary>
258 /// <param name="image">The source image.</param>
259 /// <param name="position">The drawing location on screen.</param>
260 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
261 /// <param name="color">Color multiplier.</param>
262 /// <param name="options">Options that modify the drawing.</param>
263 /// <param name="layerDepth">A layer depth of this drawing.</param>
264 public void Draw(Image image,
265 Vector2 position,
266 RectangleF? sourceRectangle,
267 Color color,
268 SpriteOptions options,
269 float layerDepth);
270
271 /// <summary>
272 /// Submit a sprite for drawing in the current batch.
273 /// </summary>
274 /// <param name="image">The source image.</param>
275 /// <param name="position">The drawing location on screen.</param>
276 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
277 /// /// <param name="color">Color multiplier.</param>
278 /// <param name="layerDepth">A layer depth of this drawing.</param>
279 public void Draw(Image image,
280 Vector2 position,
281 RectangleF? sourceRectangle,
282 Color color,
283 float layerDepth);
284
285 /// <summary>
286 /// Submit a sprite for drawing in the current batch.
287 /// </summary>
288 /// <param name="image"> The source image.</param>
289 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
290 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
291 /// <param name="color">Color multiplier.</param>
292 /// <param name="options">Options that modify the drawing.</param>
293 /// <param name="layerDepth">A layer depth of this drawing.</param>
294 public void Draw(Image image,
295 RectangleF destinationRectangle,
296 RectangleF? sourceRectangle,
297 Color color,
298 SpriteOptions options,
299 float layerDepth);
300
301 /// <summary>
302 /// Submit a sprite for drawing in the current batch.
303 /// </summary>
304 /// <param name="image">The source image.</param>
305 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
306 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
307 /// <param name="color">Color multiplier.</param>
308 /// <param name="layerDepth">A layer depth of this drawing.</param>
309 public void Draw(Image image,
310 RectangleF destinationRectangle,
311 RectangleF? sourceRectangle,
312 Color color,
313 float layerDepth);
314
315 /// <summary>
316 /// Submit a sprite for drawing in the current batch.
317 /// </summary>
318 /// <param name="image">The source image.</param>
319 /// <param name="position">The drawing location on screen.</param>
320 /// <param name="color">Color multiplier.</param>
321 /// <param name="options">Options that modify the drawing.</param>
322 /// <param name="layerDepth">A layer depth of this drawing.</param>
323 public void Draw(Image image,
324 Vector2 position,
325 Color color,
326 SpriteOptions options,
327 float layerDepth);
328
329 /// <summary>
330 /// Submit a sprite for drawing in the current batch.
331 /// </summary>
332 /// <param name="image">The source image.</param>
333 /// <param name="position">The drawing location on screen.</param>
334 /// <param name="color">Color multiplier.</param>
335 /// <param name="layerDepth">A layer depth of this drawing.</param>
336 public void Draw(Image image,
337 Vector2 position,
338 Color color,
339 float layerDepth);
340
341 /// <summary>
342 /// Submit a sprite for drawing in the current batch.
343 /// </summary>
344 /// <param name="image">The source image.</param>
345 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
346 /// <param name="color">Color multiplier.</param>
347 /// <param name="options">Options that modify the drawing.</param>
348 /// <param name="layerDepth">A layer depth of this drawing.</param>
349 public void Draw(Image image,
350 RectangleF destinationRectangle,
351 Color color,
352 SpriteOptions options,
353 float layerDepth);
354
355 /// <summary>
356 /// Submit a sprite for drawing in the current batch.
357 /// </summary>
358 /// <param name="image">The source image.</param>
359 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
360 /// <param name="color">Color multiplier.</param>
361 /// <param name="layerDepth">A layer depth of this drawing.</param>
362 public void Draw(Image image,
363 RectangleF destinationRectangle,
364 Color color,
365 float layerDepth);
366
367 #region Draw without image
368 /// <summary>
369 /// Submit a rectangle for drawing in the current batch.
370 /// </summary>
371 /// <param name="rectangle">The drawing bounds on screen.</param>
372 /// <param name="color">Color multiplier.</param>
373 /// <param name="rotation">The rotation of the sprite.</param>
374 /// <param name="origin">Sprite center.</param>
375 /// <param name="layerDepth">A layer depth of this drawing.</param>
376 public void DrawRect(
377 RectangleF rectangle,
378 Color color,
379 float rotation,
380 Vector2 origin,
381 float layerDepth);
382
383 /// <summary>
384 /// Submit a rectangle for drawing in the current batch.
385 /// </summary>
386 /// <param name="rectangle">The drawing bounds on screen.</param>
387 /// <param name="color">Color multiplier.</param>
388 /// <param name="layerDepth">A layer depth of this drawing.</param>
389 public void DrawRect(
390 RectangleF rectangle,
391 Color color,
392 float layerDepth);
393
394 /// <summary>
395 /// Submit a square for drawing in the current batch.Vector2.Zero
396 /// </summary>
397 /// <param name="position">The drawing location on screen.</param>
398 /// <param name="size">The size of quad</param>
399 /// <param name="color">Color multiplier.</param>
400 /// <param name="layerDepth">A layer depth of this drawing.</param>
401 public void DrawDot(
402 Vector2 position,
403 float size,
404 Color color,
405 float layerDepth);
406
407 /// <summary>
408 /// Submit a line segment for drawing in the current batch.
409 /// </summary>
410 /// <param name="a">Endpoint A.</param>
411 /// <param name="b">Endpoint B</param>
412 /// <param name="color">Color.</param>
413 /// <param name="thickness">Line segment thickness.</param>
414 /// <param name="layerDepth">A layer depth of this drawing.</param>
415 public void DrawSegment(
416 Vector2 a,
417 Vector2 b,
418 Color color,
419 float thickness,
420 float layerDepth);
421
422 /// <summary>
423 /// Submit a line segment for drawing in the current batch.
424 /// </summary>
425 /// <param name="start">The reference endpoint.</param>
426 /// <param name="length">The segment length.</param>
427 /// <param name="angle">The segment angle.</param>
428 /// <param name="color">The angle at start.</param>
429 /// <param name="thickness">Line segment thickness.</param>
430 /// <param name="layerDepth">A layer depth of this drawing.</param>
431 public void DrawSegment(
432 Vector2 start,
433 float length,
434 Color color,
435 float angle,
436 float thickness,
437 float layerDepth);
438 #endregion
439}
440
441/// <summary>
442/// Represents a interface for drawing sprites in one or more optimized batches.
443/// </summary>
444public interface ISpriteBatch<TTexture> : ISpriteBatch
445{
446 /// <summary>
447 /// Submit sprite draw in the batch.
448 /// </summary>
449 /// <param name="image">The source image.</param>
450 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
451 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
452 /// <param name="color">Color multiplier.</param>
453 /// <param name="rotation">The rotation of the sprite.</param>
454 /// <param name="origin">Sprite center.</param>
455 /// <param name="options">Options that modify the drawing.</param>
456 /// <param name="layerDepth">A layer depth of this drawing.</param>
457 public void Draw(TTexture image,
458 RectangleF destinationRectangle,
459 RectangleF sourceRectangle,
460 Color color,
461 float rotation,
462 Vector2 origin,
463 SpriteOptions options,
464 float layerDepth);
465
466 /// <summary>
467 /// Submit sprite draw in the batch.
468 /// </summary>
469 /// <param name="image">The source image.</param>
470 /// <param name="position">The drawing location on screen.</param>
471 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
472 /// <param name="color">Color multiplier.</param>
473 /// <param name="rotation">The rotation of the sprite.</param>
474 /// <param name="origin">Sprite center.</param>
475 /// <param name="scale">A scaling of this sprite.</param>
476 /// <param name="options">Options that modify the drawing.</param>
477 /// <param name="layerDepth">A layer depth of this drawing.</param>
478 public void Draw(TTexture image,
479 Vector2 position,
480 RectangleF sourceRectangle,
481 Color color,
482 float rotation,
483 Vector2 origin,
484 Vector2 scale,
485 SpriteOptions options,
486 float layerDepth);
487
488 /// <summary>
489 /// Submit sprite draw in the batch.
490 /// </summary>
491 /// <param name="image">The source image.</param>
492 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
493 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
494 /// <param name="color">Color multiplier.</param>
495 /// <param name="rotation">The rotation of the sprite.</param>
496 /// <param name="origin">Sprite center.</param>
497 /// <param name="layerDepth">A layer depth of this drawing.</param>
498 public void Draw(TTexture image,
499 RectangleF destinationRectangle,
500 RectangleF sourceRectangle,
501 Color color,
502 float rotation,
503 Vector2 origin,
504 float layerDepth);
505
506 /// <summary>
507 /// Submit sprite draw in the batch.
508 /// </summary>
509 /// <param name="image">The source image.</param>
510 /// <param name="position">The drawing location on screen.</param>
511 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
512 /// <param name="color">Color multiplier.</param>
513 /// <param name="rotation">The rotation of the sprite.</param>
514 /// <param name="origin">Sprite center.</param>
515 /// <param name="scale">A scaling of this sprite.</param>
516 /// <param name="layerDepth">A layer depth of this drawing.</param>
517 public void Draw(TTexture image,
518 Vector2 position,
519 RectangleF sourceRectangle,
520 Color color,
521 float rotation,
522 Vector2 origin,
523 Vector2 scale,
524 float layerDepth);
525
526 /// <summary>
527 /// Submit a sprite for drawing in the current batch.
528 /// </summary>
529 /// <param name="image">The source image.</param>
530 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
531 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
532 /// <param name="color">Color multiplier.</param>
533 /// <param name="rotation">A rotation of this sprite.</param>
534 /// <param name="origin">Sprite center.</param>
535 /// <param name="options">Options that modify the drawing.</param>
536 /// <param name="layerDepth">A layer depth of this drawing.</param>
537 public void Draw(TTexture image,
538 RectangleF destinationRectangle,
539 RectangleF? sourceRectangle,
540 Color color,
541 float rotation,
542 Vector2 origin,
543 SpriteOptions options,
544 float layerDepth);
545
546 /// <summary>
547 /// Submit a sprite for drawing in the current batch.
548 /// </summary>
549 /// <param name="image">The source image.</param>
550 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
551 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
552 /// <param name="color">Color multiplier.</param>
553 /// <param name="rotation">A rotation of this sprite.</param>
554 /// <param name="origin">Sprite center.</param>
555 /// <param name="layerDepth">A layer depth of this drawing.</param>
556 public void Draw(TTexture image,
557 RectangleF destinationRectangle,
558 RectangleF? sourceRectangle,
559 Color color,
560 float rotation,
561 Vector2 origin,
562 float layerDepth);
563
564 /// <summary>
565 /// Submit sprite draw in the batch.
566 /// </summary>
567 /// <param name="image">The source image.</param>
568 /// <param name="position">The drawing location on screen.</param>
569 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
570 /// <param name="color">Color multiplier.</param>
571 /// <param name="rotation">The rotation of the sprite.</param>
572 /// <param name="origin">Sprite center.</param>
573 /// <param name="scale">A scaling of this sprite.</param>
574 /// <param name="options">Options that modify the drawing.</param>
575 /// <param name="layerDepth">A layer depth of this drawing.</param>
576 public void Draw(TTexture image,
577 Vector2 position,
578 RectangleF? sourceRectangle,
579 Color color,
580 float rotation,
581 Vector2 origin,
582 Vector2 scale,
583 SpriteOptions options,
584 float layerDepth);
585
586 /// <summary>
587 /// Submit sprite draw in the batch.
588 /// </summary>
589 /// <param name="image">The source image.</param>
590 /// <param name="position">The drawing location on screen.</param>
591 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
592 /// <param name="color">Color multiplier.</param>
593 /// <param name="rotation">The rotation of the sprite.</param>
594 /// <param name="origin">Sprite center.</param>
595 /// <param name="scale">A scaling of this sprite.</param>
596 /// <param name="layerDepth">A layer depth of this drawing.</param>
597 public void Draw(TTexture image,
598 Vector2 position,
599 RectangleF? sourceRectangle,
600 Color color,
601 float rotation,
602 Vector2 origin,
603 Vector2 scale,
604 float layerDepth);
605
606 /// <summary>
607 /// Submit a sprite for drawing in the current batch.
608 /// </summary>
609 /// <param name="image">The source image.</param>
610 /// <param name="position">The drawing location on screen.</param>
611 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
612 /// <param name="color">Color multiplier.</param>
613 /// <param name="rotation">A rotation of this sprite.</param>
614 /// <param name="origin">Sprite center.</param>
615 /// <param name="scale">A scaling of this sprite.</param>
616 /// <param name="options">Options that modify the drawing.</param>
617 /// <param name="layerDepth">A layer depth of this drawing.</param>
618 public void Draw(TTexture image,
619 Vector2 position,
620 RectangleF? sourceRectangle,
621 Color color,
622 float rotation,
623 Vector2 origin,
624 float scale,
625 SpriteOptions options,
626 float layerDepth);
627
628 /// <summary>
629 /// Submit a sprite for drawing in the current batch.
630 /// </summary>
631 /// <param name="image">The source image.</param>
632 /// <param name="position">The drawing location on screen.</param>
633 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
634 /// <param name="color">Color multiplier.</param>
635 /// <param name="rotation">A rotation of this sprite.</param>
636 /// <param name="origin">Sprite center.</param>
637 /// <param name="scale">A scaling of this sprite.</param>
638 /// <param name="layerDepth">A layer depth of this drawing.</param>
639 public void Draw(TTexture image,
640 Vector2 position,
641 RectangleF? sourceRectangle,
642 Color color,
643 float rotation,
644 Vector2 origin,
645 float scale,
646 float layerDepth);
647
648 /// <summary>
649 /// Submit a sprite for drawing in the current batch.
650 /// </summary>
651 /// <param name="image">The source image.</param>
652 /// <param name="position">The drawing location on screen.</param>
653 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
654 /// <param name="color">Color multiplier.</param>
655 /// <param name="options">Options that modify the drawing.</param>
656 /// <param name="layerDepth">A layer depth of this drawing.</param>
657 public void Draw(TTexture image,
658 Vector2 position,
659 RectangleF? sourceRectangle,
660 Color color,
661 SpriteOptions options,
662 float layerDepth);
663
664 /// <summary>
665 /// Submit a sprite for drawing in the current batch.
666 /// </summary>
667 /// <param name="image">The source image.</param>
668 /// <param name="position">The drawing location on screen.</param>
669 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
670 /// <param name="color">Color multiplier.</param>
671 /// <param name="layerDepth">A layer depth of this drawing.</param>
672 public void Draw(TTexture image,
673 Vector2 position,
674 RectangleF? sourceRectangle,
675 Color color,
676 float layerDepth);
677
678 /// <summary>
679 /// Submit a sprite for drawing in the current batch.
680 /// </summary>
681 /// <param name="image">The source image.</param>
682 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
683 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
684 /// <param name="color">Color multiplier.</param>
685 /// <param name="options">Options that modify the drawing.</param>
686 /// <param name="layerDepth">A layer depth of this drawing.</param>
687 public void Draw(TTexture image,
688 RectangleF destinationRectangle,
689 RectangleF? sourceRectangle,
690 Color color,
691 SpriteOptions options,
692 float layerDepth);
693
694 /// <summary>
695 /// Submit a sprite for drawing in the current batch.
696 /// </summary>
697 /// <param name="image">The source image.</param>
698 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
699 /// <param name="sourceRectangle">An optional region on the image which will be rendered. If null - draws full image.</param>
700 /// <param name="color">Color multiplier.</param>
701 /// <param name="layerDepth">A layer depth of this drawing.</param>
702 public void Draw(TTexture image,
703 RectangleF destinationRectangle,
704 RectangleF? sourceRectangle,
705 Color color,
706 float layerDepth);
707
708 /// <summary>
709 /// Submit a sprite for drawing in the current batch.
710 /// </summary>
711 /// <param name="image">The source image.</param>
712 /// <param name="position">The drawing location on screen.</param>
713 /// <param name="color">Color multiplier.</param>
714 /// <param name="options">Options that modify the drawing.</param>
715 /// <param name="layerDepth">A layer depth of this drawing.</param>
716 public void Draw(TTexture image,
717 Vector2 position,
718 Color color,
719 SpriteOptions options,
720 float layerDepth);
721
722 /// <summary>
723 /// Submit a sprite for drawing in the current batch.
724 /// </summary>
725 /// <param name="image">The source image.</param>
726 /// <param name="position">The drawing location on screen.</param>
727 /// <param name="color">Color multiplier.</param>
728 /// <param name="layerDepth">A layer depth of this drawing.</param>
729 public void Draw(TTexture image,
730 Vector2 position,
731 Color color,
732 float layerDepth);
733
734 /// <summary>
735 /// Submit a sprite for drawing in the current batch.
736 /// </summary>
737 /// <param name="image">The source image.</param>
738 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
739 /// <param name="color">Color multiplier.</param>
740 /// <param name="options">Options that modify the drawing.</param>
741 /// <param name="layerDepth">A layer depth of this drawing.</param>
742 public void Draw(TTexture image,
743 RectangleF destinationRectangle,
744 Color color,
745 SpriteOptions options,
746 float layerDepth);
747
748 /// <summary>
749 /// Submit a sprite for drawing in the current batch.
750 /// </summary>
751 /// <param name="image">The source image.</param>
752 /// <param name="destinationRectangle">The drawing bounds on screen.</param>
753 /// <param name="color">Color multiplier.</param>
754 /// <param name="layerDepth">A layer depth of this drawing.</param>
755 public void Draw(TTexture image,
756 RectangleF destinationRectangle,
757 Color color,
758 float layerDepth);
759}