예제 #1
0
void CGUIFontTTFBase::Clear()
{
    if (m_texture)
        delete(m_texture);

    m_texture = NULL;
    if (m_char)
        delete[] m_char;
    memset(m_charquick, 0, sizeof(m_charquick));
    m_char = NULL;
    m_maxChars = 0;
    m_numChars = 0;
    m_posX = 0;
    m_posY = 0;

#ifdef HAS_HARFBUZZ_NG
    if (hb_font)
    {
        hb_font_destroy (hb_font);
        hb_font = NULL;
    }
#endif

    if (m_face)
    {
        g_freeTypeLibrary.ReleaseFont();
        m_face = NULL;
    }

    m_faceLoadTime = 0;
}
예제 #2
0
void CGUIFontTTF::Clear()
{
  if (m_texture)
#ifndef HAS_SDL  
    m_texture->Release();
#else
    SDL_FreeSurface(m_texture);
#endif
  m_texture = NULL;
  if (m_char)
    delete[] m_char;
  memset(m_charquick, 0, sizeof(m_charquick));
  m_char = NULL;
  m_maxChars = 0;
  m_numChars = 0;
  m_posX = 0;
  m_posY = 0;
  m_dwNestedBeginCount = 0;

  if (m_face)
    g_freeTypeLibrary.ReleaseFont(m_face);
  m_face = NULL;
}
예제 #3
0
void CGUIFontTTFBase::Clear()
{
  delete(m_texture);
  m_texture = NULL;
  delete[] m_char;
  memset(m_charquick, 0, sizeof(m_charquick));
  m_char = NULL;
  m_maxChars = 0;
  m_numChars = 0;
  m_posX = 0;
  m_posY = 0;
  m_nestedBeginCount = 0;

  if (m_face)
    g_freeTypeLibrary.ReleaseFont(m_face);
  m_face = NULL;
  if (m_stroker)
    g_freeTypeLibrary.ReleaseStroker(m_stroker);
  m_stroker = NULL;

  free(m_vertex);
  m_vertex = NULL;
  m_vertex_count = 0;
}