![]() |
VR-Forces 4.2 Class Documentation
|
class DtTTSDrawer: More...

Public Member Functions | |
| DtTTSDrawer () | |
| DtTTSDrawer (const QString &family, int pointSize=24) | |
| virtual | ~DtTTSDrawer () |
| virtual bool | draw (QPainter &paint, const DtSymbol *const symbol) const |
| virtual QSize | calcBBox (const DtSymbol *const symbol) const |
| Calculate the drawn size of this symbol. | |
| virtual void | setFont (const QString &family, unsigned pointSize) |
| virtual void | setFont (const QFont &font) |
| const QFont & | font () const |
| virtual bool | compareFamily (const QString &desiredFamily, const QFont &font) const |
| Compare the desired family to the one actually loaded. | |
| virtual QPoint | calcOrigin (const DtTTSSymbol *s, bool calcBitmapOrigin=false) const |
| Calculates the upper left corner of the text and sets the appearance font for drawing, so, if you call this routine, you do not need to call setAppearance. | |
| virtual void | paintFont (QPainter &painter, int left, int base, const DtTTSSymbol &symbol, const QColor &) const |
| Paint the font symbol on the device, so that its left, bottom corner is at the specified location. | |
| virtual void | paintFont (QPainter &painter, QRect &rect, const DtTTSSymbol &t, const QColor &, int flags=0) const |
| virtual void | setCenter (bool b) |
| Sets whether or not to center the text. By default left jusitfies. | |
Public Member Functions inherited from DtBaseSymbolDrawer | |
| DtBaseSymbolDrawer () | |
| virtual | ~DtBaseSymbolDrawer () |
| virtual bool | doDrawing (QPainter &paint, const DtSymbol *const symbol) |
| ! Initializes any drawing information and then calls internal draw() method | |
Public Member Functions inherited from DtSymbolDrawer | |
| DtSymbolDrawer () | |
| virtual | ~DtSymbolDrawer () |
| virtual QRect | calcBRect (const DtSymbol *const symbol) const |
| virtual bool | forceUpdate (const DtSymbol *const symbol) const |
| Override if your class wants to force a redraw of this item regardless of performance enhancement state. | |
| virtual bool | endTransparentDraw (QPainter &paint, const DtSymbol *const symbol) const |
| Called after transparent draw is finished if symbol wants to draw transparently. | |
| virtual void | processHiddenSymbolAction (QPainter &paint, const DtSymbol *const symbol) |
| Routine to perform even when symbol is hidden. | |
Static Public Member Functions | |
| static DtSymbolDrawer * | create () |
Protected Member Functions | |
| virtual void | setAppearance (const DtTTSSymbol &s) const |
| Use symbol to set attributes. | |
| virtual bool | drawSymbolAsBitmap (QPainter &painter, const QPoint &origin, const DtTTSSymbol &t) const |
| virtual bool | drawFont (QPainter &painter, const QPoint &origin, const DtTTSSymbol &t) const |
| virtual QString | calcKey (const DtTTSSymbol &symbol) const |
| virtual void | createFontKey () |
| virtual QHash< QString, QPixmap >::const_iterator | insertPix (const DtTTSSymbol &symbol, const QPixmap *pix) const |
| Cache management functions. | |
| virtual const QPixmap * | lookupPix (const DtTTSSymbol &symbol) const |
| Cache management functions. | |
| virtual const QPixmap * | createPix (const DtTTSSymbol *pSymbol) const |
| Cache management functions. | |
Protected Member Functions inherited from DtBaseSymbolDrawer | |
| virtual QRgb | opaqueColor () const |
| ! Returns color that will be ignored during transparent draw | |
Protected Member Functions inherited from DtSymbolDrawer | |
| DtSymbolDrawer (const DtSymbolDrawer &orig) | |
| Protected so not used. Conceptually class is a singleton. | |
| DtSymbolDrawer & | operator= (const DtSymbolDrawer &orig) |
| Protected so not used. Conceptually class is a singleton. | |
Protected Attributes | |
| QFont | myFont |
| Mutable since we are just saving this information for performance reasons. | |
| QFont | myDefaultFont |
| QFontMetrics | myFontMetrics |
| bool | myCenter |
| QHash< QString, QPixmap > | myCache |
| mutable since we are just saving this information for performance reasons. | |
| QString | myFontKey |
Private Member Functions | |
| DtTTSDrawer (const DtTTSDrawer &orig) | |
| DtTTSDrawer & | operator= (const DtTTSDrawer &orig) |
Additional Inherited Members | |
Static Protected Attributes inherited from DtSymbolDrawer | |
| static double | gDrawScalingFactor |
| static QColor | theHighlightColor |
class DtTTSDrawer:
Concrete class which draws scaled strings using a true type font. Subclassed from BMP Drawer to support caching of font drawing to bitmaps (QPixmap). This is a faster way to draw under windows than font drawing (as of Qt 4.4.1)
| DtTTSDrawer::DtTTSDrawer | ( | ) |
| DtTTSDrawer::DtTTSDrawer | ( | const QString & | family, |
| int | pointSize = 24 |
||
| ) |
|
virtual |
|
private |
Implements DtSymbolDrawer.
|
virtual |
Calculate the drawn size of this symbol.
The symbol must be of a type this drawer can recognize.
Implements DtSymbolDrawer.
Reimplemented in DtTTFUnitSymbolDrawer.
|
virtual |
|
virtual |
| const QFont& DtTTSDrawer::font | ( | ) | const |
|
virtual |
Compare the desired family to the one actually loaded.
|
virtual |
Calculates the upper left corner of the text and sets the appearance font for drawing, so, if you call this routine, you do not need to call setAppearance.
Reimplemented in DtMMMDrawer, and DtTTFUnitSymbolDrawer.
|
virtual |
Paint the font symbol on the device, so that its left, bottom corner is at the specified location.
|
virtual |
|
virtual |
Sets whether or not to center the text. By default left jusitfies.
|
static |
Reimplemented in DtTTFUnitSymbolDrawer, and DtMMMDrawer.
|
protectedvirtual |
Use symbol to set attributes.
|
protectedvirtual |
Reimplemented in DtMMMDrawer.
|
protectedvirtual |
Reimplemented in DtMMMDrawer.
|
protectedvirtual |
|
protectedvirtual |
Cache management functions.
|
protectedvirtual |
Cache management functions.
|
protectedvirtual |
Cache management functions.
Reimplemented in DtMMMDrawer.
|
protectedvirtual |
|
private |
|
mutableprotected |
Mutable since we are just saving this information for performance reasons.
We reset it for every symbol.
|
mutableprotected |
|
mutableprotected |
|
protected |
|
mutableprotected |
mutable since we are just saving this information for performance reasons.
|
protected |