The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Private Attributes | List of all members
image::crop_modification Class Reference

Crop (CROP) modification. More...

#include <image_modifications.hpp>

Inheritance diagram for image::crop_modification:

Public Member Functions

 crop_modification (const SDL_Rect &slice)
 
virtual void operator() (surface &src) const override
 Applies the image-path modification on the specified surface. More...
 
const SDL_Rect & get_slice () const
 
- Public Member Functions inherited from image::modification
virtual ~modification ()
 
virtual int priority () const
 Specifies the priority of the modification. More...
 

Private Attributes

SDL_Rect slice_
 

Additional Inherited Members

- Static Public Member Functions inherited from image::modification
static modification_queue decode (const std::string &)
 Decodes modifications from a modification string. More...
 

Detailed Description

Crop (CROP) modification.

Definition at line 334 of file image_modifications.hpp.

Constructor & Destructor Documentation

◆ crop_modification()

image::crop_modification::crop_modification ( const SDL_Rect &  slice)
inline

Definition at line 337 of file image_modifications.hpp.

Member Function Documentation

◆ get_slice()

const SDL_Rect& image::crop_modification::get_slice ( ) const
inline

Definition at line 342 of file image_modifications.hpp.

References slice_.

Referenced by BOOST_AUTO_TEST_CASE().

◆ operator()()

void image::crop_modification::operator() ( surface src) const
overridevirtual

Applies the image-path modification on the specified surface.

Implements image::modification.

Definition at line 354 of file image_modifications.cpp.

References cut_surface(), and src.

Member Data Documentation

◆ slice_

SDL_Rect image::crop_modification::slice_
private

Definition at line 348 of file image_modifications.hpp.

Referenced by get_slice().


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