AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzPlatformFont.h
Go to the documentation of this file.
00001 // 
00002 //
00003 // AppEasy SDK - Cross Platform Multi-purpose Game and App Engine
00004 //
00005 // Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk
00006 //
00007 // For updates, tutorials and more details check out www.appeasymobile.com
00008 //
00009 // This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin.
00010 // If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support
00011 //
00012 //
00013 
00014 #if !defined(_CCZ_PLATFORM_FONT_H_)
00015 #define _CCZ_PLATFORM_FONT_H_
00016 
00017 #include "IzPlatformFont.h"
00018 #include "CzFont.h"
00019 
00020 class CzPlatformFont : public IzPlatformFont
00021 {
00022     // Properties
00023 protected:
00024 public:
00025     // Properties end
00026 public:
00027     int     Init();
00028     void    Release();
00029 
00030     // Font creation / loading
00031     CzFontHandle    CreateTTFontFromBuffer(void* memory_buffer, int memory_buffer_size, float point_size);
00032     void            DestroyFont(CzFontHandle font);
00033 
00034     // Prepared text
00035     CzFontPreparedText  CreatePreparedText();                               // Creates buffer to be used prepare text
00036     void            DestroyPreparedText(CzFontPreparedText data);
00037     bool            PrepareText(CzFontPreparedText prep, const char* text); // Prepares rendering optimised text data using the current font
00038     int             GetTextHeight(CzFontPreparedText data);
00039     int             GetTextWidth(CzFontPreparedText data);
00040 
00041     // General font methods
00042     void            SetCurrentFont(CzFontHandle font);
00043     void            SetCurrentFontFlags(eCzFontFlags flags);
00044     void            SetCurrentFontRect(const CzIRect& rc);
00045     void            SetCurrentFontAlignment(eCzAlignH horiz, eCzAlignV vert);
00046     
00047 };
00048 
00049 
00050 #endif  // _CCZ_PLATFORM_FONT_H_