17 #ifndef HEADER_SUPERTUX_VIDEO_VIEWPORT_HPP 18 #define HEADER_SUPERTUX_VIDEO_VIEWPORT_HPP 20 #include "math/rect.hpp" 21 #include "math/vector.hpp" 27 static Viewport from_size(
const Size& target_size,
const Size& desktop_size);
49 Vector
to_logical(
int physical_x,
int physical_y)
const;
56 static const Size s_max_size;
59 static const Size s_min_size;
int get_screen_height() const
The height of the resulting logical screen.
Definition: viewport.cpp:198
Vector to_logical(int physical_x, int physical_y) const
Converts window coordinates into logical screen coordinates.
Definition: viewport.cpp:210
bool needs_clear_screen() const
True if the logical screen doens't cover the whole window.
Definition: viewport.cpp:217
Size get_screen_size() const
The size of the resulting logical screen.
Definition: viewport.cpp:204
Rect get_rect() const
The size of the viewport in window coordinates.
Definition: viewport.hpp:34
Definition: viewport.hpp:23
int get_screen_width() const
The width of the resulting logical screen.
Definition: viewport.cpp:192
Vector get_scale() const
The amount by which the content of the viewport is scaled.
Definition: viewport.hpp:37