The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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

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

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

Definition at line 164 of file image_modifications.hpp.

References horiz_.

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

Definition at line 165 of file image_modifications.hpp.

References vert_.

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

Definition at line 173 of file image_modifications.hpp.

References horiz_, and vert_.

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 156 of file image_modifications.cpp.

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

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

Definition at line 162 of file image_modifications.hpp.

References horiz_.

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

Definition at line 163 of file image_modifications.hpp.

References vert_.

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.

References horiz_.

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.

References vert_.

Member Data Documentation

bool image::fl_modification::horiz_
private

Definition at line 176 of file image_modifications.hpp.

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

bool image::fl_modification::vert_
private

Definition at line 177 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: