Represents and contains information about image labels used in story screen parts. More...
#include <part.hpp>

Classes | |
| struct | render_input |
Public Member Functions | |
| floating_image (const config &cfg) | |
| WML-based constructor. | |
| floating_image (const floating_image &fi) | |
| Copy constructor. | |
| floating_image & | operator= (const floating_image &fi) |
| int | ref_x () const |
| Returns the referential X coordinate of the image. | |
| int | ref_y () const |
| Returns the referential Y coordinate of the image. | |
| bool | autoscale () const |
| Whether the image should be automatically scaled as much as the storyscreen background is. | |
| bool | centered () const |
| Whether the image coordinates specify the location of its center (true) or top-left corner (false). | |
| int | display_delay () const |
| Delay before displaying, in milliseconds. | |
| render_input | get_render_input (double scale, SDL_Rect &dst_rect) const |
| Gets a render_input object for use by the rendering code after applying any geometric transformations required. | |
Private Member Functions | |
| void | assign (const floating_image &fi) |
| Copy constructor and operator=() implementation details. | |
Private Attributes | |
| std::string | file_ |
| int | x_ |
| int | y_ |
| int | delay_ |
| bool | autoscaled_ |
| bool | centered_ |
Represents and contains information about image labels used in story screen parts.
Definition at line 41 of file part.hpp.
| storyscreen::floating_image::floating_image | ( | const config & | cfg | ) |
| storyscreen::floating_image::floating_image | ( | const floating_image & | fi | ) |
| void storyscreen::floating_image::assign | ( | const floating_image & | fi | ) | [private] |
Copy constructor and operator=() implementation details.
Definition at line 60 of file part.cpp.
References autoscaled_, centered_, delay_, file_, x_, and y_.
Referenced by floating_image(), and operator=().

| bool storyscreen::floating_image::autoscale | ( | ) | const [inline] |
Whether the image should be automatically scaled as much as the storyscreen background is.
Definition at line 87 of file part.hpp.
References autoscaled_.
| bool storyscreen::floating_image::centered | ( | ) | const [inline] |
| int storyscreen::floating_image::display_delay | ( | ) | const [inline] |
Delay before displaying, in milliseconds.
Definition at line 98 of file part.hpp.
References delay_.
Referenced by storyscreen::part_ui::render_floating_images().

| floating_image::render_input storyscreen::floating_image::get_render_input | ( | double | scale, | |
| SDL_Rect & | dst_rect | |||
| ) | const |
Gets a render_input object for use by the rendering code after applying any geometric transformations required.
Definition at line 69 of file part.cpp.
References autoscaled_, centered_, file_, image::get_image(), storyscreen::floating_image::render_input::image, surface::null(), storyscreen::floating_image::render_input::rect, scale_surface(), x_, and y_.
Referenced by storyscreen::part_ui::prepare_floating_images().


| floating_image& storyscreen::floating_image::operator= | ( | const floating_image & | fi | ) | [inline] |
| int storyscreen::floating_image::ref_x | ( | ) | const [inline] |
Returns the referential X coordinate of the image.
The actual (corrected) value is determined at render time - see get_render_input().
Definition at line 71 of file part.hpp.
References x_.
| int storyscreen::floating_image::ref_y | ( | ) | const [inline] |
Returns the referential Y coordinate of the image.
The actual (corrected) value is determined at render time - see get_render_input().
Definition at line 79 of file part.hpp.
References y_.
bool storyscreen::floating_image::autoscaled_ [private] |
Definition at line 110 of file part.hpp.
Referenced by assign(), autoscale(), and get_render_input().
bool storyscreen::floating_image::centered_ [private] |
Definition at line 111 of file part.hpp.
Referenced by assign(), centered(), and get_render_input().
int storyscreen::floating_image::delay_ [private] |
Definition at line 109 of file part.hpp.
Referenced by assign(), and display_delay().
std::string storyscreen::floating_image::file_ [private] |
Definition at line 107 of file part.hpp.
Referenced by assign(), and get_render_input().
int storyscreen::floating_image::x_ [private] |
Definition at line 108 of file part.hpp.
Referenced by assign(), get_render_input(), and ref_x().
int storyscreen::floating_image::y_ [private] |
Definition at line 108 of file part.hpp.
Referenced by assign(), get_render_input(), and ref_y().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:03 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |