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

Mirror (FL) modification. More...

#include <image_modifications.hpp>

Inheritance diagram for image::fl_modification:
Inheritance graph

Public Member Functions

 fl_modification (bool horiz=false, bool vert=false)
 Constructor. More...
 
virtual surface operator() (const surface &src) const
 Applies the image-path modification on the specified surface. More...
 
void set_horiz (bool val)
 
void set_vert (bool val)
 
bool get_horiz () const
 
bool get_vert () const
 
bool toggle_horiz ()
 Toggle horizontal mirror flag. More...
 
bool toggle_vert ()
 Toggle vertical mirror flag. More...
 
bool no_op () const
 
- Public Member Functions inherited from image::modification
virtual ~modification ()
 
virtual int priority () const
 Specifies the priority of the modification. More...
 

Private Attributes

bool horiz_
 
bool vert_
 

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

Mirror (FL) modification.

Definition at line 148 of file image_modifications.hpp.

Constructor & Destructor Documentation

◆ fl_modification()

image::fl_modification::fl_modification ( bool  horiz = false,
bool  vert = false 
)
inline

Constructor.

Parameters
horizHorizontal mirror flag.
vertVertical mirror flag.

Definition at line 156 of file image_modifications.hpp.

Member Function Documentation

◆ get_horiz()

bool image::fl_modification::get_horiz ( ) const
inline

Definition at line 164 of file image_modifications.hpp.

◆ get_vert()

bool image::fl_modification::get_vert ( ) const
inline

Definition at line 165 of file image_modifications.hpp.

◆ no_op()

bool image::fl_modification::no_op ( ) const
inline

Definition at line 173 of file image_modifications.hpp.

◆ operator()()

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

Applies the image-path modification on the specified surface.

Implements image::modification.

Definition at line 158 of file image_modifications.cpp.

References flip_surface(), flop_surface(), and rotate_180_surface().

◆ set_horiz()

void image::fl_modification::set_horiz ( bool  val)
inline

Definition at line 162 of file image_modifications.hpp.

◆ set_vert()

void image::fl_modification::set_vert ( bool  val)
inline

Definition at line 163 of file image_modifications.hpp.

◆ toggle_horiz()

bool image::fl_modification::toggle_horiz ( )
inline

Toggle horizontal mirror flag.

Returns
The new flag state after toggling.

Definition at line 168 of file image_modifications.hpp.

◆ toggle_vert()

bool image::fl_modification::toggle_vert ( )
inline

Toggle vertical mirror flag.

Returns
The new flag state after toggling.

Definition at line 171 of file image_modifications.hpp.

Member Data Documentation

◆ horiz_

bool image::fl_modification::horiz_
private

Definition at line 176 of file image_modifications.hpp.

◆ vert_

bool image::fl_modification::vert_
private

Definition at line 177 of file image_modifications.hpp.


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