Classes | Public Member Functions | Private Member Functions | Private Attributes

storyscreen::floating_image Class Reference

Represents and contains information about image labels used in story screen parts. More...

#include <part.hpp>

Collaboration diagram for storyscreen::floating_image:
Collaboration graph
[legend]

List of all members.

Classes

struct  render_input

Public Member Functions

 floating_image (const config &cfg)
 WML-based constructor.
 floating_image (const floating_image &fi)
 Copy constructor.
floating_imageoperator= (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_

Detailed Description

Represents and contains information about image labels used in story screen parts.

Definition at line 41 of file part.hpp.


Constructor & Destructor Documentation

storyscreen::floating_image::floating_image ( const config cfg  ) 

WML-based constructor.

Parameters:
cfg Object corresponding to a [image] block's contents from a [part] node.

Definition at line 50 of file part.cpp.

storyscreen::floating_image::floating_image ( const floating_image fi  ) 

Copy constructor.

Definition at line 39 of file part.cpp.

References assign().

Here is the call graph for this function:


Member Function Documentation

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=().

Here is the caller graph for this function:

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]

Whether the image coordinates specify the location of its center (true) or top-left corner (false).

Definition at line 93 of file part.hpp.

References centered_.

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

floating_image& storyscreen::floating_image::operator= ( const floating_image fi  )  [inline]

Definition at line 62 of file part.hpp.

References assign().

Here is the call graph for this function:

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_.


Member Data Documentation

Definition at line 110 of file part.hpp.

Referenced by assign(), autoscale(), and get_render_input().

Definition at line 111 of file part.hpp.

Referenced by assign(), centered(), and get_render_input().

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().

Definition at line 108 of file part.hpp.

Referenced by assign(), get_render_input(), and ref_x().

Definition at line 108 of file part.hpp.

Referenced by assign(), get_render_input(), and ref_y().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:03 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs