63 void fill(
const SDL_Rect&
rect, uint8_t r, uint8_t
g, uint8_t
b, uint8_t
a);
64 void fill(
const SDL_Rect&
rect, uint8_t r, uint8_t
g, uint8_t
b);
66 void fill(uint8_t r, uint8_t
g, uint8_t
b, uint8_t
a);
67 void fill(uint8_t r, uint8_t
g, uint8_t
b);
95 void set_color(uint8_t r, uint8_t
g, uint8_t
b, uint8_t
a);
126 void rect(
const SDL_Rect&
rect, uint8_t r, uint8_t
g, uint8_t
b, uint8_t
a);
127 void rect(
const SDL_Rect&
rect, uint8_t r, uint8_t
g, uint8_t
b);
141 void line(
int from_x,
int from_y,
int to_x,
int to_y);
152 void line(
int from_x,
int from_y,
int to_x,
int to_y,
const color_t&
c);
158 void point(
int x,
int y);
179 void circle(
int x,
int y,
int r,
const color_t&
c, uint8_t octants = 0xff);
180 void circle(
int x,
int y,
int r, uint8_t octants = 0xff);
197 void disc(
int x,
int y,
int r,
const color_t&
c, uint8_t octants = 0xff);
198 void disc(
int x,
int y,
int r, uint8_t octants = 0xff);
222 void blit(
const texture& tex,
const SDL_Rect& dst);
243 void flipped(
const texture& tex,
bool flip_h =
true,
bool flip_v =
false);
264 bool centered =
false,
265 bool mirrored =
false
275 bool centered =
false,
276 bool mirrored =
false
A class to manage automatic restoration of the clipping region.
clip_setter(const SDL_Rect &clip)
A class to manage automatic restoration of the render target.
render_target_setter(const texture &t)
A class to manage automatic restoration of the viewport region.
viewport_setter(const SDL_Rect &viewport)
Wrapper class to encapsulate creation and management of an SDL_Texture.
viewport_setter set_viewport(const SDL_Rect &viewport)
Set the viewport.
void force_viewport(const SDL_Rect &viewport)
Set the viewport, without any provided way of setting it back.
render_target_setter set_render_target(const texture &t)
Set the given texture as the active render target.
clip_setter override_clip(const SDL_Rect &clip)
Override the clipping area.
void circle(int x, int y, int r, const color_t &c, uint8_t octants=0xff)
Draw a circle of the given colour.
void points(const std::vector< SDL_Point > &points)
Draw a set of points.
void force_clip(const SDL_Rect &clip)
Set the clipping area, without any provided way of setting it back.
SDL_Rect get_viewport()
Get the current viewport.
bool null_clip()
Whether the current clipping region will disallow drawing.
clip_setter reduce_clip(const SDL_Rect &clip)
Set the clipping area to the intersection of the current clipping area and the given rectangle.
bool clip_enabled()
Whether clipping is enabled.
void tiled(const texture &tex, const SDL_Rect &dst, bool centered=false, bool mirrored=false)
Tile a texture to fill a region.
void disc(int x, int y, int r, const color_t &c, uint8_t octants=0xff)
Draw a solid disc of the given colour.
void set_color(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Set the drawing colour.
void flipped(const texture &tex, const SDL_Rect &dst, bool flip_h=true, bool flip_v=false)
Draws a texture, or part of a texture, at the given location, also mirroring/flipping the texture hor...
void fill(const SDL_Rect &rect, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Fill an area with the given colour.
void point(int x, int y)
Draw a single point.
void set_blend_mode(SDL_BlendMode b)
Set the blend mode used for drawing operations such as fill() and line().
void blit(const texture &tex, const SDL_Rect &dst)
Draws a texture, or part of a texture, at the given location.
void tiled_highres(const texture &tex, const SDL_Rect &dst, bool centered=false, bool mirrored=false)
Tile a texture to fill a region.
::rect get_clip()
Get the current clipping area, in draw coordinates.
void rect(const SDL_Rect &rect)
Draw a rectangle.
void disable_clip()
Disable clipping.
void line(int from_x, int from_y, int to_x, int to_y)
Draw a line.
Contains the SDL_Rect helper code.
The basic class for representing 8-bit RGB or RGBA colour values.
An abstract description of a rectangle with integer coordinates.