26 # include <FTGL/ftgl.h> 29 # include "FTGLExtrdFont.h" 30 # include "FTGLOutlineFont.h" 31 # include "FTGLPolygonFont.h" 32 # include "FTGLTextureFont.h" 33 # include "FTGLPixmapFont.h" 34 # include "FTGLBitmapFont.h" 39 #define FTGL_OUTLINE 2 40 #define FTGL_POLYGON 3 41 #define FTGL_EXTRUDE 4 42 #define FTGL_TEXTURE 5 101 glTranslatef(x, y, z);
108 Float_t llx, lly, llz, urx, ury, urz;
109 fGLTextFont->BBox(text, llx, lly, llz, urx, ury, urz);
114 case 1 : dx = 0 ;
break;
115 case 2 : dx = -urx/2;
break;
116 case 3 : dx = -urx ;
break;
119 case 1 : dy = 0 ;
break;
120 case 2 : dy = -ury/2;
break;
121 case 3 : dy = -ury ;
break;
123 glTranslatef(dx, dy, 0);
145 Float_t llx, lly, llz, urx, ury, urz;
146 fGLTextFont->BBox(text, llx, lly, llz, urx, ury, urz);
148 glVertex3f( 0, 0, 0); glVertex3f( urx, 0, 0);
149 glVertex3f( 0, 0, 0); glVertex3f( 0, ury, 0);
150 glVertex3f( 0, ury, 0); glVertex3f( urx, ury, 0);
151 glVertex3f( urx, ury, 0); glVertex3f( urx, 0, 0);
159 float& urx,
float& ury,
float& urz)
161 fGLTextFont->BBox(
string, llx, lly, llz, urx, ury, urz);
179 int fontid = fontnumber / 10;
181 const char *fontname=0;
182 if (fontid == 0) fontname =
"arialbd.ttf";
183 if (fontid == 1) fontname =
"timesi.ttf";
184 if (fontid == 2) fontname =
"timesbd.ttf";
185 if (fontid == 3) fontname =
"timesbi.ttf";
186 if (fontid == 4) fontname =
"arial.ttf";
187 if (fontid == 5) fontname =
"ariali.ttf";
188 if (fontid == 6) fontname =
"arialbd.ttf";
189 if (fontid == 7) fontname =
"arialbi.ttf";
190 if (fontid == 8) fontname =
"cour.ttf";
191 if (fontid == 9) fontname =
"couri.ttf";
192 if (fontid == 10) fontname =
"courbd.ttf";
193 if (fontid == 11) fontname =
"courbi.ttf";
194 if (fontid == 12) fontname =
"symbol.ttf";
195 if (fontid == 13) fontname =
"times.ttf";
196 if (fontid == 14) fontname =
"wingding.ttf";
210 Error(
"SetGLTextFont",
"Cannot set FTGL::FaceSize");
static const TString & GetTTFFontDir()
Get the fonts directory in the installation. Static utility function.
void PaintGLText(Double_t x, Double_t y, Double_t z, const char *text)
Draw text.
static void Color(const TGLColor &color)
Set color from TGLColor.
virtual Color_t GetTextColor() const
Return the text color.
void PaintBBox(const char *text)
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
void SetGLTextAngles(Double_t a1, Double_t a2, Double_t a3)
Set the text rotation angles.
virtual Float_t GetTextSize() const
Return the text size.
void Error(const char *location, const char *msgfmt,...)
void BBox(const char *string, float &llx, float &lly, float &llz, float &urx, float &ury, float &urz)
Calculate bounding-box for given string.
R__EXTERN TSystem * gSystem
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
you should not use this method at all Int_t Int_t z
void SetGLTextFont(Font_t fontnumber)
Short_t fTextAlign
Text alignment.