cocos2d-x  3.1rc0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FontAtlas Class Reference

#include <CCFontAtlas.h>

Inheritance diagram for FontAtlas:
Ref

Public Member Functions

 FontAtlas (Font &theFont)
 ctor ( var theFont)
 FontAtlas ( local theFont)
virtual ~FontAtlas ()
void addLetterDefinition (const FontLetterDefinition &letterDefinition)
var addLetterDefinition ( var letterDefinition)
local addLetterDefinition ( local letterDefinition)
bool getLetterDefinitionForChar (char16_t letteCharUTF16, FontLetterDefinition &outDefinition)
var getLetterDefinitionForChar ( var letteCharUTF16, var outDefinition)
local getLetterDefinitionForChar ( local letteCharUTF16, local outDefinition)
bool prepareLetterDefinitions (const std::u16string &utf16String)
var prepareLetterDefinitions ( var utf16String)
local prepareLetterDefinitions ( local utf16String)
const std::unordered_map
< ssize_t, Texture2D * > & 
getTextures () const
local getTextures ()
void addTexture (Texture2D *texture, int slot)
var addTexture ( var texture, var slot)
local addTexture ( local texture, local slot)
float getCommonLineHeight () const
var getCommonLineHeight ()
local getCommonLineHeight ()
void setCommonLineHeight (float newHeight)
var setCommonLineHeight ( var newHeight)
local setCommonLineHeight ( local newHeight)
Texture2DgetTexture (int slot)
var getTexture ( var slot)
local getTexture ( local slot)
const FontgetFont () const
var getFont ()
local getFont ()
void listenToBackground (EventCustom *event)
 Listen "come to background" message, and clear the texture atlas. More...
 
var listenToBackground ( var event)
 Listen "come to background" message, and clear the texture atlas. More...
 
local listenToBackground ( local event)
 Listen "come to background" message, and clear the texture atlas. More...
 
void listenToForeground (EventCustom *event)
 Listen "come to foreground" message and restore the texture atlas. More...
 
void purgeTexturesAtlas ()
 Removes textures atlas. More...
 
var purgeTexturesAtlas ()
 Removes textures atlas. More...
 
void setAntiAliasTexParameters ()
 sets font texture parameters: More...
 
var setAntiAliasTexParameters ()
 sets font texture parameters: More...
 
local setAntiAliasTexParameters ()
 sets font texture parameters: More...
 
void setAliasTexParameters ()
 sets font texture parameters: More...
 
var setAliasTexParameters ()
 sets font texture parameters: More...
 
local setAliasTexParameters ()
 sets font texture parameters: More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Static Public Attributes

static const int CacheTextureWidth
var CacheTextureWidth
local CacheTextureWidth
static const int CacheTextureHeight
var CacheTextureHeight
local CacheTextureHeight
static const char * EVENT_PURGE_TEXTURES
var EVENT_PURGE_TEXTURES
local EVENT_PURGE_TEXTURES

Additional Inherited Members

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Constructor & Destructor Documentation

FontAtlas ( Font theFont)
var ctor ( var  theFont)
local FontAtlas ( local  theFont)
virtual ~FontAtlas ( )
virtual

Member Function Documentation

void addLetterDefinition ( const FontLetterDefinition letterDefinition)
var addLetterDefinition ( var  letterDefinition)
local addLetterDefinition ( local  letterDefinition)
void addTexture ( Texture2D texture,
int  slot 
)
var addTexture ( var  texture,
var  slot 
)
local addTexture ( local  texture,
local  slot 
)
float getCommonLineHeight ( ) const
var getCommonLineHeight ( )
local getCommonLineHeight ( )
const Font* getFont ( ) const
var getFont ( )
local getFont ( )
bool getLetterDefinitionForChar ( char16_t  letteCharUTF16,
FontLetterDefinition outDefinition 
)
var getLetterDefinitionForChar ( var  letteCharUTF16,
var  outDefinition 
)
local getLetterDefinitionForChar ( local  letteCharUTF16,
local  outDefinition 
)
Texture2D* getTexture ( int  slot)
var getTexture ( var  slot)
local getTexture ( local  slot)
const std::unordered_map
<ssize_t, Texture2D*>
& getTextures
( ) const
inline
var getTextures ( )
inline
local getTextures ( )
inline
void listenToBackground ( EventCustom event)

Listen "come to background" message, and clear the texture atlas.

It only has effect on Android.

var listenToBackground ( var  event)

Listen "come to background" message, and clear the texture atlas.

It only has effect on Android.

local listenToBackground ( local  event)

Listen "come to background" message, and clear the texture atlas.

It only has effect on Android.

void listenToForeground ( EventCustom event)

Listen "come to foreground" message and restore the texture atlas.

It only has effect on Android.

var listenToForeground ( var  event)

Listen "come to foreground" message and restore the texture atlas.

It only has effect on Android.

local listenToForeground ( local  event)

Listen "come to foreground" message and restore the texture atlas.

It only has effect on Android.

bool prepareLetterDefinitions ( const std::u16string &  utf16String)
var prepareLetterDefinitions ( var  utf16String)
local prepareLetterDefinitions ( local  utf16String)
void purgeTexturesAtlas ( )

Removes textures atlas.

It will purge the textures atlas and if multiple texture exist in the FontAtlas.

var purgeTexturesAtlas ( )

Removes textures atlas.

It will purge the textures atlas and if multiple texture exist in the FontAtlas.

local purgeTexturesAtlas ( )

Removes textures atlas.

It will purge the textures atlas and if multiple texture exist in the FontAtlas.

void setAliasTexParameters ( )

sets font texture parameters:

  • GL_TEXTURE_MIN_FILTER = GL_NEAREST
  • GL_TEXTURE_MAG_FILTER = GL_NEAREST
var setAliasTexParameters ( )

sets font texture parameters:

  • GL_TEXTURE_MIN_FILTER = GL_NEAREST
  • GL_TEXTURE_MAG_FILTER = GL_NEAREST
local setAliasTexParameters ( )

sets font texture parameters:

  • GL_TEXTURE_MIN_FILTER = GL_NEAREST
  • GL_TEXTURE_MAG_FILTER = GL_NEAREST
void setAntiAliasTexParameters ( )

sets font texture parameters:

  • GL_TEXTURE_MIN_FILTER = GL_LINEAR
  • GL_TEXTURE_MAG_FILTER = GL_LINEAR
var setAntiAliasTexParameters ( )

sets font texture parameters:

  • GL_TEXTURE_MIN_FILTER = GL_LINEAR
  • GL_TEXTURE_MAG_FILTER = GL_LINEAR
local setAntiAliasTexParameters ( )

sets font texture parameters:

  • GL_TEXTURE_MIN_FILTER = GL_LINEAR
  • GL_TEXTURE_MAG_FILTER = GL_LINEAR
void setCommonLineHeight ( float  newHeight)
var setCommonLineHeight ( var  newHeight)
local setCommonLineHeight ( local  newHeight)

Member Data Documentation

const int CacheTextureHeight
static
var CacheTextureHeight
static
local CacheTextureHeight
static
const int CacheTextureWidth
static
var CacheTextureWidth
static
local CacheTextureWidth
static
const char* EVENT_PURGE_TEXTURES
static
var EVENT_PURGE_TEXTURES
static
local EVENT_PURGE_TEXTURES
static

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