The Battle for Wesnoth  1.15.1+dev
Public Member Functions | List of all members
image::scale_into_modification Class Reference

Scale into (SCALE_INTO) modification. More...

#include <image_modifications.hpp>

Inheritance diagram for image::scale_into_modification:
Inheritance graph

Public Member Functions

 scale_into_modification (int width, int height, const std::string &fn, bool use_nn)
 
virtual std::pair< int, int > calculate_size (const surface &src) const
 
- Public Member Functions inherited from image::scale_modification
 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...
 
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...
 

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...
 
- Protected Attributes inherited from image::scale_modification
const std::string fn_
 

Detailed Description

Scale into (SCALE_INTO) modification.

(SCALE_INTO, SCALE_INTO_SHARP) Preserves aspect ratio.

Definition at line 473 of file image_modifications.hpp.

Constructor & Destructor Documentation

◆ scale_into_modification()

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

Definition at line 476 of file image_modifications.hpp.

Member Function Documentation

◆ calculate_size()

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

Implements image::scale_modification.

Definition at line 498 of file image_modifications.cpp.

References ERR_DP, h, and w.


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