The Battle for Wesnoth  1.17.23+dev
Public Member Functions | Protected Attributes | Private Attributes | List of all members
image::scale_modification Class Referenceabstract

Scaling modifications base class. More...

#include <image_modifications.hpp>

Inheritance diagram for image::scale_modification:

Public Member Functions

 scale_modification (int width, int height, const std::string &fn, bool use_nn)
 
virtual surface operator() (const surface &src) const
 Applies the image-path modification on the specified surface. More...
 
virtual std::pair< int, int > calculate_size (const surface &src) const =0
 
int get_w () const
 
int get_h () const
 
- Public Member Functions inherited from image::modification
virtual ~modification ()
 
virtual int priority () const
 Specifies the priority of the modification. More...
 

Protected Attributes

const std::string fn_
 

Private Attributes

int w_
 
int h_
 
bool nn_
 

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

Scaling modifications base class.

Definition at line 432 of file image_modifications.hpp.

Constructor & Destructor Documentation

◆ scale_modification()

image::scale_modification::scale_modification ( int  width,
int  height,
const std::string &  fn,
bool  use_nn 
)
inline

Definition at line 435 of file image_modifications.hpp.

Member Function Documentation

◆ calculate_size()

virtual std::pair<int,int> image::scale_modification::calculate_size ( const surface src) const
pure virtual

◆ get_h()

int image::scale_modification::get_h ( ) const
inline

Definition at line 446 of file image_modifications.hpp.

References h_.

Referenced by BOOST_AUTO_TEST_CASE().

◆ get_w()

int image::scale_modification::get_w ( ) const
inline

Definition at line 441 of file image_modifications.hpp.

References w_.

Referenced by BOOST_AUTO_TEST_CASE().

◆ operator()()

surface image::scale_modification::operator() ( const surface src) const
virtual

Applies the image-path modification on the specified surface.

Implements image::modification.

Definition at line 465 of file image_modifications.cpp.

References scale_surface_legacy(), and scale_surface_sharp().

Member Data Documentation

◆ fn_

const std::string image::scale_modification::fn_
protected

Definition at line 456 of file image_modifications.hpp.

◆ h_

int image::scale_modification::h_
private

Definition at line 452 of file image_modifications.hpp.

Referenced by get_h().

◆ nn_

bool image::scale_modification::nn_
private

Definition at line 453 of file image_modifications.hpp.

◆ w_

int image::scale_modification::w_
private

Definition at line 452 of file image_modifications.hpp.

Referenced by get_w().


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