Gorgon Game Engine
Drawables.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 #include "../Geometry/Point.h"
5 #include "../Geometry/Size.h"
6 #include "../Geometry/Rectangle.h"
7 
8 #include "../Graphics.h"
9 #include "TextureTargets.h"
10 
11 
12 namespace Gorgon { namespace Graphics {
13 
17  class Drawable {
18  public:
19  virtual ~Drawable() { }
20 
22  void Draw(TextureTarget &target, int x, int y, RGBAf color = RGBAf(1.f)) const {
23  draw(target, {(float)x, (float)y}, color);
24  }
25 
27  void Draw(TextureTarget &target, const Geometry::Point &p, RGBAf color = RGBAf(1.f)) const {
28  draw(target, {(float)p.X, (float)p.Y}, color);
29  }
30 
32  void Draw(TextureTarget &target, float x, float y, RGBAf color = RGBAf(1.f)) const {
33  draw(target, {x, y}, color);
34  }
35 
37  void Draw(TextureTarget &target, const Geometry::Pointf &p, RGBAf color = RGBAf(1.f)) const {
38  draw(target, p, color);
39  }
40 
41  protected:
43  virtual void draw(TextureTarget &target, const Geometry::Pointf &p, RGBAf color) const = 0;
44  };
45 
46 
49  public:
50  virtual ~SizelessDrawable() { }
51 
52  protected:
54  virtual void drawin(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const = 0;
55 
58  virtual void drawin(TextureTarget &target, const SizeController &controller, const Geometry::Rectanglef &r, RGBAf color) const = 0;
59 
63  virtual Geometry::Size calculatesize(const Geometry::Size &area) const = 0;
64 
69  virtual Geometry::Size calculatesize(const SizeController &controller, const Geometry::Size &s) const = 0;
70  };
71 
72 
74  class RectangularDrawable : public virtual Drawable {
75  public:
76 
77  using Drawable::Draw;
78 
80  void DrawStretched(TextureTarget &target, int x, int y, int w, int h, RGBAf color = RGBAf(1.f)) const {
81  drawstretched(target, {(float)x, (float)y, (float)w, (float)h}, color);
82  }
83 
85  void DrawStretched(TextureTarget &target, const Geometry::Point &p, int w, int h, RGBAf color = RGBAf(1.f)) const {
86  drawstretched(target, {(Geometry::Pointf)p, (float)w, (float)h}, color);
87  }
88 
90  void DrawStretched(TextureTarget &target, int x, int y, const Geometry::Size &size, RGBAf color = RGBAf(1.f)) const {
91  drawstretched(target, {(float)x, (float)y, (Geometry::Sizef)size}, color);
92  }
93 
95  void DrawStretched(TextureTarget &target, const Geometry::Point &p, const Geometry::Size &size, RGBAf color = RGBAf(1.f)) const {
96  drawstretched(target, {(Geometry::Pointf)p, (Geometry::Sizef)size}, color);
97  }
98 
100  void DrawStretched(TextureTarget &target, const Geometry::Rectangle &r, RGBAf color = RGBAf(1.f)) const {
101  drawstretched(target, (Geometry::Rectanglef)r, color);
102  }
103 
104 
106  void DrawStretched(TextureTarget &target, float x, float y, float w, float h, RGBAf color = RGBAf(1.f)) const {
107  drawstretched(target, {x, y, w, h}, color);
108  }
109 
111  void DrawStretched(TextureTarget &target, const Geometry::Pointf &p, float w, float h, RGBAf color = RGBAf(1.f)) const {
112  drawstretched(target, {p, w, h}, color);
113  }
114 
116  void DrawStretched(TextureTarget &target, float x, float y, const Geometry::Sizef &size, RGBAf color = RGBAf(1.f)) const {
117  drawstretched(target, {x, y, size}, color);
118  }
119 
121  void DrawStretched(TextureTarget &target, const Geometry::Pointf &p, const Geometry::Sizef &size, RGBAf color = RGBAf(1.f)) const {
122  drawstretched(target, {p, size}, color);
123  }
124 
126  void DrawStretched(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color = RGBAf(1.f)) const {
127  drawstretched(target, r, color);
128  }
129 
130 
132  void Draw(TextureTarget &target, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, RGBAf color = RGBAf(1.f)) const {
133  draw(target, {x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}, color);
134  }
135 
137  void Draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, RGBAf color = RGBAf(1.f)) const {
138  draw(target, p1, p2, p3, p4, color);
139  }
140 
141 
143  void DrawRotated(TextureTarget &target, const Geometry::Point &p, float angle, const Geometry::Pointf &origin=Geometry::Point(0, 0), RGBAf color = RGBAf(1.f)) const;
144 
145 
147  void DrawRotated(TextureTarget &target, const Geometry::Point &p, float angle, RGBAf color) const {
148  DrawRotated(target, p, angle, Geometry::Point(0, 0), color);
149  }
150 
152  void DrawRotated(TextureTarget &target, int x, int y, float angle, float oX, float oY, RGBAf color = RGBAf(1.f)) const {
153  DrawRotated(target, {x, y}, angle, {oX, oY}, color);
154  }
155 
157  void DrawIn(TextureTarget &target, Tiling tiling, int x, int y, int w, int h, RGBAf color = RGBAf(1.f)) const {
158  drawin(target, tiling, {(float)x, (float)y, (float)w, (float)h}, color);
159  }
160 
162  void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Point &p, int w, int h, RGBAf color = RGBAf(1.f)) const {
163  drawin(target, tiling, {(Geometry::Pointf)p, (float)w, (float)h}, color);
164  }
165 
167  void DrawIn(TextureTarget &target, Tiling tiling, int x, int y, const Geometry::Size &size, RGBAf color = RGBAf(1.f)) const {
168  drawin(target, tiling, {(float)x, (float)y, (Geometry::Sizef)size}, color);
169  }
170 
172  void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Point &p, const Geometry::Size &size, RGBAf color = RGBAf(1.f)) const {
173  drawin(target, tiling, {(Geometry::Pointf)p, (Geometry::Sizef)size}, color);
174  }
175 
177  void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Rectangle &r, RGBAf color = RGBAf(1.f)) const {
178  drawin(target, tiling, (Geometry::Rectanglef)r, color);
179  }
180 
182  void DrawIn(TextureTarget &target, Tiling tiling, float x, float y, float w, float h, RGBAf color = RGBAf(1.f)) const {
183  drawin(target, tiling, {x, y, w, h}, color);
184  }
185 
187  void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Pointf &p, float w, float h, RGBAf color = RGBAf(1.f)) const {
188  drawin(target, tiling, {p, w, h}, color);
189  }
190 
192  void DrawIn(TextureTarget &target, Tiling tiling, float x, float y, const Geometry::Sizef &size, RGBAf color = RGBAf(1.f)) const {
193  drawin(target, tiling, {x, y, size}, color);
194  }
195 
197  void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Pointf &p, const Geometry::Sizef &size, RGBAf color = RGBAf(1.f)) const {
198  drawin(target, tiling, {p, size}, color);
199  }
200 
202  void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Rectanglef &r, RGBAf color = RGBAf(1.f)) const {
203  drawin(target, tiling, r, color);
204  }
205 
207  void DrawIn(TextureTarget &target, int x, int y, int w, int h, RGBAf color = RGBAf(1.f)) const {
208  drawin(target, {(float)x, (float)y, (float)w, (float)h}, color);
209  }
210 
212  void DrawIn(TextureTarget &target, const Geometry::Point &p, int w, int h, RGBAf color = RGBAf(1.f)) const {
213  drawin(target, {(Geometry::Pointf)p, (float)w, (float)h}, color);
214  }
215 
217  void DrawIn(TextureTarget &target, int x, int y, const Geometry::Size &size, RGBAf color = RGBAf(1.f)) const {
218  drawin(target, {(float)x, (float)y, (Geometry::Sizef)size}, color);
219  }
220 
222  void DrawIn(TextureTarget &target, const Geometry::Point &p, const Geometry::Size &size, RGBAf color = RGBAf(1.f)) const {
223  drawin(target, {(Geometry::Pointf)p, (Geometry::Sizef)size}, color);
224  }
225 
227  void DrawIn(TextureTarget &target, const Geometry::Rectangle &r, RGBAf color = RGBAf(1.f)) const {
228  drawin(target, Geometry::Rectanglef(r), color);
229  }
230 
232  void DrawIn(TextureTarget &target, RGBAf color = RGBAf(1.f)) const {
233  drawin(target, {0, 0, target.GetTargetSize()}, color);
234  }
235 
237  void DrawIn(TextureTarget &target, const SizeController &controller, int x, int y, int w, int h, RGBAf color = RGBAf(1.f)) const {
238  drawin(target, controller, {(float)x, (float)y, (float)w, (float)h}, color);
239  }
240 
242  void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Point &p, int w, int h, RGBAf color = RGBAf(1.f)) const {
243  drawin(target, controller, {p, (float)w, (float)h}, color);
244  }
245 
247  void DrawIn(TextureTarget &target, const SizeController &controller, int x, int y, const Geometry::Size &size, RGBAf color = RGBAf(1.f)) const {
248  drawin(target, controller, {(float)x, (float)y, size}, color);
249  }
250 
252  void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Point &p, const Geometry::Size &size, RGBAf color = RGBAf(1.f)) const {
253  drawin(target, controller, {(Geometry::Pointf)p, (Geometry::Sizef)size}, color);
254  }
255 
256 
258  void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Rectangle &r, RGBAf color = RGBAf(1.f)) const {
259  drawin(target, controller, Geometry::Rectanglef(r), color);
260  }
261 
263  void DrawIn(TextureTarget &target, const SizeController &controller, RGBAf color = RGBAf(1.f)) const {
264  drawin(target, controller, {0, 0, target.GetTargetSize()}, color);
265  }
266 
268  void DrawIn(TextureTarget &target, float x, float y, float w, float h, RGBAf color = RGBAf(1.f)) const {
269  drawin(target, {x, y, w, h}, color);
270  }
271 
273  void DrawIn(TextureTarget &target, const Geometry::Pointf &p, float w, float h, RGBAf color = RGBAf(1.f)) const {
274  drawin(target, {p, w, h}, color);
275  }
276 
278  void DrawIn(TextureTarget &target, float x, float y, const Geometry::Sizef &size, RGBAf color = RGBAf(1.f)) const {
279  drawin(target, {x, y, size}, color);
280  }
281 
283  void DrawIn(TextureTarget &target, const Geometry::Pointf &p, const Geometry::Sizef &size, RGBAf color = RGBAf(1.f)) const {
284  drawin(target, {p, size}, color);
285  }
286 
288  void DrawIn(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color = RGBAf(1.f)) const {
289  drawin(target, r, color);
290  }
291 
293  void DrawIn(TextureTarget &target, const SizeController &controller, float x, float y, float w, float h, RGBAf color = RGBAf(1.f)) const {
294  drawin(target, controller, {x, y, w, h}, color);
295  }
296 
298  void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Pointf &p, float w, float h, RGBAf color = RGBAf(1.f)) const {
299  drawin(target, controller, {p, w, h}, color);
300  }
301 
303  void DrawIn(TextureTarget &target, const SizeController &controller, float x, float y, const Geometry::Sizef &size, RGBAf color = RGBAf(1.f)) const {
304  drawin(target, controller, {x, y, size}, color);
305  }
306 
308  void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Pointf &p, const Geometry::Sizef &size, RGBAf color = RGBAf(1.f)) const {
309  drawin(target, controller, {p, size}, color);
310  }
311 
312 
314  void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Rectanglef &r, RGBAf color = RGBAf(1.f)) const {
315  drawin(target, controller, r, color);
316  }
317 
322  const Geometry::Size CalculateSize(const Geometry::Size &area) const {
323  return calculatesize(area);
324  }
325 
330  const Geometry::Size CalculateSize(int w=-1, int h=-1) const {
331  return calculatesize({w, h});
332  }
333 
338  const Geometry::Size CalculateSize(const SizeController &controller, const Geometry::Size &area) const {
339  return calculatesize(controller, area);
340  }
341 
346  const Geometry::Size CalculateSize(const SizeController &controller, int w=-1, int h=-1) const {
347  return calculatesize(controller, {w, h});
348  }
349 
353  void Draw(TextureTarget &target,
354  float x1, float y1,
355  float x2, float y2,
356  float x3, float y3,
357  float x4, float y4,
358  float u1, float v1,
359  float u2, float v2,
360  float u3, float v3,
361  float u4, float v4,
362  RGBAf color = RGBAf(1.f)) const {
363  draw(target, {x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}, {u1, v1}, {u2, v2}, {u3, v3}, {u4, v4}, color);
364  }
365 
369  void Draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color = RGBAf(1.f)) const {
370  draw(target, p1, p2, p3, p4, {u1, v1}, {u2, v2}, {u3, v3}, {u4, v4}, color);
371  }
372 
376  void Draw(TextureTarget &target, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color = RGBAf(1.f)) const {
377  draw(target, {x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}, t1, t2, t3, t4, color);
378  }
379 
383  void Draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color = RGBAf(1.f)) const {
384  draw(target, p1, p2, p3, p4, t1, t2, t3, t4, color);
385  }
386 
390  void Draw(TextureTarget &target, float x, float y, float w, float h, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color = RGBAf(1.f)) const {
391  draw(target, {x, y}, {x+w, y}, {x+w, y+h}, {x, y+h}, {u1, v1}, {u2, v2}, {u3, v3}, {u4, v4}, color);
392  }
393 
397  void Draw(TextureTarget &target, float x, float y, float w, float h, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color = RGBAf(1.f)) const {
398  draw(target, {x, y}, {x+w, y}, {x+w, y+h}, {x, y+h}, t1, t2, t3, t4, color);
399  }
400 
404  void Draw(TextureTarget &target, const Geometry::Pointf &p, float w, float h, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color = RGBAf(1.f)) const {
405  Draw(target, p.X, p.Y, w, h, {u1, v1}, {u2, v2}, {u3, v3}, {u4, v4}, color);
406  }
407 
411  void Draw(TextureTarget &target, const Geometry::Pointf &p, float w, float h, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color = RGBAf(1.f)) const {
412  Draw(target, p.X, p.Y, w, h, t1, t2, t3, t4, color);
413  }
414 
418  void Draw(TextureTarget &target, float x, float y, const Geometry::Sizef &size, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color = RGBAf(1.f)) const {
419  Draw(target, x, y, size.Width, size.Height, {u1, v1}, {u2, v2}, {u3, v3}, {u4, v4}, color);
420  }
421 
424  void Draw(TextureTarget &target, float x, float y, const Geometry::Sizef &size, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color = RGBAf(1.f)) const {
425  Draw(target, x, y, size.Width, size.Height, t1, t2, t3, t4, color);
426  }
427 
431  void Draw(TextureTarget &target, const Geometry::Pointf &p, const Geometry::Sizef &size, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color = RGBAf(1.f)) const {
432  Draw(target, p.X, p.Y, size.Width, size.Height, {u1, v1}, {u2, v2}, {u3, v3}, {u4, v4}, color);
433  }
434 
438  void Draw(TextureTarget &target, const Geometry::Pointf &p, const Geometry::Sizef &size, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color = RGBAf(1.f)) const {
439  Draw(target, p.X, p.Y, size.Width, size.Height, t1, t2, t3, t4, color);
440  }
441 
443  const Geometry::Size GetSize() const {
444  return getsize();
445  }
446 
448  int GetWidth() const { return getsize().Width; }
449 
451  int GetHeight() const { return getsize().Height; }
452 
453  protected:
454 
456  virtual void draw(TextureTarget &target, const Geometry::Pointf &p, RGBAf color) const override {
457  auto size=getsize();
458  draw(target, p, {float(p.X+size.Width), float(p.Y)}, {p.X+size.Width, p.Y+size.Height}, {p.X, p.Y+size.Height}, color);
459  }
460 
464  virtual void draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2,
465  const Geometry::Pointf &p3, const Geometry::Pointf &p4,
466  const Geometry::Pointf &tex1, const Geometry::Pointf &tex2,
467  const Geometry::Pointf &tex3, const Geometry::Pointf &tex4, RGBAf color) const = 0;
468 
471  virtual void draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2,
472  const Geometry::Pointf &p3, const Geometry::Pointf &p4, RGBAf color) const = 0;
473 
478  virtual void drawstretched(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const {
479  drawin(target, Tiling::None, r, color);
480  }
481 
486  virtual void drawin(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const {
487  drawin(target, Tiling::Both, r, color);
488  }
489 
492  virtual void drawin(TextureTarget &target, const SizeController &controller, const Geometry::Rectanglef &r, RGBAf color) const = 0;
493 
497  virtual Geometry::Size calculatesize(const Geometry::Size &area) const = 0;
498 
503  virtual Geometry::Size calculatesize(const SizeController &controller, const Geometry::Size &s) const = 0;
504 
506  virtual Geometry::Size getsize() const = 0;
507  };
508 
511  class Image : public virtual RectangularDrawable, public virtual TextureSource {
512  public:
513 
514  protected:
515  virtual Geometry::Size getsize() const override {
516  return GetImageSize();
517  }
518 
519  virtual Geometry::Size calculatesize(const Geometry::Size &s) const override {
520  return GetImageSize();
521  }
522 
523  virtual Geometry::Size calculatesize(const SizeController &controller, const Geometry::Size &s) const override {
524  return controller.CalculateSize(getsize(), s);
525  }
526 
527  virtual void draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2,
528  const Geometry::Pointf &p3, const Geometry::Pointf &p4, RGBAf color) const override {
529  target.Draw(*this, p1, p2, p3, p4, color);
530  }
531 
532  virtual void draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2,
533  const Geometry::Pointf &p3, const Geometry::Pointf &p4,
534  const Geometry::Pointf &tex1, const Geometry::Pointf &tex2,
535  const Geometry::Pointf &tex3, const Geometry::Pointf &tex4, RGBAf color) const override {
536  target.Draw(*this, p1, p2, p3, p4, tex1, tex2, tex3, tex4, color);
537  }
538 
539  virtual void drawstretched(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const override {
540  target.Draw(*this, Tiling::None, r, color);
541  }
542 
543  virtual void drawin(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const override {
544  target.Draw(*this, Tiling::Both, r, color);
545  }
546 
547  virtual void drawin(TextureTarget &target, const SizeController &controller, const Geometry::Rectanglef &r, RGBAf color) const override {
548  target.Draw(*this, controller.GetTiling(), controller.CalculateArea((Geometry::Sizef)getsize(), r.GetSize())+r.TopLeft(), color);
549  }
550  };
551 
552 
553 } }
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, float x, float y, float w, float h, RGBAf color=RGBAf(1.f)) const
Draw to the given area.
Definition: Drawables.h:268
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Pointf &p, float w, float h, RGBAf color=RGBAf(1.f)) const
Draws the object to the target using the given tiling information.
Definition: Drawables.h:187
Gorgon::Graphics::SizelessDrawable::calculatesize
virtual Geometry::Size calculatesize(const Geometry::Size &area) const =0
This function should return the size of the object when it is requested to be drawn in the given area...
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, int x, int y, const Geometry::Size &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area.
Definition: Drawables.h:217
Gorgon::Geometry::basic_Rectangle::TopLeft
basic_Point< T_ > TopLeft() const
Returns the top left coordinates of the rectangle.
Definition: Rectangle.h:198
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, Tiling tiling, int x, int y, const Geometry::Size &size, RGBAf color=RGBAf(1.f)) const
Draws the object to the target using the given tiling information.
Definition: Drawables.h:167
Gorgon::Graphics::RectangularDrawable::DrawRotated
void DrawRotated(TextureTarget &target, int x, int y, float angle, float oX, float oY, RGBAf color=RGBAf(1.f)) const
Draw the object rotated to the given angle in radians, full C++11 support will enable the use of 90de...
Definition: Drawables.h:152
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Pointf &p, const Geometry::Sizef &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area with the given size according to the given controller.
Definition: Drawables.h:308
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, const Geometry::Pointf &p, const Geometry::Sizef &size, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:431
Gorgon::Graphics::RectangularDrawable::getsize
virtual Geometry::Size getsize() const =0
Should return the exact size of this object.
Gorgon::Graphics::RectangularDrawable::DrawStretched
void DrawStretched(TextureTarget &target, float x, float y, float w, float h, RGBAf color=RGBAf(1.f)) const
Draw to the given area by stretching object to fit.
Definition: Drawables.h:106
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const Geometry::Pointf &p, float w, float h, RGBAf color=RGBAf(1.f)) const
Draw to the given area.
Definition: Drawables.h:273
Gorgon::Graphics::SizeController
This class allows control over a sizable object.
Definition: Graphics.h:161
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, RGBAf color=RGBAf(1.f)) const
Draw to fill the given target.
Definition: Drawables.h:232
Gorgon::Graphics::RectangularDrawable::DrawStretched
void DrawStretched(TextureTarget &target, const Geometry::Pointf &p, float w, float h, RGBAf color=RGBAf(1.f)) const
Draw to the given area by stretching object to fit.
Definition: Drawables.h:111
Gorgon::Graphics::RectangularDrawable::DrawStretched
void DrawStretched(TextureTarget &target, const Geometry::Pointf &p, const Geometry::Sizef &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area by stretching object to fit.
Definition: Drawables.h:121
Gorgon::Graphics::RectangularDrawable::CalculateSize
const Geometry::Size CalculateSize(int w=-1, int h=-1) const
Calculates the adjusted size of this drawable depending on the given area.
Definition: Drawables.h:330
Gorgon::Graphics::RectangularDrawable::drawin
virtual void drawin(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const
This function should draw the object to the target area.
Definition: Drawables.h:486
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, int x, int y, RGBAf color=RGBAf(1.f)) const
Draw to the given coordinates.
Definition: Drawables.h:22
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Pointf &p, const Geometry::Sizef &size, RGBAf color=RGBAf(1.f)) const
Draws the object to the target using the given tiling information.
Definition: Drawables.h:197
TextureTargets.h
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const Geometry::Point &p, const Geometry::Size &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area.
Definition: Drawables.h:222
Gorgon::Graphics::RectangularDrawable::draw
virtual void draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, const Geometry::Pointf &tex1, const Geometry::Pointf &tex2, const Geometry::Pointf &tex3, const Geometry::Pointf &tex4, RGBAf color) const =0
This method should draw to object inside the given quad with the given texture coordinates.
Gorgon::Geometry::basic_Point::X
T_ X
X coordinate.
Definition: Point.h:368
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, const Geometry::Pointf &p, float w, float h, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:404
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, Tiling tiling, float x, float y, float w, float h, RGBAf color=RGBAf(1.f)) const
Draws the object to the target using the given tiling information.
Definition: Drawables.h:182
Gorgon::Graphics::RectangularDrawable::CalculateSize
const Geometry::Size CalculateSize(const SizeController &controller, int w=-1, int h=-1) const
Calculates the adjusted size of this drawable depending on the given area and controller.
Definition: Drawables.h:346
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Point &p, int w, int h, RGBAf color=RGBAf(1.f)) const
Draw to the given area according to the given controller.
Definition: Drawables.h:242
Gorgon::Geometry::basic_Size::Height
T_ Height
Height of this size object.
Definition: Size.h:261
Gorgon::Graphics::RectangularDrawable::calculatesize
virtual Geometry::Size calculatesize(const SizeController &controller, const Geometry::Size &s) const =0
This function should return the size of the object when it is requested to be drawn in the given area...
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color=RGBAf(1.f)) const
Draw in the given area.
Definition: Drawables.h:288
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Point &p, const Geometry::Size &size, RGBAf color=RGBAf(1.f)) const
Draws the object to the target using the given tiling information.
Definition: Drawables.h:172
Gorgon::Graphics::RGBAf
Represents a four channel 32 bit float per channel color information.
Definition: Color.h:373
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:383
Gorgon::Graphics::Image::calculatesize
virtual Geometry::Size calculatesize(const Geometry::Size &s) const override
This function should return the size of the object when it is requested to be drawn in the given area...
Definition: Drawables.h:519
Gorgon::Geometry::basic_Rectangle::GetSize
basic_Size< T_ > GetSize() const
Returns the size of the rectangle.
Definition: Rectangle.h:218
Gorgon::Graphics::Drawable::~Drawable
virtual ~Drawable()
Definition: Drawables.h:19
Gorgon::Graphics::RectangularDrawable::drawstretched
virtual void drawstretched(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const
This function should draw the object to the target area.
Definition: Drawables.h:478
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, float x, float y, const Geometry::Sizef &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area the given size according to the given controller.
Definition: Drawables.h:303
Gorgon::Graphics::Tiling
Tiling
Details which directions a texture should tile.
Definition: Graphics.h:31
Gorgon
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
Gorgon::Geometry::basic_Size
This class represents a 2D geometric size.
Definition: Size.h:23
Gorgon::Graphics::Image::drawstretched
virtual void drawstretched(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const override
This function should draw the object to the target area.
Definition: Drawables.h:539
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Rectangle &r, RGBAf color=RGBAf(1.f)) const
Draws the object to the target using the given tiling information.
Definition: Drawables.h:177
Gorgon::Graphics::RectangularDrawable::drawin
virtual void drawin(TextureTarget &target, const SizeController &controller, const Geometry::Rectanglef &r, RGBAf color) const =0
This function should draw this drawable inside the given rectangle according to the given controller.
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, RGBAf color=RGBAf(1.f)) const
Draw to fill the given target according to the given controller.
Definition: Drawables.h:263
Gorgon::Graphics::Image
This is an interface for solid texture based image.
Definition: Drawables.h:511
Gorgon::Graphics::TextureTarget::GetTargetSize
virtual Geometry::Size GetTargetSize() const =0
Get size of the target.
Gorgon::Graphics::RectangularDrawable::calculatesize
virtual Geometry::Size calculatesize(const Geometry::Size &area) const =0
This function should return the size of the object when it is requested to be drawn in the given area...
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, Tiling tiling, int x, int y, int w, int h, RGBAf color=RGBAf(1.f)) const
Draws the object to the target using the given tiling information.
Definition: Drawables.h:157
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Rectanglef &r, RGBAf color=RGBAf(1.f)) const
Draw in the given area according to the given controller.
Definition: Drawables.h:314
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, float x, float y, const Geometry::Sizef &size, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:418
Gorgon::Graphics::RectangularDrawable::DrawRotated
void DrawRotated(TextureTarget &target, const Geometry::Point &p, float angle, const Geometry::Pointf &origin=Geometry::Point(0, 0), RGBAf color=RGBAf(1.f)) const
Draw the object rotated to the given angle in radians, full C++11 support will enable the use of 90de...
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, const Geometry::Pointf &p, const Geometry::Sizef &size, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:438
Gorgon::Graphics::SizelessDrawable
A drawable object that does not have a size and requires a region to draw.
Definition: Drawables.h:48
Gorgon::Graphics::SizeController::CalculateSize
Geometry::Size CalculateSize(Geometry::Size objectsize, const Geometry::Size &area) const
Calculates the size of the object according to the tiling rules.
Definition: Graphics.h:216
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:353
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, const Geometry::Pointf &p, float w, float h, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:411
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, float x, float y, float w, float h, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:397
Gorgon::Graphics::RectangularDrawable::DrawStretched
void DrawStretched(TextureTarget &target, int x, int y, int w, int h, RGBAf color=RGBAf(1.f)) const
Draw to the given area by stretching object to fit.
Definition: Drawables.h:80
Gorgon::Graphics::Drawable::Draw
void Draw(TextureTarget &target, int x, int y, RGBAf color=RGBAf(1.f)) const
Draw to the given coordinates.
Definition: Drawables.h:22
Gorgon::Geometry::Pointf
basic_Point< Float > Pointf
Definition: Point.h:601
Gorgon::Geometry::Sizef
basic_Size< Float > Sizef
Definition: Size.h:388
Gorgon::Graphics::Tiling::None
@ None
Gorgon::Graphics::TextureTarget
This interface defines a class that can be used as a common target for texture based drawing.
Definition: TextureTargets.h:12
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, float x, float y, float w, float h, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:390
Gorgon::Graphics::RectangularDrawable::draw
virtual void draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, RGBAf color) const =0
This function should draw the object inside the given quad.
Gorgon::Geometry::basic_Point
This class represents a 2D point.
Definition: Point.h:32
Gorgon::Graphics::TextureTarget::Draw
virtual void Draw(const TextureSource &image, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, RGBAf color=RGBAf(1.f))=0
Draws a simple texture to the screen.
Gorgon::Graphics::RectangularDrawable::DrawStretched
void DrawStretched(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color=RGBAf(1.f)) const
Draw to the given area by stretching object to fit.
Definition: Drawables.h:126
Gorgon::Graphics::Image::draw
virtual void draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, RGBAf color) const override
This function should draw the object inside the given quad.
Definition: Drawables.h:527
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, float x, float y, float w, float h, RGBAf color=RGBAf(1.f)) const
Draw to the given coordinates with the given size according to the given controller.
Definition: Drawables.h:293
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, int x, int y, int w, int h, RGBAf color=RGBAf(1.f)) const
Draw to the given area.
Definition: Drawables.h:207
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const Geometry::Point &p, int w, int h, RGBAf color=RGBAf(1.f)) const
Draw to the given area.
Definition: Drawables.h:212
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Point &p, int w, int h, RGBAf color=RGBAf(1.f)) const
Draws the object to the target using the given tiling information.
Definition: Drawables.h:162
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, Tiling tiling, const Geometry::Rectanglef &r, RGBAf color=RGBAf(1.f)) const
Draws the object to the target using the given tiling information.
Definition: Drawables.h:202
Gorgon::Graphics::RectangularDrawable::DrawStretched
void DrawStretched(TextureTarget &target, const Geometry::Point &p, const Geometry::Size &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area by stretching object to fit.
Definition: Drawables.h:95
Gorgon::Graphics::RectangularDrawable::GetSize
const Geometry::Size GetSize() const
Returns the size of this object.
Definition: Drawables.h:443
Gorgon::UI::Graphics
@ Graphics
Definition: Template.h:164
Gorgon::Graphics::RectangularDrawable
Definition: Drawables.h:74
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const Geometry::Rectangle &r, RGBAf color=RGBAf(1.f)) const
Draw in the given area.
Definition: Drawables.h:227
Gorgon::Graphics::TextureSource
This interface represents a GL texture source.
Definition: Graphics.h:480
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const Geometry::Pointf &p, const Geometry::Sizef &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area.
Definition: Drawables.h:283
Gorgon::Graphics::RectangularDrawable::DrawStretched
void DrawStretched(TextureTarget &target, const Geometry::Point &p, int w, int h, RGBAf color=RGBAf(1.f)) const
Draw to the given area by stretching object to fit.
Definition: Drawables.h:85
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Rectangle &r, RGBAf color=RGBAf(1.f)) const
Draw in the given area according to the given controller.
Definition: Drawables.h:258
Gorgon::Graphics::RectangularDrawable::DrawRotated
void DrawRotated(TextureTarget &target, const Geometry::Point &p, float angle, RGBAf color) const
Draw the object rotated to the given angle in radians, full C++11 support will enable the use of 90de...
Definition: Drawables.h:147
Gorgon::Graphics::Image::getsize
virtual Geometry::Size getsize() const override
Should return the exact size of this object.
Definition: Drawables.h:515
Gorgon::Graphics::RectangularDrawable::GetHeight
int GetHeight() const
Returns the height of the drawable.
Definition: Drawables.h:451
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, float x, float y, const Geometry::Sizef &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area.
Definition: Drawables.h:278
Gorgon::Geometry::basic_Point::Y
T_ Y
Y coordinate.
Definition: Point.h:371
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, int x, int y, int w, int h, RGBAf color=RGBAf(1.f)) const
Draw to the given coordinates with the given size according to the given controller.
Definition: Drawables.h:237
Gorgon::Geometry::basic_Size::Width
T_ Width
Width of this size object.
Definition: Size.h:258
Gorgon::Graphics::Drawable
Represents a drawable object, that can be drawn to the given point.
Definition: Drawables.h:17
Gorgon::Graphics::RectangularDrawable::draw
virtual void draw(TextureTarget &target, const Geometry::Pointf &p, RGBAf color) const override
This function should draw the object to the given point.
Definition: Drawables.h:456
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, float x, float y, const Geometry::Sizef &size, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:424
Gorgon::Graphics::RectangularDrawable::GetWidth
int GetWidth() const
Returns the width of the drawable.
Definition: Drawables.h:448
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Pointf &p, float w, float h, RGBAf color=RGBAf(1.f)) const
Draw to the given area according to the given controller.
Definition: Drawables.h:298
Gorgon::Graphics::Image::calculatesize
virtual Geometry::Size calculatesize(const SizeController &controller, const Geometry::Size &s) const override
This function should return the size of the object when it is requested to be drawn in the given area...
Definition: Drawables.h:523
Gorgon::Graphics::Drawable::draw
virtual void draw(TextureTarget &target, const Geometry::Pointf &p, RGBAf color) const =0
This is the only function that needs to implemented for a drawable.
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:369
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, const Geometry::Point &p, const Geometry::Size &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area with the given size according to the given controller.
Definition: Drawables.h:252
Gorgon::Graphics::Image::drawin
virtual void drawin(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const override
This function should draw the object to the target area.
Definition: Drawables.h:543
Gorgon::Graphics::RectangularDrawable::CalculateSize
const Geometry::Size CalculateSize(const SizeController &controller, const Geometry::Size &area) const
Calculates the adjusted size of this drawable depending on the given area and controller.
Definition: Drawables.h:338
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, const Geometry::Pointf &t1, const Geometry::Pointf &t2, const Geometry::Pointf &t3, const Geometry::Pointf &t4, RGBAf color=RGBAf(1.f)) const
Draws the object with the given screen and texture coordinates.
Definition: Drawables.h:376
Gorgon::Graphics::RectangularDrawable::CalculateSize
const Geometry::Size CalculateSize(const Geometry::Size &area) const
Calculates the adjusted size of this drawable depending on the given area.
Definition: Drawables.h:322
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, Tiling tiling, float x, float y, const Geometry::Sizef &size, RGBAf color=RGBAf(1.f)) const
Draws the object to the target using the given tiling information.
Definition: Drawables.h:192
Gorgon::Graphics::SizelessDrawable::drawin
virtual void drawin(TextureTarget &target, const SizeController &controller, const Geometry::Rectanglef &r, RGBAf color) const =0
This function should draw this drawable inside the given rectangle according to the given controller.
Gorgon::Graphics::SizeController::CalculateArea
Geometry::Rectangle CalculateArea(const Geometry::Size &objectsize, const Geometry::Size &area) const
Calculates the drawing area of the object according to the tiling and placement rules.
Definition: Graphics.h:330
Gorgon::Geometry::basic_Rectangle
Represents a rectangle in a 2D space.
Definition: Rectangle.h:19
Gorgon::Graphics::SizelessDrawable::drawin
virtual void drawin(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const =0
This function should draw this drawable inside the given rectangle.
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, RGBAf color=RGBAf(1.f)) const
Draw the object to the target by specifying coordinates for four corners.
Definition: Drawables.h:137
Gorgon::Graphics::RectangularDrawable::DrawStretched
void DrawStretched(TextureTarget &target, const Geometry::Rectangle &r, RGBAf color=RGBAf(1.f)) const
Draw to the given area by stretching object to fit.
Definition: Drawables.h:100
Gorgon::Graphics::Image::drawin
virtual void drawin(TextureTarget &target, const SizeController &controller, const Geometry::Rectanglef &r, RGBAf color) const override
This function should draw this drawable inside the given rectangle according to the given controller.
Definition: Drawables.h:547
Gorgon::Graphics::SizelessDrawable::~SizelessDrawable
virtual ~SizelessDrawable()
Definition: Drawables.h:50
Gorgon::Graphics::TextureSource::GetImageSize
virtual Geometry::Size GetImageSize() const =0
Should return the size of the image stored in texture. Not the whole texture size.
Gorgon::Graphics::RectangularDrawable::DrawStretched
void DrawStretched(TextureTarget &target, float x, float y, const Geometry::Sizef &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area by stretching object to fit.
Definition: Drawables.h:116
Gorgon::Graphics::SizelessDrawable::calculatesize
virtual Geometry::Size calculatesize(const SizeController &controller, const Geometry::Size &s) const =0
This function should return the size of the object when it is requested to be drawn in the given area...
Gorgon::Graphics::RectangularDrawable::Draw
void Draw(TextureTarget &target, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, RGBAf color=RGBAf(1.f)) const
Draw the object to the target by specifying coordinates for four corners.
Definition: Drawables.h:132
Gorgon::Graphics::RectangularDrawable::DrawStretched
void DrawStretched(TextureTarget &target, int x, int y, const Geometry::Size &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area by stretching object to fit.
Definition: Drawables.h:90
Gorgon::Graphics::Image::draw
virtual void draw(TextureTarget &target, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, const Geometry::Pointf &tex1, const Geometry::Pointf &tex2, const Geometry::Pointf &tex3, const Geometry::Pointf &tex4, RGBAf color) const override
This method should draw to object inside the given quad with the given texture coordinates.
Definition: Drawables.h:532
Gorgon::Graphics::RectangularDrawable::DrawIn
void DrawIn(TextureTarget &target, const SizeController &controller, int x, int y, const Geometry::Size &size, RGBAf color=RGBAf(1.f)) const
Draw to the given area the given size according to the given controller.
Definition: Drawables.h:247
Gorgon::Graphics::SizeController::GetTiling
Graphics::Tiling GetTiling() const
Definition: Graphics.h:465