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. | |
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. | |
Interface for implementing a CL_Font target.
| virtual CL_FontProvider::~CL_FontProvider | ( | ) | [inline, virtual] |
| 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)
| 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)
| gc | = The Graphic Context | |
| text | = The string | |
| point | = The 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)
1.7.1