The Battle for Wesnoth  1.19.7+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:

Public Member Functions

 fl_modification (bool horiz=false, bool vert=false)
 Constructor. More...
 
virtual void operator() (surface &src) const override
 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 150 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 158 of file image_modifications.hpp.

Member Function Documentation

◆ get_horiz()

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

Definition at line 166 of file image_modifications.hpp.

References horiz_.

Referenced by BOOST_AUTO_TEST_CASE().

◆ get_vert()

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

Definition at line 167 of file image_modifications.hpp.

References vert_.

Referenced by BOOST_AUTO_TEST_CASE().

◆ no_op()

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

Definition at line 175 of file image_modifications.hpp.

References horiz_, and vert_.

◆ operator()()

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

Applies the image-path modification on the specified surface.

Implements image::modification.

Definition at line 159 of file image_modifications.cpp.

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

◆ set_horiz()

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

Definition at line 164 of file image_modifications.hpp.

References horiz_.

◆ set_vert()

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

Definition at line 165 of file image_modifications.hpp.

References vert_.

◆ toggle_horiz()

bool image::fl_modification::toggle_horiz ( )
inline

Toggle horizontal mirror flag.

Returns
The new flag state after toggling.

Definition at line 170 of file image_modifications.hpp.

References horiz_.

◆ toggle_vert()

bool image::fl_modification::toggle_vert ( )
inline

Toggle vertical mirror flag.

Returns
The new flag state after toggling.

Definition at line 173 of file image_modifications.hpp.

References vert_.

Member Data Documentation

◆ horiz_

bool image::fl_modification::horiz_
private

Definition at line 178 of file image_modifications.hpp.

Referenced by get_horiz(), no_op(), set_horiz(), and toggle_horiz().

◆ vert_

bool image::fl_modification::vert_
private

Definition at line 179 of file image_modifications.hpp.

Referenced by get_vert(), no_op(), set_vert(), and toggle_vert().


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