added Lcd.py
[enigma2.git] / lib / gdi / font.h
index a17fee71dc1c75c4e64a7b2e0ef0eba01b842013..a38454d11bcda4ae80bf5141ba717dd00ef28d05 100644 (file)
@@ -63,6 +63,8 @@ public:
 #define GS_ISFIRST  2
 #define GS_USED                        4
 
+#define GS_INVERT   8
+
 struct pGlyph
 {
        int x, y, w;
@@ -79,7 +81,7 @@ class eLCD;
 
 class eTextPara: public iObject
 {
-DECLARE_REF;
+DECLARE_REF(eTextPara);
 private:
        ePtr<Font> current_font, replacement_font;
        FT_Face current_face, replacement_face;
@@ -130,16 +132,37 @@ public:
 
                return boundBox;
        }
+       
+       const int size() const
+       {
+               return glyphs.size();
+       }
 
        const eRect& getGlyphBBox(int num) const
        {
+               assert(num >= 0);
+               assert(num < (int)glyphs.size());
                return glyphs[num].bbox;
        }
+       
+       void setGlyphFlag(int g, int f)
+       {
+               assert(g >= 0);
+               assert(g < (int)glyphs.size());
+               glyphs[g].flags |= f;
+       }
+
+       void clearGlyphFlag(int g, int f)
+       {
+               assert(g >= 0);
+               assert(g < (int)glyphs.size());
+               glyphs[g].flags |= f;
+       }
 };
 
 class Font: public iObject
 {
-DECLARE_REF;
+DECLARE_REF(Font);
 public:
        FTC_Image_Desc font;
        fontRenderClass *renderer;