The Battle for Wesnoth  1.15.0-dev
Public Member Functions | Private Attributes | List of all members
storyscreen::background_layer Class Reference

#include <part.hpp>

Public Member Functions

 background_layer ()
 
 background_layer (const config &cfg)
 Constructor. More...
 
bool scale_horizontally () const
 Whether the layer should be scaled horizontally. More...
 
void set_scale_horizontally (bool b)
 Sets whether the layer should be scaled horizontally. More...
 
bool scale_vertically () const
 Whether the layer should be scaled vertically. More...
 
void set_scale_vertically (bool b)
 Sets whether the layer should be scaled vertically. More...
 
bool tile_horizontally () const
 Whether the layer should be tiled horizontally. More...
 
void set_tile_horizontally (bool b)
 Sets whether the layer should be tiled horizontally. More...
 
bool tile_vertically () const
 Whether the layer should be tiled vertically. More...
 
void set_tile_vertically (bool b)
 Sets whether the layer should be tiled vertically. More...
 
bool keep_aspect_ratio () const
 Whether the aspect ratio should be preserved while scaling. More...
 
void set_keep_aspect_ratio (bool b)
 Sets whether the aspect ratio should be preserved. More...
 
bool is_base_layer () const
 Whether is this layer the base layer. More...
 
void set_base_layer (bool b)
 Sets whether is this layer a base layer. More...
 
const std::string & file () const
 The path to the file to load the image from. More...
 
void set_file (const std::string &str)
 Sets the path to the image file. More...
 

Private Attributes

bool scale_horizontally_
 
bool scale_vertically_
 
bool tile_horizontally_
 
bool tile_vertically_
 
bool keep_aspect_ratio_
 
bool is_base_layer_
 
std::string image_file_
 

Detailed Description

Definition at line 116 of file part.hpp.

Constructor & Destructor Documentation

◆ background_layer() [1/2]

storyscreen::background_layer::background_layer ( )

Definition at line 62 of file part.cpp.

◆ background_layer() [2/2]

storyscreen::background_layer::background_layer ( const config cfg)

Member Function Documentation

◆ file()

const std::string& storyscreen::background_layer::file ( ) const
inline

The path to the file to load the image from.

Definition at line 200 of file part.hpp.

◆ is_base_layer()

bool storyscreen::background_layer::is_base_layer ( ) const
inline

Whether is this layer the base layer.

Definition at line 188 of file part.hpp.

◆ keep_aspect_ratio()

bool storyscreen::background_layer::keep_aspect_ratio ( ) const
inline

Whether the aspect ratio should be preserved while scaling.

Definition at line 176 of file part.hpp.

◆ scale_horizontally()

bool storyscreen::background_layer::scale_horizontally ( ) const
inline

Whether the layer should be scaled horizontally.

Definition at line 128 of file part.hpp.

◆ scale_vertically()

bool storyscreen::background_layer::scale_vertically ( ) const
inline

Whether the layer should be scaled vertically.

Definition at line 140 of file part.hpp.

◆ set_base_layer()

void storyscreen::background_layer::set_base_layer ( bool  b)
inline

Sets whether is this layer a base layer.

Definition at line 194 of file part.hpp.

References b.

◆ set_file()

void storyscreen::background_layer::set_file ( const std::string &  str)
inline

Sets the path to the image file.

Definition at line 206 of file part.hpp.

Referenced by storyscreen::part::resolve_wml().

◆ set_keep_aspect_ratio()

void storyscreen::background_layer::set_keep_aspect_ratio ( bool  b)
inline

Sets whether the aspect ratio should be preserved.

Definition at line 182 of file part.hpp.

References b.

Referenced by storyscreen::part::resolve_wml().

◆ set_scale_horizontally()

void storyscreen::background_layer::set_scale_horizontally ( bool  b)
inline

Sets whether the layer should be scaled horizontally.

Definition at line 134 of file part.hpp.

References b.

Referenced by storyscreen::part::resolve_wml().

◆ set_scale_vertically()

void storyscreen::background_layer::set_scale_vertically ( bool  b)
inline

Sets whether the layer should be scaled vertically.

Definition at line 146 of file part.hpp.

References b.

Referenced by storyscreen::part::resolve_wml().

◆ set_tile_horizontally()

void storyscreen::background_layer::set_tile_horizontally ( bool  b)
inline

Sets whether the layer should be tiled horizontally.

Definition at line 158 of file part.hpp.

References b.

Referenced by storyscreen::part::resolve_wml().

◆ set_tile_vertically()

void storyscreen::background_layer::set_tile_vertically ( bool  b)
inline

Sets whether the layer should be tiled vertically.

Definition at line 170 of file part.hpp.

References b.

Referenced by storyscreen::part::resolve_wml().

◆ tile_horizontally()

bool storyscreen::background_layer::tile_horizontally ( ) const
inline

Whether the layer should be tiled horizontally.

Definition at line 152 of file part.hpp.

◆ tile_vertically()

bool storyscreen::background_layer::tile_vertically ( ) const
inline

Whether the layer should be tiled vertically.

Definition at line 164 of file part.hpp.

Member Data Documentation

◆ image_file_

std::string storyscreen::background_layer::image_file_
private

Definition at line 218 of file part.hpp.

Referenced by background_layer().

◆ is_base_layer_

bool storyscreen::background_layer::is_base_layer_
private

Definition at line 217 of file part.hpp.

Referenced by background_layer().

◆ keep_aspect_ratio_

bool storyscreen::background_layer::keep_aspect_ratio_
private

Definition at line 216 of file part.hpp.

Referenced by background_layer().

◆ scale_horizontally_

bool storyscreen::background_layer::scale_horizontally_
private

Definition at line 212 of file part.hpp.

Referenced by background_layer().

◆ scale_vertically_

bool storyscreen::background_layer::scale_vertically_
private

Definition at line 213 of file part.hpp.

Referenced by background_layer().

◆ tile_horizontally_

bool storyscreen::background_layer::tile_horizontally_
private

Definition at line 214 of file part.hpp.

Referenced by background_layer().

◆ tile_vertically_

bool storyscreen::background_layer::tile_vertically_
private

Definition at line 215 of file part.hpp.

Referenced by background_layer().


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