The Battle for Wesnoth  1.17.5+dev
Public Member Functions | Private Attributes | List of all members
surface_restorer Struct Reference

#include <surface.hpp>

Public Member Functions

 surface_restorer ()
 surface_restorer (class CVideo *target, const SDL_Rect &rect)
 ~surface_restorer ()
void restore () const
void restore (const SDL_Rect &dst) const
void update ()
void cancel ()
const SDL_Rect & area () const

Private Attributes

class CVideotarget_
SDL_Rect rect_
texture surface_

Detailed Description

Definition at line 118 of file surface.hpp.

Constructor & Destructor Documentation

◆ surface_restorer() [1/2]

surface_restorer::surface_restorer ( )

Definition at line 86 of file surface.cpp.

◆ surface_restorer() [2/2]

surface_restorer::surface_restorer ( class CVideo target,
const SDL_Rect &  rect 

Definition at line 93 of file surface.cpp.

References update().

◆ ~surface_restorer()

surface_restorer::~surface_restorer ( )

Definition at line 101 of file surface.cpp.

References restore().

Member Function Documentation

◆ area()

const SDL_Rect& surface_restorer::area ( ) const

Definition at line 129 of file surface.hpp.

◆ cancel()

void surface_restorer::cancel ( )

Definition at line 142 of file surface.cpp.

References texture::reset(), and surface_.

◆ restore() [1/2]

void surface_restorer::restore ( ) const

Definition at line 124 of file surface.cpp.

References draw::blit(), rect_, and surface_.

Referenced by ~surface_restorer().

◆ restore() [2/2]

void surface_restorer::restore ( const SDL_Rect &  dst) const

Definition at line 106 of file surface.cpp.

References draw::blit(), sdl::intersect_rects(), rect_, and surface_.

◆ update()

void surface_restorer::update ( )

Definition at line 133 of file surface.cpp.

References CVideo::read_pixels_low_res(), rect_, texture::reset(), surface_, and target_.

Referenced by surface_restorer().

Member Data Documentation

◆ rect_

SDL_Rect surface_restorer::rect_

Definition at line 133 of file surface.hpp.

Referenced by restore(), and update().

◆ surface_

texture surface_restorer::surface_

Definition at line 134 of file surface.hpp.

Referenced by cancel(), restore(), and update().

◆ target_

class CVideo* surface_restorer::target_

Definition at line 132 of file surface.hpp.

Referenced by update().

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