 |
Gorgon Game Engine
|
Go to the documentation of this file.
4 #include "../Geometry/Point.h"
5 #include "../Geometry/Size.h"
6 #include "../Geometry/Rectangle.h"
8 #include "../Graphics.h"
23 draw(target, {(float)x, (
float)y}, color);
28 draw(target, {(float)p.
X, (
float)p.
Y}, color);
33 draw(target, {x, y}, color);
38 draw(target, p, color);
81 drawstretched(target, {(float)x, (
float)y, (float)w, (
float)h}, color);
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);
138 draw(target, p1, p2, p3, p4, color);
153 DrawRotated(target, {x, y}, angle, {oX, oY}, color);
158 drawin(target, tiling, {(float)x, (
float)y, (float)w, (
float)h}, color);
183 drawin(target, tiling, {x, y, w, h}, color);
188 drawin(target, tiling, {p, w, h}, color);
193 drawin(target, tiling, {x, y, size}, color);
198 drawin(target, tiling, {p, size}, color);
203 drawin(target, tiling, r, color);
208 drawin(target, {(float)x, (
float)y, (float)w, (
float)h}, color);
238 drawin(target, controller, {(float)x, (
float)y, (float)w, (
float)h}, color);
243 drawin(target, controller, {p, (float)w, (
float)h}, color);
248 drawin(target, controller, {(float)x, (
float)y, size}, color);
269 drawin(target, {x, y, w, h}, color);
274 drawin(target, {p, w, h}, color);
279 drawin(target, {x, y, size}, color);
284 drawin(target, {p, size}, color);
294 drawin(target, controller, {x, y, w, h}, color);
299 drawin(target, controller, {p, w, h}, color);
304 drawin(target, controller, {x, y, size}, color);
309 drawin(target, controller, {p, size}, color);
315 drawin(target, controller, r, color);
363 draw(target, {x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}, {u1, v1}, {u2, v2}, {u3, v3}, {u4, v4}, color);
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);
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);
384 draw(target, p1, p2, p3, p4, t1, t2, t3, t4, color);
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);
398 draw(target, {x, y}, {x+w, y}, {x+w, y+h}, {x, y+h}, t1, t2, t3, t4, color);
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);
412 Draw(target, p.
X, p.
Y, w, h, t1, t2, t3, t4, color);
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);
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);
529 target.
Draw(*
this, p1, p2, p3, p4, color);
536 target.
Draw(*
this, p1, p2, p3, p4, tex1, tex2, tex3, tex4, color);
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
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
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...
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
basic_Point< T_ > TopLeft() const
Returns the top left coordinates of the rectangle.
Definition: Rectangle.h:198
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
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
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
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
virtual Geometry::Size getsize() const =0
Should return the exact size of this object.
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
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
This class allows control over a sizable object.
Definition: Graphics.h:161
void DrawIn(TextureTarget &target, RGBAf color=RGBAf(1.f)) const
Draw to fill the given target.
Definition: Drawables.h:232
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
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
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
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
void Draw(TextureTarget &target, int x, int y, RGBAf color=RGBAf(1.f)) const
Draw to the given coordinates.
Definition: Drawables.h:22
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
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
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.
T_ X
X coordinate.
Definition: Point.h:368
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
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
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
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
T_ Height
Height of this size object.
Definition: Size.h:261
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...
void DrawIn(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color=RGBAf(1.f)) const
Draw in the given area.
Definition: Drawables.h:288
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
Represents a four channel 32 bit float per channel color information.
Definition: Color.h:373
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
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
basic_Size< T_ > GetSize() const
Returns the size of the rectangle.
Definition: Rectangle.h:218
virtual ~Drawable()
Definition: Drawables.h:19
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
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
Tiling
Details which directions a texture should tile.
Definition: Graphics.h:31
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
This class represents a 2D geometric size.
Definition: Size.h:23
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
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
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.
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
This is an interface for solid texture based image.
Definition: Drawables.h:511
virtual Geometry::Size GetTargetSize() const =0
Get size of the target.
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...
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
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
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
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...
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
A drawable object that does not have a size and requires a region to draw.
Definition: Drawables.h:48
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
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
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
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
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
void Draw(TextureTarget &target, int x, int y, RGBAf color=RGBAf(1.f)) const
Draw to the given coordinates.
Definition: Drawables.h:22
basic_Point< Float > Pointf
Definition: Point.h:601
basic_Size< Float > Sizef
Definition: Size.h:388
This interface defines a class that can be used as a common target for texture based drawing.
Definition: TextureTargets.h:12
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
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.
This class represents a 2D point.
Definition: Point.h:32
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.
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
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
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
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
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
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
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
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
const Geometry::Size GetSize() const
Returns the size of this object.
Definition: Drawables.h:443
@ Graphics
Definition: Template.h:164
Definition: Drawables.h:74
void DrawIn(TextureTarget &target, const Geometry::Rectangle &r, RGBAf color=RGBAf(1.f)) const
Draw in the given area.
Definition: Drawables.h:227
This interface represents a GL texture source.
Definition: Graphics.h:480
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
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
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
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
virtual Geometry::Size getsize() const override
Should return the exact size of this object.
Definition: Drawables.h:515
int GetHeight() const
Returns the height of the drawable.
Definition: Drawables.h:451
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
T_ Y
Y coordinate.
Definition: Point.h:371
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
T_ Width
Width of this size object.
Definition: Size.h:258
Represents a drawable object, that can be drawn to the given point.
Definition: Drawables.h:17
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
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
int GetWidth() const
Returns the width of the drawable.
Definition: Drawables.h:448
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
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
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.
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
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
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
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
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
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
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
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.
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
Represents a rectangle in a 2D space.
Definition: Rectangle.h:19
virtual void drawin(TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const =0
This function should draw this drawable inside the given rectangle.
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
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
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
virtual ~SizelessDrawable()
Definition: Drawables.h:50
virtual Geometry::Size GetImageSize() const =0
Should return the size of the image stored in texture. Not the whole texture size.
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
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...
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
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
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
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
Graphics::Tiling GetTiling() const
Definition: Graphics.h:465