A class to manage automatic restoration of the viewport region. More...
#include <draw.hpp>
Public Member Functions | |
viewport_setter (const SDL_Rect &viewport) | |
~viewport_setter () | |
Private Attributes | |
SDL_Rect | v_ |
SDL_Rect | c_ |
bool | clip_enabled_ |
A class to manage automatic restoration of the viewport region.
This will also translate the current clipping region into the space of the viewport, if a clipping region is set.
This can be constructed on its own, or the draw::set_viewport() utility function can be used.
|
explicit |
Definition at line 569 of file draw.cpp.
References c_, clip_enabled_, draw::force_clip(), draw::force_viewport(), draw::get_clip(), draw::get_viewport(), and v_.
draw::viewport_setter::~viewport_setter | ( | ) |
Definition at line 586 of file draw.cpp.
References draw::disable_clip(), draw::force_clip(), and draw::force_viewport().
|
private |
Definition at line 416 of file draw.hpp.
Referenced by viewport_setter().
|
private |
Definition at line 417 of file draw.hpp.
Referenced by viewport_setter().
|
private |
Definition at line 415 of file draw.hpp.
Referenced by viewport_setter().