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

A class to manage automatic restoration of the render target. More...

#include <draw.hpp>

Public Member Functions

 render_target_setter (const texture &t)
 
 ~render_target_setter ()
 

Private Attributes

texture target_
 
::rect viewport_
 
::rect clip_
 

Detailed Description

A class to manage automatic restoration of the render target.

It will also cache and restore the current viewport.

This can be constructed on its own, or the draw::set_render_target() utility function can be used.

Definition at line 469 of file draw.hpp.

Constructor & Destructor Documentation

◆ render_target_setter()

draw::render_target_setter::render_target_setter ( const texture t)
explicit

◆ ~render_target_setter()

draw::render_target_setter::~render_target_setter ( )

Definition at line 652 of file draw.cpp.

References sdl::empty_rect, video::force_render_target(), renderer(), and WRN_D.

Member Data Documentation

◆ clip_

::rect draw::render_target_setter::clip_
private

Definition at line 478 of file draw.hpp.

Referenced by render_target_setter().

◆ target_

texture draw::render_target_setter::target_
private

Definition at line 476 of file draw.hpp.

Referenced by render_target_setter().

◆ viewport_

::rect draw::render_target_setter::viewport_
private

Definition at line 477 of file draw.hpp.

Referenced by render_target_setter().


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