[guilib] fix labelcontrols with auto width always being marked as dirty if they speci...
[vuplus_xbmc] / xbmc / guilib / GUIFontTTFDX.h
1 /*
2  *      Copyright (C) 2005-2013 Team XBMC
3  *      http://xbmc.org
4  *
5  *  This Program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2, or (at your option)
8  *  any later version.
9  *
10  *  This Program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with XBMC; see the file COPYING.  If not, see
17  *  <http://www.gnu.org/licenses/>.
18  *
19  */
20
21 /*!
22 \file GUIFont.h
23 \brief
24 */
25
26 #ifndef CGUILIB_GUIFONTTTF_DX_H
27 #define CGUILIB_GUIFONTTTF_DX_H
28 #pragma once
29
30
31 #include "GUIFontTTF.h"
32 #include "D3DResource.h"
33
34 /*!
35  \ingroup textures
36  \brief
37  */
38 class CGUIFontTTFDX : public CGUIFontTTFBase
39 {
40 public:
41   CGUIFontTTFDX(const CStdString& strFileName);
42   virtual ~CGUIFontTTFDX(void);
43
44   virtual void Begin();
45   virtual void End();
46
47 protected:
48   virtual CBaseTexture* ReallocTexture(unsigned int& newHeight);
49   virtual bool CopyCharToTexture(FT_BitmapGlyph bitGlyph, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2);
50   virtual void DeleteHardwareTexture();
51   CD3DTexture *m_speedupTexture;  // extra texture to speed up reallocations when the main texture is in d3dpool_default.
52                                   // that's the typical situation of Windows Vista and above.
53   uint16_t* m_index;
54   unsigned  m_index_size;
55 };
56
57 #endif