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_SDL_WINDOW_HPP
7 #define UNISON_VIDEO_SDL_WINDOW_HPP
9 #include <unison/video/backend/Window.hpp>
10 #include <unison/video/RenderOptions.hpp>
22 class Window : public Backend::Window
25 Window(const Area &size, const Area &logical_size, bool fullscreen = false);
28 void take_screenshot(const std::string &filename) const;
30 void set_title(const std::string &title);
31 void set_icon(const Surface &icon);
32 Area get_size() const;
33 bool is_fullscreen() const;
34 void blit(const Surface &src, const Point &dst_pos, const Rect &src_rect, const RenderOptions &options);
35 void blit(const Video::Texture &src, const Point &dst_pos, const Rect &src_rect, const RenderOptions &options);
36 void fill(const Color &color, const Rect &rect);
37 void fill_blend(const Color &color, const Rect &rect);
39 /// The numerator of the scaling ratio
40 unsigned int scale_numerator;
42 /// The denominator of the scaling ratio
43 unsigned int scale_denominator;
45 /// The offset used to center the drawing area