The Battle for Wesnoth  1.17.10+dev
Public Member Functions | Private Attributes | List of all members
draw::viewport_setter Class Reference

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_
 

Detailed Description

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.

Definition at line 364 of file draw.hpp.

Constructor & Destructor Documentation

◆ viewport_setter()

draw::viewport_setter::viewport_setter ( const SDL_Rect &  viewport)
explicit

◆ ~viewport_setter()

draw::viewport_setter::~viewport_setter ( )

Member Data Documentation

◆ c_

SDL_Rect draw::viewport_setter::c_
private

Definition at line 371 of file draw.hpp.

Referenced by viewport_setter(), and ~viewport_setter().

◆ clip_enabled_

bool draw::viewport_setter::clip_enabled_
private

Definition at line 372 of file draw.hpp.

Referenced by viewport_setter(), and ~viewport_setter().

◆ v_

SDL_Rect draw::viewport_setter::v_
private

Definition at line 370 of file draw.hpp.

Referenced by viewport_setter(), and ~viewport_setter().


The documentation for this class was generated from the following files: