diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /karbon/render | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karbon/render')
-rw-r--r-- | karbon/render/art_rgb.c | 6 | ||||
-rw-r--r-- | karbon/render/art_rgb_svp.c | 4 | ||||
-rw-r--r-- | karbon/render/vkopainter.cc | 78 | ||||
-rw-r--r-- | karbon/render/vkopainter.h | 34 | ||||
-rw-r--r-- | karbon/render/vpainter.h | 36 | ||||
-rw-r--r-- | karbon/render/vpainterfactory.cc | 10 | ||||
-rw-r--r-- | karbon/render/vpainterfactory.h | 8 | ||||
-rw-r--r-- | karbon/render/vqpainter.cc | 100 | ||||
-rw-r--r-- | karbon/render/vqpainter.h | 40 | ||||
-rw-r--r-- | karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c | 14 | ||||
-rw-r--r-- | karbon/render/xrgbrender/gdk-pixbuf-xlib-render.c | 30 | ||||
-rw-r--r-- | karbon/render/xrgbrender/gdk-pixbuf-xlib.h | 4 | ||||
-rw-r--r-- | karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c | 2 |
13 files changed, 183 insertions, 183 deletions
diff --git a/karbon/render/art_rgb.c b/karbon/render/art_rgb.c index 4d30fad4..6dd84bde 100644 --- a/karbon/render/art_rgb.c +++ b/karbon/render/art_rgb.c @@ -30,10 +30,10 @@ /* This is really slow. Is there any way we might speed it up? Two ideas: - First, maybe we should be working at 32-bit alignment. Then, + First, maybe we should be working at 32-bit tqalignment. Then, this can be a simple loop over word stores. - Second, we can keep working at 24-bit alignment, but have some + Second, we can keep working at 24-bit tqalignment, but have some intelligence about storing. For example, we can iterate over 4-pixel chunks (aligned at 4 pixels), with an inner loop something like: @@ -100,7 +100,7 @@ art_rgb_fill_run_ (art_u8 *buf, art_u32 rgb, int n) *buf++ = b; } } else { - /* handle prefix up to byte alignment */ + /* handle prefix up to byte tqalignment */ /* I'm worried about this cast on sizeof(long) != sizeof(uchar *) architectures, but it _should_ work. */ for (i = 0; ((unsigned long)buf) & 3; i++) diff --git a/karbon/render/art_rgb_svp.c b/karbon/render/art_rgb_svp.c index 617f1abe..2052d2ff 100644 --- a/karbon/render/art_rgb_svp.c +++ b/karbon/render/art_rgb_svp.c @@ -120,7 +120,7 @@ art_rgb_svp_callback_ (void *callback_data, int y, * @rowstride: Rowstride of @buf buffer. * @alphagamma: #ArtAlphaGamma for gamma-correcting the rendering. * - * Renders the shape specified with @svp into the @buf RGB buffer. + * Renders the tqshape specified with @svp into the @buf RGB buffer. * @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height, * of the rectangle rendered. The new pixels are stored starting at * the first byte of @buf. Thus, the @x0 and @y0 parameters specify @@ -400,7 +400,7 @@ art_rgb_svp_alpha_opaque_callback_ (void *callback_data, int y, * @rowstride: Rowstride of @buf buffer. * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing. * - * Renders the shape specified with @svp over the @buf RGB buffer. + * Renders the tqshape specified with @svp over the @buf RGB buffer. * @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height, * of the rectangle rendered. The new pixels are stored starting at * the first byte of @buf. Thus, the @x0 and @y0 parameters specify diff --git a/karbon/render/vkopainter.cc b/karbon/render/vkopainter.cc index 21ab911c..98ae826e 100644 --- a/karbon/render/vkopainter.cc +++ b/karbon/render/vkopainter.cc @@ -25,10 +25,10 @@ #include "vcolor.h" #include "vpattern.h" -#include <qpaintdevice.h> -#include <qpixmap.h> -#include <qpointarray.h> -#include <qimage.h> +#include <tqpaintdevice.h> +#include <tqpixmap.h> +#include <tqpointarray.h> +#include <tqimage.h> #include "libart_lgpl/art_vpath.h" #include <libart_lgpl/art_bpath.h> @@ -67,7 +67,7 @@ #define INITIAL_ALLOC 300 #define ALLOC_INCREMENT 100 -VKoPainter::VKoPainter( QPaintDevice *target, unsigned int w, unsigned int h, bool bDrawNodes ) +VKoPainter::VKoPainter( TQPaintDevice *target, unsigned int w, unsigned int h, bool bDrawNodes ) : VPainter( target, w, h ), m_target( target ), m_bDrawNodes( bDrawNodes ) { //kdDebug(38000) << "w : " << w << endl; @@ -180,18 +180,18 @@ void VKoPainter::clear() { if( m_buffer ) - memset( m_buffer, qRgba( 255, 255, 255, 255 ), m_width * m_height * 4 ); + memset( m_buffer, tqRgba( 255, 255, 255, 255 ), m_width * m_height * 4 ); } void -VKoPainter::clear( const QColor &c ) +VKoPainter::clear( const TQColor &c ) { if( m_buffer ) memset( m_buffer, c.rgb(), m_width * m_height * 4 ); } void -VKoPainter::clear( const KoRect &r, const QColor &c ) +VKoPainter::clear( const KoRect &r, const TQColor &c ) { unsigned int color = c.rgb(); int x = KMAX( 0, int( r.x() ) ); @@ -202,12 +202,12 @@ VKoPainter::clear( const KoRect &r, const QColor &c ) { for( int i = y;i < height;i++) memset( m_buffer + int( x * 4) + int( i * ( m_width * 4 ) ), - qRgba( qRed( color ), qGreen( color ), qBlue( color ), 100 ), int( width * 4 ) ); + tqRgba( tqRed( color ), tqGreen( color ), tqBlue( color ), 100 ), int( width * 4 ) ); } } void -VKoPainter::setWorldMatrix( const QWMatrix &mat ) +VKoPainter::setWorldMatrix( const TQWMatrix &mat ) { m_matrix = mat; } @@ -293,25 +293,25 @@ VKoPainter::fillPath() if( m_index == 0 ) return; // find begin of last subpath - int find = -1; + int tqfind = -1; for( int i = m_index - 1; i >= 0; i-- ) { if( m_path[i].code == ART_MOVETO_OPEN || m_path[i].code == ART_MOVETO ) { - find = i; + tqfind = i; break; } } // for now, always close - if( find != -1 && ( m_path[ find ].x3 != m_path[ m_index - 1 ].x3 || - m_path[ find ].y3 != m_path[ m_index - 1 ].y3 ) ) + if( tqfind != -1 && ( m_path[ tqfind ].x3 != m_path[ m_index - 1 ].x3 || + m_path[ tqfind ].y3 != m_path[ m_index - 1 ].y3 ) ) { ensureSpace( m_index + 1 ); m_path[ m_index ].code = ART_LINETO; - m_path[ m_index ].x3 = m_path[ find ].x3; - m_path[ m_index ].y3 = m_path[ find ].y3; + m_path[ m_index ].x3 = m_path[ tqfind ].x3; + m_path[ m_index ].y3 = m_path[ tqfind ].y3; m_index++; m_path[ m_index ].code = ART_END; @@ -368,7 +368,7 @@ VKoPainter::setPen( const VStroke &stroke ) } void -VKoPainter::setPen( const QColor &c ) +VKoPainter::setPen( const TQColor &c ) { delete m_stroke; m_stroke = new VStroke; @@ -385,7 +385,7 @@ VKoPainter::setPen( const QColor &c ) void VKoPainter::setPen( Qt::PenStyle style ) { - if( style == Qt::NoPen ) + if( style == TQt::NoPen ) { delete m_stroke; m_stroke = 0L; @@ -393,7 +393,7 @@ VKoPainter::setPen( Qt::PenStyle style ) } void -VKoPainter::setBrush( const QColor &c ) +VKoPainter::setBrush( const TQColor &c ) { delete m_fill; m_fill = new VFill; @@ -408,9 +408,9 @@ VKoPainter::setBrush( const QColor &c ) } void -VKoPainter::setBrush( Qt::BrushStyle style ) +VKoPainter::setBrush( TQt::BrushStyle style ) { - if( style == Qt::NoBrush ) + if( style == TQt::NoBrush ) { delete m_fill; m_fill = 0L; @@ -436,7 +436,7 @@ VKoPainter::restore() } void -VKoPainter::setRasterOp( Qt::RasterOp ) +VKoPainter::setRasterOp( TQt::RasterOp ) { } @@ -501,11 +501,11 @@ VKoPainter::drawVPath( ArtVpath *vec ) art_u32 fillColor = 0; // filling - QColor color; + TQColor color; if( m_fill && m_fill->type() != VFill::none ) { color = m_fill->color(); - af = qRound( 255 * m_fill->color().opacity() ); + af = tqRound( 255 * m_fill->color().opacity() ); fillColor = ( 0 << 24 ) | ( color.blue() << 16 ) | ( color.green() << 8 ) | color.red(); ArtSvpWriter *swr; @@ -532,7 +532,7 @@ VKoPainter::drawVPath( ArtVpath *vec ) // TODO : non rgb support ? color = m_stroke->color(); - as = qRound( 255 * m_stroke->color().opacity() ); + as = tqRound( 255 * m_stroke->color().opacity() ); strokeColor = ( 0 << 24 ) | ( color.blue() << 16 ) | ( color.green() << 8 ) | color.red(); double ratio = m_zoomFactor;//sqrt(pow(affine[0], 2) + pow(affine[3], 2)) / sqrt(2); @@ -809,7 +809,7 @@ ArtGradientStop * VKoPainter::buildStopArray( VGradient &gradient, int &offsets ) { // TODO : make this generic - QPtrVector<VColorStop> colorStops = gradient.colorStops(); + TQPtrVector<VColorStop> colorStops = gradient.colorStops(); offsets = colorStops.count(); ArtGradientStop *stopArray = art_new( ArtGradientStop, offsets * 2 - 1 ); @@ -820,11 +820,11 @@ VKoPainter::buildStopArray( VGradient &gradient, int &offsets ) //double mid = colorStops[ offset ]->midPoint; stopArray[ offset * 2 ].offset = ramp; - QColor qStopColor = colorStops[ offset ]->color; - int r = qRed( qStopColor.rgb() ); - int g = qGreen( qStopColor.rgb() ); - int b = qBlue( qStopColor.rgb() ); - art_u32 rgba = (r << 24) | (g << 16) | (b << 8) | qAlpha(qStopColor.rgb()); + TQColor qStopColor = colorStops[ offset ]->color; + int r = tqRed( qStopColor.rgb() ); + int g = tqGreen( qStopColor.rgb() ); + int b = tqBlue( qStopColor.rgb() ); + art_u32 rgba = (r << 24) | (g << 16) | (b << 8) | tqAlpha(qStopColor.rgb()); /* convert from separated to premultiplied alpha */ int a = int( colorStops[ offset]->color.opacity() * 255.0 ); r = (rgba >> 24) * a + 0x80; @@ -842,11 +842,11 @@ VKoPainter::buildStopArray( VGradient &gradient, int &offsets ) { stopArray[ offset * 2 + 1 ].offset = ramp + ( colorStops[ offset + 1 ]->rampPoint - ramp ) * colorStops[ offset ]->midPoint; - QColor qStopColor2 = colorStops[ offset + 1 ]->color; - rgba = int(r + ((qRed(qStopColor2.rgb()) - r)) * 0.5) << 24 | - int(g + ((qGreen(qStopColor2.rgb()) - g)) * 0.5) << 16 | - int(b + ((qBlue(qStopColor2.rgb()) - b)) * 0.5) << 8 | - qAlpha(qStopColor2.rgb()); + TQColor qStopColor2 = colorStops[ offset + 1 ]->color; + rgba = int(r + ((tqRed(qStopColor2.rgb()) - r)) * 0.5) << 24 | + int(g + ((tqGreen(qStopColor2.rgb()) - g)) * 0.5) << 16 | + int(b + ((tqBlue(qStopColor2.rgb()) - b)) * 0.5) << 8 | + tqAlpha(qStopColor2.rgb()); /* convert from separated to premultiplied alpha */ int a = int( colorStops[ offset]->color.opacity() * 255.0 ); r = (rgba >> 24) * a + 0x80; @@ -871,7 +871,7 @@ VKoPainter::drawNode( const KoPoint& p, int width ) { if( !m_bDrawNodes ) return; - KoPoint _p( m_matrix.map( QPoint( int( p.x() * m_zoomFactor ), int( p.y() * m_zoomFactor ) ) ) ); + KoPoint _p( m_matrix.map( TQPoint( int( p.x() * m_zoomFactor ), int( p.y() * m_zoomFactor ) ) ) ); int x1 = int( _p.x() - width ); int x2 = int( _p.x() + width ); int y1 = int( _p.y() - width ); @@ -881,7 +881,7 @@ VKoPainter::drawNode( const KoPoint& p, int width ) int baseindex = 4 * x1 + ( m_width * 4 * y1 ); - QColor color = m_fill->color(); + TQColor color = m_fill->color(); for( int i = 0; i < y2 - y1; i++ ) { for( int j = 0; j < x2 - x1; j++ ) @@ -895,7 +895,7 @@ VKoPainter::drawNode( const KoPoint& p, int width ) } void -VKoPainter::drawImage( const QImage &image, const QWMatrix &affine ) +VKoPainter::drawImage( const TQImage &image, const TQWMatrix &affine ) { // set up world matrix double affineresult[6]; diff --git a/karbon/render/vkopainter.h b/karbon/render/vkopainter.h index 48336092..75ac0bd1 100644 --- a/karbon/render/vkopainter.h +++ b/karbon/render/vkopainter.h @@ -23,10 +23,10 @@ // kopainter/libart wrapper #include "vpainter.h" -#include <qwmatrix.h> -#include <qptrlist.h> +#include <tqwmatrix.h> +#include <tqptrlist.h> #include <koffice_export.h> -class QPainter; +class TQPainter; struct _ArtVpath; struct _ArtBpath; struct _ArtSVP; @@ -38,7 +38,7 @@ class KoRect; class KARBONBASE_EXPORT VKoPainter : public VPainter { public: - VKoPainter( QPaintDevice *target, unsigned int w = 0, unsigned int h = 0, bool = true ); + VKoPainter( TQPaintDevice *target, unsigned int w = 0, unsigned int h = 0, bool = true ); VKoPainter( unsigned char *buffer, unsigned int w = 0, unsigned int h = 0, bool = true ); virtual ~VKoPainter(); @@ -47,12 +47,12 @@ public: virtual void end(); virtual void blit( const KoRect & ); void clear(); - virtual void clear( const QColor & ); - virtual void clear( const KoRect &, const QColor & ); + virtual void clear( const TQColor & ); + virtual void clear( const KoRect &, const TQColor & ); // matrix manipulation - virtual void setWorldMatrix( const QWMatrix & ); - virtual const QWMatrix worldMatrix() { return m_matrix; } + virtual void setWorldMatrix( const TQWMatrix & ); + virtual const TQWMatrix tqworldMatrix() { return m_matrix; } virtual void setZoomFactor( double ); virtual double zoomFactor() { return m_zoomFactor; } @@ -74,22 +74,22 @@ public: // pen + brush virtual void setPen( const VStroke & ); - virtual void setPen( const QColor & ); + virtual void setPen( const TQColor & ); virtual void setPen( Qt::PenStyle style ); virtual void setBrush( const VFill & ); - virtual void setBrush( const QColor & ); - virtual void setBrush( Qt::BrushStyle style ); + virtual void setBrush( const TQColor & ); + virtual void setBrush( TQt::BrushStyle style ); - virtual void drawImage( const QImage &, const QWMatrix & ); + virtual void drawImage( const TQImage &, const TQWMatrix & ); // stack management virtual void save(); virtual void restore(); // - virtual void setRasterOp( Qt::RasterOp ); + virtual void setRasterOp( TQt::RasterOp ); - virtual QPaintDevice *device() { return m_target; } + virtual TQPaintDevice *device() { return m_target; } unsigned char *buffer() { return m_buffer; } private: @@ -106,15 +106,15 @@ private: unsigned int m_index; unsigned int m_alloccount; unsigned char *m_buffer; - QPaintDevice *m_target; + TQPaintDevice *m_target; unsigned int m_width; unsigned int m_height; - QWMatrix m_matrix; + TQWMatrix m_matrix; VStroke *m_stroke; VFill *m_fill; VFillRule m_fillRule; double m_zoomFactor; - QPtrList<_ArtSVP> m_clipPaths; + TQPtrList<_ArtSVP> m_clipPaths; bool m_bDrawNodes; diff --git a/karbon/render/vpainter.h b/karbon/render/vpainter.h index b638ddcc..84ad9d13 100644 --- a/karbon/render/vpainter.h +++ b/karbon/render/vpainter.h @@ -24,16 +24,16 @@ // painter abstraction -#include <qnamespace.h> +#include <tqnamespace.h> #include <KoRect.h> #include <vfillrule.h> -class QWMatrix; -class QPaintDevice; -class QColor; -class QPen; -class QBrush; -class QImage; +class TQWMatrix; +class TQPaintDevice; +class TQColor; +class TQPen; +class TQBrush; +class TQImage; class VStroke; class VFill; @@ -44,7 +44,7 @@ class KoRect; class VPainter { public: - VPainter( QPaintDevice *, unsigned int /*w*/ = 0, unsigned int /*h*/ = 0 ) {}; + VPainter( TQPaintDevice *, unsigned int /*w*/ = 0, unsigned int /*h*/ = 0 ) {}; virtual ~VPainter() {}; // @@ -52,12 +52,12 @@ public: virtual void begin() = 0; virtual void end() = 0; virtual void blit( const KoRect & ) = 0; - virtual void clear( const QColor & ) = 0; - virtual void clear( const KoRect &, const QColor & ) = 0; + virtual void clear( const TQColor & ) = 0; + virtual void clear( const KoRect &, const TQColor & ) = 0; // matrix manipulation - virtual void setWorldMatrix( const QWMatrix & ) = 0; - virtual const QWMatrix worldMatrix() = 0; + virtual void setWorldMatrix( const TQWMatrix & ) = 0; + virtual const TQWMatrix tqworldMatrix() = 0; virtual void setZoomFactor( double ) = 0; virtual double zoomFactor() { return 1.0; } @@ -80,23 +80,23 @@ public: // pen + brush virtual void setPen( const VStroke & ) = 0; // compatibility, use VPen/VBrush later ? - virtual void setPen( const QColor & ) = 0; + virtual void setPen( const TQColor & ) = 0; virtual void setPen( Qt::PenStyle style ) = 0; virtual void setBrush( const VFill & ) = 0; - virtual void setBrush( const QColor & ) = 0; - virtual void setBrush( Qt::BrushStyle style ) = 0; + virtual void setBrush( const TQColor & ) = 0; + virtual void setBrush( TQt::BrushStyle style ) = 0; - virtual void drawImage( const QImage &, const QWMatrix & ) {} + virtual void drawImage( const TQImage &, const TQWMatrix & ) {} // stack management virtual void save() = 0; virtual void restore() = 0; // we have to see how this fits in - virtual void setRasterOp( Qt::RasterOp ) = 0; + virtual void setRasterOp( TQt::RasterOp ) = 0; // access to device - virtual QPaintDevice *device() = 0; + virtual TQPaintDevice *device() = 0; }; #endif diff --git a/karbon/render/vpainterfactory.cc b/karbon/render/vpainterfactory.cc index a4d52c62..2d36882d 100644 --- a/karbon/render/vpainterfactory.cc +++ b/karbon/render/vpainterfactory.cc @@ -43,7 +43,7 @@ VPainterFactory::painter() } void -VPainterFactory::setPainter( QPaintDevice *target, int w, int h ) +VPainterFactory::setPainter( TQPaintDevice *target, int w, int h ) { if( m_painter ) delete m_painter; @@ -57,18 +57,18 @@ VPainterFactory::editpainter() } void -VPainterFactory::setEditPainter( QPaintDevice *target, int w, int h ) +VPainterFactory::setEditPainter( TQPaintDevice *target, int w, int h ) { if( m_editpainter ) delete m_editpainter; - m_editpainter = new VQPainter( target, w, h ); + m_editpainter = new VTQPainter( target, w, h ); } void -VPainterFactory::setWireframePainter( QPaintDevice *target, int w, int h ) +VPainterFactory::setWireframePainter( TQPaintDevice *target, int w, int h ) { if( m_painter ) delete m_painter; - m_painter = new VQPainter( target, w, h ); + m_painter = new VTQPainter( target, w, h ); } diff --git a/karbon/render/vpainterfactory.h b/karbon/render/vpainterfactory.h index df36819d..58695ba7 100644 --- a/karbon/render/vpainterfactory.h +++ b/karbon/render/vpainterfactory.h @@ -24,7 +24,7 @@ // painter factory #include <koffice_export.h> class VPainter; -class QPaintDevice; +class TQPaintDevice; class KARBONBASE_EXPORT VPainterFactory { @@ -33,12 +33,12 @@ public: ~VPainterFactory(); VPainter *painter(); - void setPainter( QPaintDevice *target, int w = 0, int h = 0 ); + void setPainter( TQPaintDevice *target, int w = 0, int h = 0 ); VPainter *editpainter(); - void setEditPainter( QPaintDevice *target, int w = 0, int h = 0 ); + void setEditPainter( TQPaintDevice *target, int w = 0, int h = 0 ); - void setWireframePainter( QPaintDevice *target, int w = 0, int h = 0 ); + void setWireframePainter( TQPaintDevice *target, int w = 0, int h = 0 ); private: VPainter *m_painter; diff --git a/karbon/render/vqpainter.cc b/karbon/render/vqpainter.cc index 31e5593e..7f380287 100644 --- a/karbon/render/vqpainter.cc +++ b/karbon/render/vqpainter.cc @@ -25,47 +25,47 @@ #include "vcolor.h" #include "vfill.h" -#include <qpainter.h> -#include <qpaintdevice.h> -#include <qpen.h> +#include <tqpainter.h> +#include <tqpaintdevice.h> +#include <tqpen.h> #include <KoPoint.h> #include <kdebug.h> -VQPainter::VQPainter( QPaintDevice *target, unsigned int w, unsigned int h ) : VPainter( target, w, h ), m_painter( 0L ), m_target( target ), m_width( w ), m_height( h ) +VTQPainter::VTQPainter( TQPaintDevice *target, unsigned int w, unsigned int h ) : VPainter( target, w, h ), m_painter( 0L ), m_target( target ), m_width( w ), m_height( h ) { m_zoomFactor = 1; m_index = 0; - m_painter = new QPainter( target ); + m_painter = new TQPainter( target ); } -VQPainter::~VQPainter() +VTQPainter::~VTQPainter() { delete m_painter; } void -VQPainter::resize( unsigned int w, unsigned int h ) +VTQPainter::resize( unsigned int w, unsigned int h ) { m_width = w; m_height = h; } void -VQPainter::blit( const KoRect & ) +VTQPainter::blit( const KoRect & ) { end(); } void -VQPainter::clear( const QColor &c ) +VTQPainter::clear( const TQColor &c ) { m_painter->setBackgroundColor( c ); m_painter->eraseRect( 0, 0, m_width, m_height ); } void -VQPainter::begin() +VTQPainter::begin() { if( !m_painter->isActive() ) { @@ -75,34 +75,34 @@ VQPainter::begin() } void -VQPainter::end() +VTQPainter::end() { m_painter->end(); } -const QWMatrix -VQPainter::worldMatrix() +const TQWMatrix +VTQPainter::tqworldMatrix() { - return m_painter->worldMatrix(); + return m_painter->tqworldMatrix(); } void -VQPainter::setWorldMatrix( const QWMatrix& mat ) +VTQPainter::setWorldMatrix( const TQWMatrix& mat ) { m_painter->setWorldMatrix( mat ); } void -VQPainter::setZoomFactor( double zoomFactor ) +VTQPainter::setZoomFactor( double zoomFactor ) { m_zoomFactor = zoomFactor; - /*QWMatrix mat; + /*TQWMatrix mat; mat.scale( zoomFactor, zoomFactor ); m_painter->setWorldMatrix( mat );*/ } void -VQPainter::moveTo( const KoPoint &p ) +VTQPainter::moveTo( const KoPoint &p ) { //m_index = 0; if( m_pa.size() <= m_index ) @@ -114,7 +114,7 @@ VQPainter::moveTo( const KoPoint &p ) } void -VQPainter::lineTo( const KoPoint &p ) +VTQPainter::lineTo( const KoPoint &p ) { if( m_pa.size() <= m_index ) m_pa.resize( m_index + 10 ); @@ -125,16 +125,16 @@ VQPainter::lineTo( const KoPoint &p ) } void -VQPainter::curveTo( const KoPoint &p1, const KoPoint &p2, const KoPoint &p3 ) +VTQPainter::curveTo( const KoPoint &p1, const KoPoint &p2, const KoPoint &p3 ) { - // calculate cubic bezier using a temp QPointArray - QPointArray pa( 4 ); + // calculate cubic bezier using a temp TQPointArray + TQPointArray pa( 4 ); pa.setPoint( 0, m_pa.point( m_index - 1 ).x(), m_pa.point( m_index - 1 ).y() ); pa.setPoint( 1, static_cast<int>(p1.x() * m_zoomFactor), static_cast<int>(p1.y() * m_zoomFactor) ); pa.setPoint( 2, static_cast<int>(p2.x() * m_zoomFactor), static_cast<int>(p2.y() * m_zoomFactor) ); pa.setPoint( 3, static_cast<int>(p3.x() * m_zoomFactor), static_cast<int>(p3.y() * m_zoomFactor) ); - QPointArray pa2( pa.cubicBezier() ); + TQPointArray pa2( pa.cubicBezier() ); m_pa.resize( m_index + pa2.size() ); m_pa.putPoints( m_index, pa2.size(), pa2 ); @@ -143,30 +143,30 @@ VQPainter::curveTo( const KoPoint &p1, const KoPoint &p2, const KoPoint &p3 ) } void -VQPainter::newPath() +VTQPainter::newPath() { m_index = 0; } void -VQPainter::fillPath() +VTQPainter::fillPath() { // we probably dont need filling for qpainter //m_index = 0; - m_painter->drawPolygon( m_pa, FALSE, 0, m_index ); + m_painter->tqdrawPolygon( m_pa, FALSE, 0, m_index ); } void -VQPainter::strokePath() +VTQPainter::strokePath() { - m_painter->drawPolyline( m_pa, 0, m_index ); + m_painter->tqdrawPolyline( m_pa, 0, m_index ); m_index = 0; } void -VQPainter::setPen( const VStroke &stroke ) +VTQPainter::setPen( const VStroke &stroke ) { - QPen pen; + TQPen pen; // color + linewidth pen.setColor( stroke.color() ); @@ -184,23 +184,23 @@ VQPainter::setPen( const VStroke &stroke ) } void -VQPainter::setBrush( const VFill &fill ) +VTQPainter::setBrush( const VFill &fill ) { switch( fill.type() ) { case VFill::none: - m_painter->setBrush( Qt::NoBrush ); + m_painter->setBrush( TQt::NoBrush ); break; case VFill::solid: - m_painter->setBrush( QBrush( fill.color(), Qt::SolidPattern ) ); + m_painter->setBrush( TQBrush( fill.color(), TQt::SolidPattern ) ); break; case VFill::grad: // gradients are nor supported by qpainter - m_painter->setBrush( Qt::NoBrush ); + m_painter->setBrush( TQt::NoBrush ); break; case VFill::patt: // pixmap brushes not supported for printing - m_painter->setBrush( QBrush( fill.color(), fill.pattern().pixmap() ) ); + m_painter->setBrush( TQBrush( fill.color(), fill.pattern().pixmap() ) ); break; default: break; @@ -208,64 +208,64 @@ VQPainter::setBrush( const VFill &fill ) } void -VQPainter::setPen( const QColor &c ) +VTQPainter::setPen( const TQColor &c ) { m_painter->setPen( c ); } void -VQPainter::setPen( Qt::PenStyle style ) +VTQPainter::setPen( Qt::PenStyle style ) { m_painter->setPen( style ); } void -VQPainter::setBrush( const QColor &c ) +VTQPainter::setBrush( const TQColor &c ) { m_painter->setBrush( c ); } void -VQPainter::setBrush( Qt::BrushStyle style ) +VTQPainter::setBrush( TQt::BrushStyle style ) { m_painter->setBrush( style ); } void -VQPainter::save() +VTQPainter::save() { m_painter->save(); } void -VQPainter::restore() +VTQPainter::restore() { m_painter->restore(); } void -VQPainter::setRasterOp( Qt::RasterOp r ) +VTQPainter::setRasterOp( TQt::RasterOp r ) { m_painter->setRasterOp( r ); } void -VQPainter::drawNode( const KoPoint &p, int width ) +VTQPainter::drawNode( const KoPoint &p, int width ) { - m_painter->drawRect( QRect( int( p.x() * m_zoomFactor ) - width, int( p.y() * m_zoomFactor ) - width, + m_painter->drawRect( TQRect( int( p.x() * m_zoomFactor ) - width, int( p.y() * m_zoomFactor ) - width, 2 * width + 1, 2 * width + 1 ) ); } void -VQPainter::drawRect( const KoRect &rect ) +VTQPainter::drawRect( const KoRect &rect ) { - m_painter->drawRect( QRect( int( rect.x() ), int( rect.y() ), int( rect.width() ), int( rect.height() ) ) ); + m_painter->drawRect( TQRect( int( rect.x() ), int( rect.y() ), int( rect.width() ), int( rect.height() ) ) ); } void -VQPainter::drawImage( const QImage &image, const QWMatrix &affine ) +VTQPainter::drawImage( const TQImage &image, const TQWMatrix &affine ) { - QWMatrix matrix = m_painter->worldMatrix(); + TQWMatrix matrix = m_painter->tqworldMatrix(); double m11 = affine.m11() * matrix.m11() * m_zoomFactor + affine.m12() * matrix.m21(); double m12 = (affine.m11() * matrix.m12() + affine.m12() * matrix.m22() ) * m_zoomFactor; @@ -274,11 +274,11 @@ VQPainter::drawImage( const QImage &image, const QWMatrix &affine ) double dx = matrix.dx() + affine.dx() * m_zoomFactor; double dy = matrix.dy() - affine.dy() * m_zoomFactor; - QWMatrix world( m11, m12, m21, m22, dx, dy ); + TQWMatrix world( m11, m12, m21, m22, dx, dy ); m_painter->setWorldMatrix( world ); - m_painter->drawImage( QPoint( 0, 0 ), image ); + m_painter->drawImage( TQPoint( 0, 0 ), image ); // restore old world matrix m_painter->setWorldMatrix( matrix ); } diff --git a/karbon/render/vqpainter.h b/karbon/render/vqpainter.h index 7f4f501b..d1a556db 100644 --- a/karbon/render/vqpainter.h +++ b/karbon/render/vqpainter.h @@ -18,33 +18,33 @@ * Boston, MA 02110-1301, USA. */ -#ifndef __VQPAINTER_H__ -#define __VQPAINTER_H__ +#ifndef __VTQPAINTER_H__ +#define __VTQPAINTER_H__ // qpainter wrapper #include "vpainter.h" -#include "qpointarray.h" +#include "tqpointarray.h" -class QPainter; +class TQPainter; -class VQPainter : public VPainter +class VTQPainter : public VPainter { public: - VQPainter( QPaintDevice *target, unsigned int w = 0, unsigned int h = 0 ); - virtual ~VQPainter(); + VTQPainter( TQPaintDevice *target, unsigned int w = 0, unsigned int h = 0 ); + virtual ~VTQPainter(); // virtual void resize( unsigned int w, unsigned int h ); virtual void begin(); virtual void end(); virtual void blit( const KoRect & ); - virtual void clear( const QColor & ); - virtual void clear( const KoRect &, const QColor & ) {} + virtual void clear( const TQColor & ); + virtual void clear( const KoRect &, const TQColor & ) {} // matrix manipulation - virtual void setWorldMatrix( const QWMatrix & ); - virtual const QWMatrix worldMatrix(); + virtual void setWorldMatrix( const TQWMatrix & ); + virtual const TQWMatrix tqworldMatrix(); virtual void setZoomFactor( double ); virtual double zoomFactor() { return m_zoomFactor; } @@ -61,13 +61,13 @@ public: // pen + brush virtual void setPen( const VStroke & ); - virtual void setPen( const QColor & ); + virtual void setPen( const TQColor & ); virtual void setPen( Qt::PenStyle style ); virtual void setBrush( const VFill & ); - virtual void setBrush( const QColor & ); - virtual void setBrush( Qt::BrushStyle style ); + virtual void setBrush( const TQColor & ); + virtual void setBrush( TQt::BrushStyle style ); - virtual void drawImage( const QImage &, const QWMatrix & ); + virtual void drawImage( const TQImage &, const TQWMatrix & ); // stack management virtual void save(); @@ -78,16 +78,16 @@ public: virtual void drawRect( const KoRect & ); // - virtual void setRasterOp( Qt::RasterOp ); + virtual void setRasterOp( TQt::RasterOp ); - virtual QPaintDevice *device() { return m_target; } + virtual TQPaintDevice *device() { return m_target; } private: double m_zoomFactor; unsigned int m_index; - QPointArray m_pa; - QPainter *m_painter; - QPaintDevice *m_target; + TQPointArray m_pa; + TQPainter *m_painter; + TQPaintDevice *m_target; unsigned int m_width; unsigned int m_height; }; diff --git a/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c b/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c index 7e955610..bbafa393 100644 --- a/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c +++ b/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c @@ -1103,24 +1103,24 @@ xlib_window_is_viewable (Window w) XWindowAttributes wa; while (w != 0) { - Window parent, root, *children; - int nchildren; + Window tqparent, root, *tqchildren; + int ntqchildren; XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa); if (wa.map_state != IsViewable) return 0; if (!XQueryTree (gdk_pixbuf_dpy, w, &root, - &parent, &children, &nchildren)) + &tqparent, &tqchildren, &ntqchildren)) return 0; - if (nchildren > 0) - XFree (children); + if (ntqchildren > 0) + XFree (tqchildren); - if (parent == root) + if (tqparent == root) return 1; - w = parent; + w = tqparent; } return 0; diff --git a/karbon/render/xrgbrender/gdk-pixbuf-xlib-render.c b/karbon/render/xrgbrender/gdk-pixbuf-xlib-render.c index f2439138..f8f890e3 100644 --- a/karbon/render/xrgbrender/gdk-pixbuf-xlib-render.c +++ b/karbon/render/xrgbrender/gdk-pixbuf-xlib-render.c @@ -31,7 +31,7 @@ ** * gdk_pixbuf_xlib_render_threshold_alpha: * @pixbuf: A pixbuf. - * @bitmap: Bitmap where the bilevel mask will be painted to. + * @bitmap: Bitmap where the bilevel tqmask will be painted to. * @src_x: Source X coordinate. * @src_y: source Y coordinate. * @dest_x: Destination X coordinate. @@ -42,7 +42,7 @@ * other values will be painted as one. * * Takes the opacity values in a rectangular portion of a pixbuf and thresholds - * them to produce a bi-level alpha mask that can be used as a clipping mask for + * them to produce a bi-level alpha tqmask that can be used as a clipping tqmask for * a drawable. * void @@ -177,7 +177,7 @@ remove_alpha (GdkPixbuf *pixbuf, int x, int y, int width, int height, int *rowst * specified GC. This is done using XlibRGB, so the specified drawable must * have the XlibRGB visual and colormap. Note that this function will ignore * the opacity information for images with an alpha channel; the GC must already - * have the clipping mask set if you want transparent regions to show through. + * have the clipping tqmask set if you want transparent regions to show through. * * For an explanation of dither offsets, see the XlibRGB documentation. In * brief, the dither offset is important when re-rendering partial regions of an @@ -255,7 +255,7 @@ gdk_pixbuf_xlib_render_to_drawable (GdkPixbuf *pixbuf, * * When used with #GDK_PIXBUF_ALPHA_BILEVEL, this function has to create a bitmap * out of the thresholded alpha channel of the image and, it has to set this - * bitmap as the clipping mask for the GC used for drawing. This can be a + * bitmap as the clipping tqmask for the GC used for drawing. This can be a * significant performance penalty depending on the size and the complexity of * the alpha channel of the image. If performance is crucial, consider handling * the alpha channel yourself (possibly by caching it in your application) and @@ -320,23 +320,23 @@ gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf, Drawable drawable, * @pixbuf: A pixbuf. * @pixmap_return: Return value for the created pixmap. - * @mask_return: Return value for the created mask. + * @tqmask_return: Return value for the created tqmask. * @alpha_threshold: Threshold value for opacity values. * - * Creates a pixmap and a mask bitmap which are returned in the @pixmap_return - * and @mask_return arguments, respectively, and renders a pixbuf and its - * corresponding tresholded alpha mask to them. This is merely a convenience + * Creates a pixmap and a tqmask bitmap which are returned in the @pixmap_return + * and @tqmask_return arguments, respectively, and renders a pixbuf and its + * corresponding tresholded alpha tqmask to them. This is merely a convenience * function; applications that need to render pixbufs with dither offsets or to * given drawables should use gdk_pixbuf_xlib_render_to_drawable_alpha() or * gdk_pixbuf_xlib_render_to_drawable(), and * gdk_pixbuf_xlib_render_threshold_alpha(). * - * If the pixbuf does not have an alpha channel, then *@mask_return will be set + * If the pixbuf does not have an alpha channel, then *@tqmask_return will be set * to None. void -gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf, +gdk_pixbuf_xlib_render_pixmap_and_tqmask (GdkPixbuf *pixbuf, Pixmap *pixmap_return, - Pixmap *mask_return, + Pixmap *tqmask_return, int alpha_threshold) { g_return_if_fail (pixbuf != NULL); @@ -361,20 +361,20 @@ gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf, XFreeGC (gdk_pixbuf_dpy, gc); } - if (mask_return) { + if (tqmask_return) { if (pixbuf->has_alpha) { - *mask_return = XCreatePixmap (gdk_pixbuf_dpy, + *tqmask_return = XCreatePixmap (gdk_pixbuf_dpy, RootWindow (gdk_pixbuf_dpy, gdk_pixbuf_screen), pixbuf->width, pixbuf->height, 1); gdk_pixbuf_xlib_render_threshold_alpha (pixbuf, - *mask_return, + *tqmask_return, 0, 0, 0, 0, pixbuf->width, pixbuf->height, alpha_threshold); } else - *mask_return = 0; + *tqmask_return = 0; } }*/ diff --git a/karbon/render/xrgbrender/gdk-pixbuf-xlib.h b/karbon/render/xrgbrender/gdk-pixbuf-xlib.h index 2b31ed7e..26d2426a 100644 --- a/karbon/render/xrgbrender/gdk-pixbuf-xlib.h +++ b/karbon/render/xrgbrender/gdk-pixbuf-xlib.h @@ -63,9 +63,9 @@ void gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf, XlibRgbDither dither, int x_dither, int y_dither); -void gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf, +void gdk_pixbuf_xlib_render_pixmap_and_tqmask (GdkPixbuf *pixbuf, Pixmap *pixmap_return, - Pixmap *mask_return, + Pixmap *tqmask_return, int alpha_threshold); diff --git a/karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c b/karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c index 171db33d..5c6c6ae0 100644 --- a/karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c +++ b/karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c @@ -930,7 +930,7 @@ xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth) static_image[i]->byte_order = MSBFirst; } } - /* ok, so apparently, image_info->bpp is actually + /* ok, so aptqparently, image_info->bpp is actually BYTES per pixel. What fun! */ switch (static_image[0]->bits_per_pixel) { case 1: |