ClanLib  2.3.7
List of all members
CL_FontProvider Class Referenceabstract

Interface for implementing a CL_Font target. More...

#include <font_provider.h>

Public Member Functions

Construction
virtual ~CL_FontProvider ()
 
Attributes
virtual CL_FontMetrics get_font_metrics ()=0
 Returns information about the current font. More...
 
Operations
virtual void destroy ()=0
 Destroys the font provider. More...
 
virtual void draw_text (CL_GraphicContext &gc, float x, float y, const CL_StringRef &text, const CL_Colorf &color)=0
 Print text on gc. More...
 
virtual CL_Size get_text_size (CL_GraphicContext &gc, const CL_StringRef &text)=0
 Calculate size of text string. More...
 
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. More...
 

Detailed Description

Interface for implementing a CL_Font target.

Constructor & Destructor Documentation

virtual CL_FontProvider::~CL_FontProvider ( )
inlinevirtual

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 ( )
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: