hoa_video::RenderedString Class Reference

A structure which a rendered string. More...

#include <text.h>

Collaboration diagram for hoa_video::RenderedString:

Collaboration graph
[legend]
List of all members.

Public Member Functions

bool Add (RenderedLine *line)
 Add a line to the string.
bool Draw () const
 Draw the string.
int32 GetLineSkip () const
 Get the current line skip.
int32 GetShadowX () const
 Get the shadow X offset.
int32 GetShadowY () const
 Get the shadow X offset.
int32 GetWidth () const
 Get the line width.
 RenderedString (int32 line_skip, int32 shadowX=0, int32 shadowY=0)
 Constructs empty string.
void SetShadowX (int32 xoff)
 Set the shadow X offset.
void SetShadowY (int32 yoff)
 Set the shadow X offset.
 ~RenderedString ()
 Deletes textures.

Public Attributes

std::vector< RenderedLine * > lines
 Vector of line textures.

Private Attributes

int32 _line_skip
 SDL_ttf's recommended amount of spacing between lines.
int32 _shadow_xoff
 X offset of the shadow texture.
int32 _shadow_yoff
 Y offset of the shadow texture.
int32 _width
 The total width of this text block.

Detailed Description

A structure which a rendered string.

****************************************************************************

Definition at line 144 of file text.h.


Constructor & Destructor Documentation

hoa_video::RenderedString::RenderedString ( int32  line_skip,
int32  shadowX = 0,
int32  shadowY = 0 
)

Constructs empty string.

Definition at line 1105 of file text.cpp.

hoa_video::RenderedString::~RenderedString (  ) 

Deletes textures.

Definition at line 1113 of file text.cpp.

References hoa_video::GameVideo::_DeleteTexture(), lines, hoa_video::RenderedLine::MAIN_TEXTURE, hoa_video::RenderedLine::SHADOW_TEXTURE, and hoa_video::VideoManager.

Here is the call graph for this function:


Member Function Documentation

bool hoa_video::RenderedString::Add ( RenderedLine line  ) 

Add a line to the string.

Definition at line 1094 of file text.cpp.

References _width, lines, and hoa_video::RenderedLine::width.

Referenced by hoa_video::GameVideo::RenderText().

bool hoa_video::RenderedString::Draw (  )  const

Draw the string.

Definition at line 1040 of file text.cpp.

References hoa_video::GameVideo::Draw(), and hoa_video::VideoManager.

Referenced by hoa_boot::WelcomeScreen::Draw(), and hoa_boot::CreditsScreen::Draw().

Here is the call graph for this function:

int32 hoa_video::RenderedString::GetLineSkip (  )  const [inline]

Get the current line skip.

Definition at line 166 of file text.h.

References _line_skip.

Referenced by hoa_video::GameVideo::Draw().

int32 hoa_video::RenderedString::GetShadowX (  )  const [inline]

Get the shadow X offset.

Definition at line 170 of file text.h.

References _shadow_xoff.

Referenced by hoa_video::GameVideo::Draw().

int32 hoa_video::RenderedString::GetShadowY (  )  const [inline]

Get the shadow X offset.

Definition at line 172 of file text.h.

References _shadow_yoff.

Referenced by hoa_video::GameVideo::Draw().

int32 hoa_video::RenderedString::GetWidth (  )  const [inline]

Get the line width.

Definition at line 168 of file text.h.

References _width.

Referenced by hoa_video::GameVideo::Draw().

void hoa_video::RenderedString::SetShadowX ( int32  xoff  )  [inline]

Set the shadow X offset.

Definition at line 174 of file text.h.

References _shadow_xoff.

void hoa_video::RenderedString::SetShadowY ( int32  yoff  )  [inline]

Set the shadow X offset.

Definition at line 176 of file text.h.

References _shadow_yoff.


Member Data Documentation

int32 hoa_video::RenderedString::_line_skip [private]

SDL_ttf's recommended amount of spacing between lines.

Definition at line 149 of file text.h.

Referenced by GetLineSkip().

int32 hoa_video::RenderedString::_shadow_xoff [private]

X offset of the shadow texture.

Definition at line 151 of file text.h.

Referenced by GetShadowX(), and SetShadowX().

int32 hoa_video::RenderedString::_shadow_yoff [private]

Y offset of the shadow texture.

Definition at line 153 of file text.h.

Referenced by GetShadowY(), and SetShadowY().

int32 hoa_video::RenderedString::_width [private]

The total width of this text block.

Definition at line 147 of file text.h.

Referenced by Add(), and GetWidth().

std::vector<RenderedLine*> hoa_video::RenderedString::lines

Vector of line textures.

Definition at line 156 of file text.h.

Referenced by Add(), hoa_video::GameVideo::Draw(), and ~RenderedString().


The documentation for this class was generated from the following files:
Generated on Fri Jul 6 23:16:39 2007 for Hero of Allacrost by  doxygen 1.5.1