Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

# Keos::CGraphicString Class Reference

Graphic string (which is display on the screen). More...

`#include <KeosGraphicString.h>`

List of all members.

## Public Member Functions

| CGraphicString (const TVector2I &StringPosition, const String &strText, const CColor &StringColor, const String &strFont)
| Default constructor.
void | Draw () const
| Display the string on the screen.
TVector2I | GetPixelSize () const
| Return the size of the text in pixels.
void | Align (ulong nMode, const CRectangle &Rect)
| Change the alignement of the text.

## Public Attributes

TVector2I | Position
String | Text
| Text position on the screen.
CColor | Color
| String.
String | Font
| Text color.

## Detailed Description

Graphic string (which is display on the screen).

Definition at line 33 of file KeosGraphicString.h.

## Constructor & Destructor Documentation

Keos::CGraphicString::CGraphicString | ( | const TVector2I & | StringPosition,
|  | const String & | strText,
|  | const CColor & | StringColor,
|  | const String & | strFont
| ) |

| Default constructor.

Parameters:

  | StringPosition | Text position.
  | strText | Text.
  | StringColor | Text color.
  | strFont | Font name.

Definition at line 32 of file KeosGraphicString.cpp.

## Member Function Documentation

void Keos::CGraphicString::Align | ( | ulong | nMode,
|  | const CRectangle & | Rect
| ) |

| Change the alignement of the text.

Parameters:

  | nMode | Alignement options.
  | Rect | Rectangle used for alignement.

Definition at line 55 of file KeosGraphicString.cpp.

References Keos::ALIGN_BOTTOM, Keos::ALIGN_HCENTER, Keos::ALIGN_RIGHT, Keos::ALIGN_VCENTER, GetPixelSize(), Position, Keos::CVector2< T >::x, and Keos::CVector2< T >::y.

void Keos::CGraphicString::Draw | ( |  | ) | const

| Display the string on the screen. Definition at line 43 of file KeosGraphicString.cpp.

TVector2I Keos::CGraphicString::GetPixelSize | ( |  | ) | const

| Return the size of the text in pixels.

Returns:
  Size in pixels.

Definition at line 49 of file KeosGraphicString.cpp.

Referenced by Align().

## Member Data Documentation

CColor Keos::CGraphicString::Color

| String. Definition at line 64 of file KeosGraphicString.h.

String Keos::CGraphicString::Font

| Text color. Definition at line 65 of file KeosGraphicString.h.

TVector2I Keos::CGraphicString::Position

| Definition at line 62 of file KeosGraphicString.h. Referenced by Align().

String Keos::CGraphicString::Text

| Text position on the screen. Definition at line 63 of file KeosGraphicString.h.

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

- KeosEngine/KeosGraphicString.h
- KeosEngine/KeosGraphicString.cpp