#include <part.hpp>
Public Member Functions | |
background_layer () | |
Constructor. More... | |
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_ |
storyscreen::background_layer::background_layer | ( | ) |
storyscreen::background_layer::background_layer | ( | const config & | cfg | ) |
Constructor.
Initializes a background_layer object from a [background_layer] WML node.
Definition at line 132 of file part.cpp.
References config::has_attribute(), image_file_, is_base_layer_, keep_aspect_ratio_, scale_horizontally_, scale_vertically_, tile_horizontally_, and tile_vertically_.
|
inline |
The path to the file to load the image from.
Definition at line 221 of file part.hpp.
References image_file_.
|
inline |
Whether is this layer the base layer.
Definition at line 207 of file part.hpp.
References is_base_layer_.
|
inline |
Whether the aspect ratio should be preserved while scaling.
Definition at line 193 of file part.hpp.
References keep_aspect_ratio_.
|
inline |
Whether the layer should be scaled horizontally.
Definition at line 137 of file part.hpp.
References scale_horizontally_.
|
inline |
Whether the layer should be scaled vertically.
Definition at line 151 of file part.hpp.
References scale_vertically_.
|
inline |
Sets whether is this layer a base layer.
Definition at line 214 of file part.hpp.
References is_base_layer_.
|
inline |
Sets the path to the image file.
Definition at line 228 of file part.hpp.
References image_file_.
Referenced by storyscreen::part::resolve_wml().
|
inline |
Sets whether the aspect ratio should be preserved.
Definition at line 200 of file part.hpp.
References keep_aspect_ratio_.
Referenced by storyscreen::part::resolve_wml().
|
inline |
Sets whether the layer should be scaled horizontally.
Definition at line 144 of file part.hpp.
References scale_horizontally_.
Referenced by storyscreen::part::resolve_wml().
|
inline |
Sets whether the layer should be scaled vertically.
Definition at line 158 of file part.hpp.
References scale_vertically_.
Referenced by storyscreen::part::resolve_wml().
|
inline |
Sets whether the layer should be tiled horizontally.
Definition at line 172 of file part.hpp.
References tile_horizontally_.
Referenced by storyscreen::part::resolve_wml().
|
inline |
Sets whether the layer should be tiled vertically.
Definition at line 186 of file part.hpp.
References tile_vertically_.
Referenced by storyscreen::part::resolve_wml().
|
inline |
Whether the layer should be tiled horizontally.
Definition at line 165 of file part.hpp.
References tile_horizontally_.
|
inline |
Whether the layer should be tiled vertically.
Definition at line 179 of file part.hpp.
References tile_vertically_.
|
private |
Definition at line 238 of file part.hpp.
Referenced by background_layer(), file(), and set_file().
|
private |
Definition at line 237 of file part.hpp.
Referenced by background_layer(), is_base_layer(), and set_base_layer().
|
private |
Definition at line 236 of file part.hpp.
Referenced by background_layer(), keep_aspect_ratio(), and set_keep_aspect_ratio().
|
private |
Definition at line 232 of file part.hpp.
Referenced by background_layer(), scale_horizontally(), and set_scale_horizontally().
|
private |
Definition at line 233 of file part.hpp.
Referenced by background_layer(), scale_vertically(), and set_scale_vertically().
|
private |
Definition at line 234 of file part.hpp.
Referenced by background_layer(), set_tile_horizontally(), and tile_horizontally().
|
private |
Definition at line 235 of file part.hpp.
Referenced by background_layer(), set_tile_vertically(), and tile_vertically().