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

A class to manage automatic restoration of the clipping region. More...

#include <draw.hpp>

Public Member Functions

 clip_setter (const SDL_Rect &clip)
 
 ~clip_setter ()
 

Private Attributes

SDL_Rect c_
 
bool clip_enabled_
 

Detailed Description

A class to manage automatic restoration of the clipping region.

This can be constructed on its own, or one of the utility functions override_clip() and reduce_clip() can be used. Constructing a clip_setter or using override_clip() will completely override the current clipping area. To intersect with the current clipping area in stead, use reduce_clip().

Definition at line 292 of file draw.hpp.

Constructor & Destructor Documentation

◆ clip_setter()

draw::clip_setter::clip_setter ( const SDL_Rect &  clip)
explicit

Definition at line 428 of file draw.cpp.

References draw::force_clip().

◆ ~clip_setter()

draw::clip_setter::~clip_setter ( )

Definition at line 434 of file draw.cpp.

References c_, clip_enabled_, draw::disable_clip(), and draw::force_clip().

Member Data Documentation

◆ c_

SDL_Rect draw::clip_setter::c_
private

Definition at line 298 of file draw.hpp.

Referenced by ~clip_setter().

◆ clip_enabled_

bool draw::clip_setter::clip_enabled_
private

Definition at line 299 of file draw.hpp.

Referenced by ~clip_setter().


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