/[gzz]/gzz/gfx/libtext/Text.hxx
ViewVC logotype

Diff of /gzz/gfx/libtext/Text.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by tjl, Sun Oct 6 17:37:46 2002 UTC revision 1.11 by tjl, Tue Oct 8 07:30:12 2002 UTC
# Line 108  namespace Text { Line 108  namespace Text {
108          /** Get the number of pixels each line should          /** Get the number of pixels each line should
109           * be below the previous one.           * be below the previous one.
110           */           */
111          virtual int getLineHeight() = 0;          virtual float getLineHeight() = 0;
112          /** Get the y coordinate where the first line          /** Get the y coordinate where the first line
113           * should be rendered.           * should be rendered.
114           */           */
115          virtual int getLineOffset() = 0;          virtual float getLineOffset() = 0;
116      };      };
117    
118      /** A freetype font.      /** A freetype font.
# Line 120  namespace Text { Line 120  namespace Text {
120      class FTFont : public Font {      class FTFont : public Font {
121              FT_Face face;              FT_Face face;
122              int pixsize;              int pixsize;
123                float scale; // The scale of all metrics.
124          public:          public:
125              /** Create from file.              /** Create from file.
126               * @param pixsize The pixel (texel) size to load the font at               * @param pixsize The pixel (texel) size to load the font at
# Line 127  namespace Text { Line 128  namespace Text {
128              FTFont(string filename, int pixsize) ;              FTFont(string filename, int pixsize) ;
129              ~FTFont();              ~FTFont();
130              virtual Glyph getRaster(int unicode);              virtual Glyph getRaster(int unicode);
131              virtual int getLineHeight();              virtual float getLineHeight();
132              virtual int getLineOffset();              virtual float getLineOffset();
133              class Error { } ;              class Error { } ;
134      };      };
135    
# Line 152  namespace Text { Line 153  namespace Text {
153                  Glyph g = f->getRaster(unicode);                  Glyph g = f->getRaster(unicode);
154                  return g.withBorder(bwidth);                  return g.withBorder(bwidth);
155              }              }
156              virtual int getLineHeight() {              virtual float getLineHeight() {
157                  return f->getLineHeight();                  return f->getLineHeight();
158              }              }
159              virtual int getLineOffset() {              virtual float getLineOffset() {
160                  return f->getLineOffset();                  return f->getLineOffset();
161              }              }
162                            

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26