1 // Copyright Timothy Goya 2007.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef UNISON_VIDEO_AUTO_RENDERER_HPP
7 #define UNISON_VIDEO_AUTO_RENDERER_HPP
9 #include <unison/video/backend/Renderer.hpp>
25 /// Does rendering tasks like blits and color fills using SDL
26 class Renderer : public Backend::Renderer
29 Renderer(const std::vector<Backend::Renderer *> &renderers);
35 std::string get_name();
38 Surface load_surface(const std::string &filename);
39 Surface load_surface(const std::string &filename, const Color &colorkey);
40 void save_surface(const Surface &surface, const std::string &filename);
42 void blit(const Surface &src, const Rect &src_rect, Surface &dst, const Point &dst_pos, const RenderOptions &options);
43 void blit(Backend::Texture *src, const Rect &src_rect, Surface &dst, const Point &dst_pos, const RenderOptions &options);
44 void fill(Surface &dst, const Color &color, const Rect &rect);
45 void fill_blend(Surface &dst, const Color &color, const Rect &rect);
47 Backend::Window *create_window(const Area &size, const Area &logical_size, bool fullscreen);
48 Backend::Texture *create_texture(const Surface &surface);
50 Backend::Renderer *renderer;
51 const std::vector<Backend::Renderer *> &renderers;