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. More... | |
floating_image (const floating_image &fi) | |
Copy constructor. More... | |
floating_image & | operator= (const floating_image &fi) |
int | ref_x () const |
Returns the referential X coordinate of the image. More... | |
int | ref_y () const |
Returns the referential Y coordinate of the image. More... | |
bool | autoscale () const |
Whether the image should be automatically scaled as much as the storyscreen background is. More... | |
bool | centered () const |
Whether the image coordinates specify the location of its center (true) or top-left corner (false). More... | |
int | display_delay () const |
Delay before displaying, in milliseconds. More... | |
render_input | get_render_input (double xscale, double yscale, SDL_Rect &dst_rect) const |
Gets a render_input object for use by the rendering code after applying any geometric transformations required. More... | |
Private Member Functions | |
void | assign (const floating_image &fi) |
Copy constructor and operator=() implementation details. More... | |
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.
storyscreen::floating_image::floating_image | ( | const config & | cfg | ) |
storyscreen::floating_image::floating_image | ( | 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=().
|
inline |
Whether the image should be automatically scaled as much as the storyscreen background is.
Definition at line 90 of file part.hpp.
References autoscaled_.
|
inline |
|
inline |
Delay before displaying, in milliseconds.
Definition at line 101 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 | xscale, |
double | yscale, | ||
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_.
|
inline |
|
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 74 of file part.hpp.
References x_.
|
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 82 of file part.hpp.
References y_.
|
private |
Definition at line 113 of file part.hpp.
Referenced by assign(), autoscale(), and get_render_input().
|
private |
Definition at line 114 of file part.hpp.
Referenced by assign(), centered(), and get_render_input().
|
private |
Definition at line 112 of file part.hpp.
Referenced by assign(), and display_delay().
|
private |
Definition at line 110 of file part.hpp.
Referenced by assign(), and get_render_input().
|
private |
Definition at line 111 of file part.hpp.
Referenced by assign(), get_render_input(), and ref_x().
|
private |
Definition at line 111 of file part.hpp.
Referenced by assign(), get_render_input(), and ref_y().