The Battle for Wesnoth  1.15.2+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_
 
surface surface_
 

Detailed Description

Definition at line 122 of file surface.hpp.

Constructor & Destructor Documentation

◆ surface_restorer() [1/2]

surface_restorer::surface_restorer ( )

Definition at line 109 of file surface.cpp.

◆ surface_restorer() [2/2]

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

Definition at line 116 of file surface.cpp.

References update().

◆ ~surface_restorer()

surface_restorer::~surface_restorer ( )

Definition at line 124 of file surface.cpp.

References restore().

Member Function Documentation

◆ area()

const SDL_Rect& surface_restorer::area ( ) const
inline

Definition at line 133 of file surface.hpp.

◆ cancel()

void surface_restorer::cancel ( )

Definition at line 165 of file surface.cpp.

References surface_.

◆ restore() [1/2]

void surface_restorer::restore ( ) const

Definition at line 146 of file surface.cpp.

References CVideo::getSurface(), rect_, sdl_blit(), surface_, and target_.

Referenced by ~surface_restorer().

◆ restore() [2/2]

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

Definition at line 129 of file surface.cpp.

References CVideo::getSurface(), sdl::intersect_rects(), rect_, sdl_blit(), surface_, and target_.

◆ update()

void surface_restorer::update ( )

Definition at line 156 of file surface.cpp.

References get_surface_portion(), CVideo::getSurface(), rect_, surface_, and target_.

Referenced by surface_restorer().

Member Data Documentation

◆ rect_

SDL_Rect surface_restorer::rect_
private

Definition at line 137 of file surface.hpp.

Referenced by restore(), and update().

◆ surface_

surface surface_restorer::surface_
private

Definition at line 138 of file surface.hpp.

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

◆ target_

class CVideo* surface_restorer::target_
private

Definition at line 136 of file surface.hpp.

Referenced by restore(), and update().


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