1 #if !defined(_BTKIMPL_RENDER_HPP_) 2 #define _BTKIMPL_RENDER_HPP_ 3 #include <SDL2/SDL_render.h> 12 Renderer(SDL_Renderer *ren =
nullptr):render(ren){};
15 int line(
int x1,
int y1,
int x2,
int y2,SDL_Color c);
16 int aaline(
int x1,
int y1,
int x2,
int y2,SDL_Color c);
18 int fill_rect(
const SDL_Rect &,SDL_Color c);
20 int draw_rect(
const SDL_Rect &,SDL_Color c);
21 int rounded_box(
const SDL_Rect &,
int rad,SDL_Color c);
22 int rounded_rect(
const SDL_Rect &,
int rad,SDL_Color c);
24 inline int rect(
const SDL_Rect &r,SDL_Color c){
25 return draw_rect(r,c);
27 inline int box(
const SDL_Rect &r,SDL_Color c){
28 return fill_rect(r,c);
31 int rounded_box_with_boarder(
const SDL_Rect &rect,
37 i |= rounded_box(rect,rad,bg);
39 i |= rounded_rect(rect,rad,boarder);
43 Renderer &operator =(SDL_Renderer *renderer){
47 SDL_Renderer* operator *() const noexcept{
50 bool operator ==(SDL_Renderer *r)
const noexcept{
56 int set_viewport(
const SDL_Rect &r);
60 int set_cliprect(
const SDL_Rect &r);
62 int copy(
const Texture &t,
const SDL_Rect *src,
const SDL_Rect *dst);
63 int start(SDL_Color bgcolor);
67 Texture create_from(
const PixBuf &pixbuf);
68 Texture clone_texture(
const Texture &);
69 PixBuf dump_texture(
const Texture &);
76 #include "../render.hpp" 78 #endif // _BTKIMPL_RENDER_HPP_ This header include many useful containers.
Definition: async.hpp:7