Text Class Reference

#include <Text.hpp>

Collaboration diagram for Text:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class defines a text object that is to be displayed in an image.
Examples:

example11.cpp, and example13.cpp.

Definition at line 46 of file Text.hpp.

Public Types

enum  ALIGNMENT { LEFT, CENTER, RIGHT }
 Enumeration of alignment constants. More...

Public Member Functions

 Text (const char *str, double ix, double iy, ALIGNMENT align=LEFT, int angle=0)
 Constructs text at some coordinate.
 Text (const char *str, double ix, double iy, const TextStyle &its, ALIGNMENT align=LEFT, int angle=0)
 Constructs text at some coordinate.
 Text (int num, double ix, double iy, ALIGNMENT align=LEFT, int angle=0)
 Constructs text at some coordinate.
 Text (int num, double ix, double iy, const TextStyle &its, ALIGNMENT align=LEFT, int angle=0)
 Constructs text at some coordinate.
void setText (const std::string &str)
 Modifier for the output string of the text.
void setStyle (TextStyle &its)
 Modifier for the style of the text.
void removeStyle ()
 Remove the text style.
void setPosition (double ix, double iy)
 Modifier for the position on the image of the text.
void setAlignment (ALIGNMENT align)
 Modifier for the angle of the text.
void setAngle (int angle)
 Modifier for the angle of the text.
std::string getString (void) const
 Accessor to get the text string.
bool hasOwnTextStyle (void) const
 Accessor to see if text as its own style.
TextStyle getStyle (void) const
 Accessor to get the text style.
bool isCenter (void) const
 Accessor to see if text is centered.
bool isLeft (void) const
 Accessor to see if text is aligned anchored left.
bool isRight (void) const
 Accessor to see if text is aligned anchored right.
int getAngle (void) const
 Accessor to get the angle of the text.

Public Attributes

double x
 X coordinate of the text.
double y
 Y coordinate of the text.


Member Enumeration Documentation

enum ALIGNMENT
 

Enumeration of alignment constants.

Enumeration values:
LEFT 
CENTER 
RIGHT 

Definition at line 59 of file Text.hpp.


Constructor & Destructor Documentation

Text const char *  str,
double  ix,
double  iy,
ALIGNMENT  align = LEFT,
int  angle = 0
 

Constructs text at some coordinate.

Parameters:
str string to appear as text
ix x coordinate of the first point
iy y coordinate of the first point
align enumerated alignment constant, for which direction text is aligned with respect to the (x,y) point
angle angle in degrees the text is to be pointing, starting at zero, counter-clockwise from ---> (3:00)

Definition at line 34 of file Text.cpp.

References x, and y.

Text const char *  str,
double  ix,
double  iy,
const TextStyle its,
ALIGNMENT  align = LEFT,
int  angle = 0
 

Constructs text at some coordinate.

Parameters:
str string to appear as text
ix x coordinate of the first point
iy y coordinate of the first point
its textStyle describing how this text is supposed to look
align enumerated alignment constant, for which direction text is aligned with respect to the (x,y) point
angle angle in degrees the text is to be pointing, starting at zero, counter-clockwise from ---> (3:00)

Definition at line 44 of file Text.cpp.

References x, and y.

Text int  num,
double  ix,
double  iy,
ALIGNMENT  align = LEFT,
int  angle = 0
 

Constructs text at some coordinate.

Parameters:
num number to be converted to text
ix x coordinate of the first point
iy y coordinate of the first point
align enumerated alignment constant, for which direction text is aligned with respect to the (x,y) point
angle angle in degrees the text is to be pointing, starting at zero, counter-clockwise from ---> (3:00)

Definition at line 54 of file Text.cpp.

References x, and y.

Text int  num,
double  ix,
double  iy,
const TextStyle its,
ALIGNMENT  align = LEFT,
int  angle = 0
 

Constructs text at some coordinate.

Parameters:
num number to be converted to text
ix x coordinate of the first point
iy y coordinate of the first point
its textStyle describing how this text is supposed to look
align enumerated alignment constant, for which direction text is aligned with respect to the (x,y) point
angle angle in degrees the text is to be pointing, starting at zero, counter-clockwise from ---> (3:00)

Definition at line 66 of file Text.cpp.

References x, and y.


Member Function Documentation

int getAngle void   )  const [inline]
 

Accessor to get the angle of the text.

Definition at line 174 of file Text.hpp.

Referenced by SVGImage::text(), and PSImageBase::text().

std::string getString void   )  const [inline]
 

Accessor to get the text string.

Definition at line 156 of file Text.hpp.

Referenced by SVGImage::text(), and PSImageBase::text().

TextStyle getStyle void   )  const [inline]
 

Accessor to get the text style.

Definition at line 162 of file Text.hpp.

bool hasOwnTextStyle void   )  const [inline]
 

Accessor to see if text as its own style.

Definition at line 159 of file Text.hpp.

bool isCenter void   )  const [inline]
 

Accessor to see if text is centered.

Definition at line 165 of file Text.hpp.

Referenced by SVGImage::text(), and PSImageBase::text().

bool isLeft void   )  const [inline]
 

Accessor to see if text is aligned anchored left.

Definition at line 168 of file Text.hpp.

Referenced by SVGImage::text().

bool isRight void   )  const [inline]
 

Accessor to see if text is aligned anchored right.

Definition at line 171 of file Text.hpp.

Referenced by PSImageBase::text().

void removeStyle  )  [inline]
 

Remove the text style.

Definition at line 127 of file Text.hpp.

void setAlignment ALIGNMENT  align  )  [inline]
 

Modifier for the angle of the text.

Parameters:
align new enumerated alignment constant, for which direction text is aligned with respect to the (x,y) point

Definition at line 141 of file Text.hpp.

void setAngle int  angle  )  [inline]
 

Modifier for the angle of the text.

Parameters:
angle angle in degrees the text is to be pointing, starting at zero, counter-clockwise from ---> (3:00)

Definition at line 148 of file Text.hpp.

void setPosition double  ix,
double  iy
[inline]
 

Modifier for the position on the image of the text.

Parameters:
ix x coordinate of the first point
iy y coordinate of the first point

Definition at line 134 of file Text.hpp.

void setStyle TextStyle its  )  [inline]
 

Modifier for the style of the text.

Parameters:
its textStyle describing how this text is supposed to look

Definition at line 122 of file Text.hpp.

void setText const std::string &  str  )  [inline]
 

Modifier for the output string of the text.

Parameters:
str string to appear as text

Definition at line 116 of file Text.hpp.


Member Data Documentation

double x
 

X coordinate of the text.

Definition at line 51 of file Text.hpp.

Referenced by Text(), SVGImage::text(), and PSImageBase::text().

double y
 

Y coordinate of the text.

Definition at line 54 of file Text.hpp.

Referenced by Text(), SVGImage::text(), and PSImageBase::text().


The documentation for this class was generated from the following files:
Generated on Tue Feb 7 03:31:25 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1