Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Friends | List of all members
Menge::Vis::Watermark Class Reference

A class for handling the watermark functionality. More...

#include <Watermark.h>

Public Member Functions

 Watermark ()
 Constructor.
 
 ~Watermark ()
 Destructor.
 
const std::string & getFilename () const
 Returns the file name for the water mark.
 
void drawGL (float w, float h) const
 Draws the watermark to the screen. More...
 

Protected Attributes

std::string _fileName
 File name of the watermark.
 
Image_img
 A pointer to the image the watermark uses.
 
WatermarkAlign _alignment
 The alignment of the watermark.
 
float _opacity
 The opacity of the watermark. Should be a value in the range [0, 1], where 0 is completely transparent and 1 is completely opaque.
 
float _scale
 The scale of the watermark. If the alignment is FULL_SCREEN, this can cause tiling.
 

Friends

WatermarkparseWatermark (TiXmlElement *node, const std::string &viewFldr)
 Parses a water mark xml specification and returns the corresponding instance. More...
 

Detailed Description

A class for handling the watermark functionality.

A watermark is a semi-transparent image drawn over the top of the scene.

Member Function Documentation

void Menge::Vis::Watermark::drawGL ( float  w,
float  h 
) const

Draws the watermark to the screen.

Parameters
wThe width of the screen (in pixels).
hThe height of the screen (in pixels).

Friends And Related Function Documentation

Watermark* parseWatermark ( TiXmlElement *  node,
const std::string &  viewFldr 
)
friend

Parses a water mark xml specification and returns the corresponding instance.

Parameters
nodeThe XML node containing the watermark definition.
viewFldrThe path to the view configuration file.
Returns
A pointer to a water mark, if the definition was valid (NULL otherwise).

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