The Battle for Wesnoth  1.15.2+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:
Inheritance graph

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 430 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 433 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 444 of file image_modifications.hpp.

◆ get_w()

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

Definition at line 439 of file image_modifications.hpp.

References w_.

◆ 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 464 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 454 of file image_modifications.hpp.

◆ h_

int image::scale_modification::h_
private

Definition at line 450 of file image_modifications.hpp.

◆ nn_

bool image::scale_modification::nn_
private

Definition at line 451 of file image_modifications.hpp.

◆ w_

int image::scale_modification::w_
private

Definition at line 450 of file image_modifications.hpp.


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