CL_FontProvider Class Reference
[clanDisplay Display]

Interface for implementing a CL_Font target. More...

#include <font_provider.h>

List of all members.

Public Member Functions

Construction
virtual ~CL_FontProvider ()
Attributes
virtual CL_FontMetrics get_font_metrics (CL_GraphicContext &gc)=0
 Returns information about the current font.
Operations
virtual void destroy ()=0
 Destroys the font provider.
virtual void draw_text (CL_GraphicContext &gc, float x, float y, const CL_StringRef &text, const CL_Colorf &color)=0
 Print text on gc.
virtual CL_Size get_text_size (CL_GraphicContext &gc, const CL_StringRef &text)=0
 Calculate size of text string.
virtual int get_character_index (CL_GraphicContext &gc, const CL_String &text, const CL_Point &point)=0
 Get the character index at a specified point.


Detailed Description

Interface for implementing a CL_Font target.


Constructor & Destructor Documentation

virtual CL_FontProvider::~CL_FontProvider  )  [inline, virtual]
 


Member Function Documentation

virtual void CL_FontProvider::destroy  )  [pure virtual]
 

Destroys the font provider.

virtual void CL_FontProvider::draw_text CL_GraphicContext gc,
float  x,
float  y,
const CL_StringRef text,
const CL_Colorf color
[pure virtual]
 

Print text on gc.

Function does not need to support multiline text (CL_Font splits it)

Parameters:
gc = Graphic Context
x = X position
y = Y position
text = The text to draw
color = The text color

virtual int CL_FontProvider::get_character_index CL_GraphicContext gc,
const CL_String text,
const CL_Point point
[pure virtual]
 

Get the character index at a specified point.

Function should support multiline text (seperated by /n)

Parameters:
gc = The Graphic Context
text = The string
point = The point
Returns:
The character index. -1 = Not at specified point

virtual CL_FontMetrics CL_FontProvider::get_font_metrics CL_GraphicContext gc  )  [pure virtual]
 

Returns information about the current font.

virtual CL_Size CL_FontProvider::get_text_size CL_GraphicContext gc,
const CL_StringRef text
[pure virtual]
 

Calculate size of text string.

Function does not need to support multiline text (CL_Font splits it)


The documentation for this class was generated from the following file:
Generated on Thu Dec 3 02:39:36 2009 for ClanLib by  doxygen 1.4.6