The Battle for Wesnoth  1.19.0-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 303 of file draw.hpp.

Constructor & Destructor Documentation

◆ clip_setter()

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

Definition at line 438 of file draw.cpp.

References draw::force_clip().

◆ ~clip_setter()

draw::clip_setter::~clip_setter ( )

Definition at line 444 of file draw.cpp.

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

Member Data Documentation

◆ c_

SDL_Rect draw::clip_setter::c_

Definition at line 309 of file draw.hpp.

◆ clip_enabled_

bool draw::clip_setter::clip_enabled_

Definition at line 310 of file draw.hpp.

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