The Battle for Wesnoth  1.19.7+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 409 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 ( )

Definition at line 586 of file draw.cpp.

References draw::disable_clip(), draw::force_clip(), and draw::force_viewport().

Member Data Documentation

◆ c_

SDL_Rect draw::viewport_setter::c_
private

Definition at line 416 of file draw.hpp.

Referenced by viewport_setter().

◆ clip_enabled_

bool draw::viewport_setter::clip_enabled_
private

Definition at line 417 of file draw.hpp.

Referenced by viewport_setter().

◆ v_

SDL_Rect draw::viewport_setter::v_
private

Definition at line 415 of file draw.hpp.

Referenced by viewport_setter().


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