diff options
Diffstat (limited to 'noatun/modules/kjofol-skin/kjfont.cpp')
-rw-r--r-- | noatun/modules/kjofol-skin/kjfont.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/noatun/modules/kjofol-skin/kjfont.cpp b/noatun/modules/kjofol-skin/kjfont.cpp index cf82fa43..7d5a967f 100644 --- a/noatun/modules/kjofol-skin/kjfont.cpp +++ b/noatun/modules/kjofol-skin/kjfont.cpp @@ -23,9 +23,9 @@ * KJFont *******************************************/ -KJFont::KJFont(const TQString &prefix, KJLoader *tqparent) : mTextMask(0), mTransparentRGB(0) +KJFont::KJFont(const TQString &prefix, KJLoader *parent) : mTextMask(0), mTransparentRGB(0) { -// kdDebug(66666) << "KJFont::KJFont(const TQString &prefix, KJLoader *tqparent)" << prefix.latin1() << endl; +// kdDebug(66666) << "KJFont::KJFont(const TQString &prefix, KJLoader *parent)" << prefix.latin1() << endl; if (prefix=="timefont") { @@ -47,12 +47,12 @@ KJFont::KJFont(const TQString &prefix, KJLoader *tqparent) : mTextMask(0), mTran mNullChar=' '; } - mText = tqparent->pixmap(tqparent->item(prefix+"image")[1]); + mText = parent->pixmap(parent->item(prefix+"image")[1]); - if ( tqparent->exist(prefix+"size") ) + if ( parent->exist(prefix+"size") ) { - mWidth = tqparent->item(prefix+"size")[1].toInt(); - mHeight = tqparent->item(prefix+"size")[2].toInt(); + mWidth = parent->item(prefix+"size")[1].toInt(); + mHeight = parent->item(prefix+"size")[2].toInt(); } else // try to load the font even we are missing important settings { // this still can cause crashes! @@ -73,13 +73,13 @@ KJFont::KJFont(const TQString &prefix, KJLoader *tqparent) : mTextMask(0), mTran mHeight = mText.height(); // Stupid Skin authors tend to forget keys :/ - if ( tqparent->exist(prefix+"spacing") ) - mSpacing = tqparent->item(prefix+"spacing")[1].toInt(); + if ( parent->exist(prefix+"spacing") ) + mSpacing = parent->item(prefix+"spacing")[1].toInt(); else mSpacing = 0; // FIXME: What's default for this in kjöfol??? - if ( tqparent->exist(prefix+"transparent") ) - mTransparent = (bool)tqparent->item(prefix+"transparent")[1].toInt(); + if ( parent->exist(prefix+"transparent") ) + mTransparent = (bool)parent->item(prefix+"transparent")[1].toInt(); else mTransparent = true; // transparency seems to be default in kjöfol @@ -153,8 +153,8 @@ TQPixmap KJFont::drawSysFont(const TQCString &s, int wide, const TQPoint &pos) c TQBitmap regionMask( (stringWidth > wide ? stringWidth : wide), - mHeight, true); // fully transparent tqmask - TQPainter mp(®ionMask); // tqmask painter + mHeight, true); // fully transparent mask + TQPainter mp(®ionMask); // mask painter // kdDebug(66666) << "region; w=" << region.width() << ", h=" << region.height() << endl; @@ -206,8 +206,8 @@ TQPixmap KJFont::drawPixmapFont(const TQCString &str, int wide, const TQPoint &p TQBitmap regionMask( (string.length()*mWidth+string.length()*mSpacing > (unsigned int)wide ? string.length()*mWidth+string.length()*mSpacing : wide), - mHeight, true); // fully transparent tqmask - TQPainter tqmask( ®ionMask ); + mHeight, true); // fully transparent mask + TQPainter mask( ®ionMask ); // kdDebug(66666) << "draw: {" << str << "}" << endl; @@ -216,7 +216,7 @@ TQPixmap KJFont::drawPixmapFont(const TQCString &str, int wide, const TQPoint &p if ( string.length()*mWidth+string.length()*mSpacing < (unsigned int)wide ) { freeSpace = wide - string.length()*mWidth+string.length()*mSpacing; - tqmask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, TQt::color0 ); + mask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, TQt::color0 ); to += TQPoint ( (freeSpace/2), 0 ); } @@ -234,14 +234,14 @@ TQPixmap KJFont::drawPixmapFont(const TQCString &str, int wide, const TQPoint &p // draw according to "spacing" if ( (charPos < string.length()-1) && mSpacing > 0 ) { // make the spacing-area transparent - tqmask.fillRect ( to.x(), 0, mSpacing, mHeight, TQt::color0 ); + mask.fillRect ( to.x(), 0, mSpacing, mHeight, TQt::color0 ); to += TQPoint ( mSpacing, 0 ); } } if (freeSpace > 0) { - tqmask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, TQt::color0 ); + mask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, TQt::color0 ); to += TQPoint ( (freeSpace/2), 0 ); } @@ -260,12 +260,12 @@ void KJFont::drawCharacter(TQPixmap *dev, TQBitmap *devMask, const TQPoint &to, bitBlt(dev, to, &mText, TQRect(x,y,xs,ys), TQt::CopyROP); - // bitBlt tqmask for transparency + // bitBlt mask for transparency if ( mTransparent ) { bitBlt(devMask, to, &mTextMask, TQRect(x,y,xs,ys), TQt::OrROP); } - else // fill tqmask + else // fill mask { TQPainter tempPainter (devMask); tempPainter.fillRect ( to.x(), 0, xs,ys, TQt::color1 ); |