ROOT
6.07/01
Reference Guide
|
A wrapper class for FTFont.
Holds pointer to FTFont object and its description: face size, font file and class ID. It wraps Render and BBox functions.
Definition at line 23 of file TGLFontManager.h.
Public Types | |
enum | EMode { kUndef = -1, kBitmap, kPixmap, kTexture, kOutline, kPolygon, kExtrude } |
enum | ETextAlignH_e { kLeft, kRight, kCenterH } |
enum | ETextAlignV_e { kBottom, kTop, kCenterV } |
Public Member Functions | |
TGLFont () | |
Constructor. More... | |
TGLFont (Int_t size, Int_t font, EMode mode, FTFont *f=0, TGLFontManager *mng=0) | |
Constructor. More... | |
TGLFont (const TGLFont &o) | |
Assignment operator. More... | |
virtual | ~TGLFont () |
Destructor. More... | |
void | CopyAttributes (const TGLFont &o) |
Assignment operator. More... | |
Int_t | GetSize () const |
Int_t | GetFile () const |
EMode | GetMode () const |
Int_t | GetTrashCount () const |
void | SetTrashCount (Int_t c) const |
Int_t | IncTrashCount () const |
void | SetFont (FTFont *f) |
const FTFont * | GetFont () const |
void | SetManager (TGLFontManager *mng) |
const TGLFontManager * | GetManager () const |
Float_t | GetDepth () const |
void | SetDepth (Float_t d) |
Float_t | GetAscent () const |
Get font's ascent. More... | |
Float_t | GetDescent () const |
Get font's descent. The returned value is positive. More... | |
Float_t | GetLineHeight () const |
Get font's line-height. More... | |
void | MeasureBaseLineParams (Float_t &ascent, Float_t &descent, Float_t &line_height, const char *txt="Xj") const |
Measure font's base-line parameters from the passed text. More... | |
void | BBox (const char *txt, Float_t &llx, Float_t &lly, Float_t &llz, Float_t &urx, Float_t &ury, Float_t &urz) const |
Get bounding box. More... | |
void | BBox (const wchar_t *txt, Float_t &llx, Float_t &lly, Float_t &llz, Float_t &urx, Float_t &ury, Float_t &urz) const |
Get bounding box. More... | |
void | Render (const char *txt, Double_t x, Double_t y, Double_t angle, Double_t mgn) const |
void | Render (const wchar_t *txt, Double_t x, Double_t y, Double_t angle, Double_t mgn) const |
void | Render (const TString &txt) const |
Render text. More... | |
void | Render (const TString &txt, Float_t x, Float_t y, Float_t z, ETextAlignH_e alignH, ETextAlignV_e alignV) const |
Render text with given alignmentrepl and at given position. More... | |
virtual void | PreRender (Bool_t autoLight=kTRUE, Bool_t lightOn=kFALSE) const |
Set-up GL state before FTFont rendering. More... | |
virtual void | PostRender () const |
Reset GL state after FTFont rendering. More... | |
Bool_t | operator< (const TGLFont &o) const |
ClassDef (TGLFont, 0) | |
Protected Attributes | |
Int_t | fSize |
Int_t | fFile |
EMode | fMode |
Int_t | fTrashCount |
Private Member Functions | |
TGLFont & | operator= (const TGLFont &o) |
template<class Char > | |
void | RenderHelper (const Char *txt, Double_t x, Double_t y, Double_t angle, Double_t) const |
mgn is simply ignored, because ROOT's TVirtualX TGX11 are complete mess with painting attributes. More... | |
Private Attributes | |
FTFont * | fFont |
TGLFontManager * | fManager |
Float_t | fDepth |
#include <TGLFontManager.h>
enum TGLFont::EMode |
Enumerator | |
---|---|
kUndef | |
kBitmap | |
kPixmap | |
kTexture | |
kOutline | |
kPolygon | |
kExtrude |
Definition at line 26 of file TGLFontManager.h.
Enumerator | |
---|---|
kLeft | |
kRight | |
kCenterH |
Definition at line 33 of file TGLFontManager.h.
Enumerator | |
---|---|
kBottom | |
kTop | |
kCenterV |
Definition at line 34 of file TGLFontManager.h.
TGLFont::TGLFont | ( | ) |
Constructor.
Definition at line 52 of file TGLFontManager.cxx.
TGLFont::TGLFont | ( | Int_t | size, |
Int_t | font, | ||
EMode | mode, | ||
FTFont * | f = 0 , |
||
TGLFontManager * | mng = 0 |
||
) |
Constructor.
Definition at line 62 of file TGLFontManager.cxx.
TGLFont::TGLFont | ( | const TGLFont & | o | ) |
Assignment operator.
Definition at line 72 of file TGLFontManager.cxx.
|
virtual |
Destructor.
Definition at line 87 of file TGLFontManager.cxx.
void TGLFont::BBox | ( | const char * | txt, |
Float_t & | llx, | ||
Float_t & | lly, | ||
Float_t & | llz, | ||
Float_t & | urx, | ||
Float_t & | ury, | ||
Float_t & | urz | ||
) | const |
Get bounding box.
Definition at line 154 of file TGLFontManager.cxx.
Referenced by BBox(), TEveTextGL::DirectDraw(), MeasureBaseLineParams(), TGLOverlayButton::Render(), Render(), TGLAnnotation::Render(), TGLCameraOverlay::RenderBar(), TEveCaloLegoOverlay::RenderHeader(), RenderHelper(), and TEveCaloLegoOverlay::RenderLogaritmicScales().
void TGLFont::BBox | ( | const wchar_t * | txt, |
Float_t & | llx, | ||
Float_t & | lly, | ||
Float_t & | llz, | ||
Float_t & | urx, | ||
Float_t & | ury, | ||
Float_t & | urz | ||
) | const |
Get bounding box.
Definition at line 165 of file TGLFontManager.cxx.
TGLFont::ClassDef | ( | TGLFont | , |
0 | |||
) |
Assignment operator.
Definition at line 95 of file TGLFontManager.cxx.
Referenced by TGLFontManager::RegisterFont().
Float_t TGLFont::GetAscent | ( | ) | const |
Get font's ascent.
Definition at line 115 of file TGLFontManager.cxx.
|
inline |
Definition at line 74 of file TGLFontManager.h.
Float_t TGLFont::GetDescent | ( | ) | const |
Get font's descent. The returned value is positive.
Definition at line 123 of file TGLFontManager.cxx.
Referenced by TGLAnnotation::Render().
|
inline |
Definition at line 62 of file TGLFontManager.h.
Referenced by TGLFontManager::RegisterFont().
|
inline |
Definition at line 70 of file TGLFontManager.h.
Referenced by TGLFont().
Float_t TGLFont::GetLineHeight | ( | ) | const |
Get font's line-height.
Definition at line 131 of file TGLFontManager.cxx.
Referenced by TGLAnnotation::Render().
|
inline |
Definition at line 72 of file TGLFontManager.h.
|
inline |
Definition at line 63 of file TGLFontManager.h.
Referenced by TEveTextGL::DirectDraw(), and TGLFontManager::RegisterFont().
|
inline |
Definition at line 61 of file TGLFontManager.h.
Referenced by TGLFontManager::RegisterFont(), TGLAxisPainter::SetLabelFont(), and TGLAxisPainter::SetTitleFont().
|
inline |
Definition at line 65 of file TGLFontManager.h.
|
inline |
Definition at line 67 of file TGLFontManager.h.
void TGLFont::MeasureBaseLineParams | ( | Float_t & | ascent, |
Float_t & | descent, | ||
Float_t & | line_height, | ||
const char * | txt = "Xj" |
||
) | const |
Measure font's base-line parameters from the passed text.
Note that the measured parameters are not the same as the ones returned by get-functions - those were set by the font designer.
Definition at line 141 of file TGLFontManager.cxx.
Definition at line 100 of file TGLFontManager.h.
|
virtual |
Reset GL state after FTFont rendering.
Definition at line 406 of file TGLFontManager.cxx.
Referenced by TEveTextGL::DirectDraw(), TGLPadPainter::DrawTextHelper(), TGLOverlayButton::Render(), TGLAnnotation::Render(), TEveCaloLegoOverlay::RenderHeader(), TEveCaloLegoOverlay::RenderLogaritmicScales(), TGLAxisPainter::RnrLabels(), and TGLAxisPainter::RnrTitle().
Set-up GL state before FTFont rendering.
Definition at line 365 of file TGLFontManager.cxx.
Referenced by TEveTextGL::DirectDraw(), TGLPadPainter::DrawTextHelper(), TGLOverlayButton::Render(), TGLAnnotation::Render(), TEveCaloLegoOverlay::RenderHeader(), TEveCaloLegoOverlay::RenderLogaritmicScales(), TGLAxisPainter::RnrLabels(), and TGLAxisPainter::RnrTitle().
void TGLFont::Render | ( | const char * | txt, |
Double_t | x, | ||
Double_t | y, | ||
Double_t | angle, | ||
Double_t | mgn | ||
) | const |
Definition at line 283 of file TGLFontManager.cxx.
Referenced by TEveTextGL::DirectDraw(), TGLPadPainter::DrawTextHelper(), TGLOverlayButton::Render(), Render(), TGLAnnotation::Render(), TGLCameraOverlay::RenderBar(), TEveCaloLegoOverlay::RenderHeader(), RenderHelper(), TEveCaloLegoOverlay::RenderLogaritmicScales(), TGLCameraOverlay::RenderPlaneIntersect(), and TGLAxisPainter::RnrText().
void TGLFont::Render | ( | const wchar_t * | txt, |
Double_t | x, | ||
Double_t | y, | ||
Double_t | angle, | ||
Double_t | mgn | ||
) | const |
Definition at line 276 of file TGLFontManager.cxx.
Render text.
Definition at line 291 of file TGLFontManager.cxx.
void TGLFont::Render | ( | const TString & | txt, |
Float_t | x, | ||
Float_t | y, | ||
Float_t | z, | ||
ETextAlignH_e | alignH, | ||
ETextAlignV_e | alignV | ||
) | const |
Render text with given alignmentrepl and at given position.
Definition at line 313 of file TGLFontManager.cxx.
Definition at line 75 of file TGLFontManager.h.
Referenced by CopyAttributes(), and TEveTextGL::DirectDraw().
|
inline |
Definition at line 69 of file TGLFontManager.h.
Referenced by CopyAttributes().
|
inline |
Definition at line 71 of file TGLFontManager.h.
Referenced by CopyAttributes(), and TGLFontManager::RegisterFont().
Definition at line 66 of file TGLFontManager.h.
|
private |
Definition at line 42 of file TGLFontManager.h.
Referenced by CopyAttributes(), GetDepth(), Render(), and SetDepth().
|
protected |
Definition at line 49 of file TGLFontManager.h.
Referenced by CopyAttributes(), GetFile(), operator<(), and TGLFont().
|
private |
Definition at line 39 of file TGLFontManager.h.
Referenced by BBox(), CopyAttributes(), GetAscent(), GetDescent(), GetFont(), GetLineHeight(), MeasureBaseLineParams(), Render(), RenderHelper(), SetFont(), and TGLFont().
|
private |
Definition at line 40 of file TGLFontManager.h.
Referenced by CopyAttributes(), GetManager(), SetManager(), and ~TGLFont().
|
protected |
Definition at line 50 of file TGLFontManager.h.
Referenced by CopyAttributes(), GetMode(), operator<(), PreRender(), Render(), and TGLFont().
|
protected |
Definition at line 48 of file TGLFontManager.h.
Referenced by CopyAttributes(), GetSize(), operator<(), Render(), and TGLFont().
|
mutableprotected |
Definition at line 52 of file TGLFontManager.h.
Referenced by CopyAttributes(), GetTrashCount(), IncTrashCount(), SetTrashCount(), and TGLFont().