21 #include "RConfigure.h"
27 class TGX11TTF :
public TGX11 {
30 enum EAlign { kNone, kTLeft, kTCenter, kTRight, kMLeft, kMCenter, kMRight,
31 kBLeft, kBCenter, kBRight };
35 TXftFontHash *fXftFontHash;
39 void DrawImage(FT_Bitmap *source, ULong_t fore, ULong_t back, RXImage *xim,
41 Bool_t IsVisible(Int_t x, Int_t y, UInt_t w, UInt_t h);
42 RXImage *GetBackground(Int_t x, Int_t y, UInt_t w, UInt_t h);
43 void RenderString(Int_t x, Int_t y, ETextMode mode);
46 TGX11TTF(
const TGX11 &org);
47 virtual ~TGX11TTF() { }
49 Bool_t Init(
void *display);
50 void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn,
51 const char *text, ETextMode mode);
52 void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn,
53 const wchar_t *text, ETextMode mode);
54 void SetTextFont(Font_t fontnumber);
55 Int_t SetTextFont(
char *fontname, ETextSetMode mode);
56 void SetTextSize(Float_t textsize);
61 FontStruct_t LoadQueryFont(
const char *font_name);
62 void DeleteFont(FontStruct_t fs);
63 void DeleteGC(GContext_t gc);
64 void DrawString(Drawable_t
id, GContext_t gc, Int_t x, Int_t y,
const char *s, Int_t len);
65 Int_t TextWidth(FontStruct_t font,
const char *s, Int_t len);
66 void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent);
67 FontH_t GetFontHandle(FontStruct_t fs);
68 FontStruct_t GetGCFont(GContext_t gc);
69 void MapGCFont(GContext_t gc, FontStruct_t font);
72 static void Activate();