summaryrefslogtreecommitdiffstats
path: root/src/kernel/qwmatrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qwmatrix.cpp')
-rw-r--r--src/kernel/qwmatrix.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/kernel/qwmatrix.cpp b/src/kernel/qwmatrix.cpp
index e85cb00c..10a7c93f 100644
--- a/src/kernel/qwmatrix.cpp
+++ b/src/kernel/qwmatrix.cpp
@@ -246,8 +246,8 @@ TQWMatrix::TransformationMode TQWMatrix::transformationMode()
{ \
double fx = x; \
double fy = y; \
- nx = qRound(_m11*fx + _m21*fy + _dx); \
- ny = qRound(_m12*fx + _m22*fy + _dy); \
+ nx = tqRound(_m11*fx + _m21*fy + _dx); \
+ ny = tqRound(_m12*fx + _m22*fy + _dy); \
}
/*****************************************************************************
@@ -447,10 +447,10 @@ TQRect TQWMatrix::mapRect( const TQRect &rect ) const
}
} else {
if ( _m12 == 0.0F && _m21 == 0.0F ) {
- int x = qRound( _m11*rect.x() + _dx );
- int y = qRound( _m22*rect.y() + _dy );
- int w = qRound( _m11*rect.width() );
- int h = qRound( _m22*rect.height() );
+ int x = tqRound( _m11*rect.x() + _dx );
+ int y = tqRound( _m22*rect.y() + _dy );
+ int w = tqRound( _m11*rect.width() );
+ int h = tqRound( _m22*rect.height() );
if ( w < 0 ) {
w = -w;
x -= w-1;
@@ -491,7 +491,7 @@ TQRect TQWMatrix::mapRect( const TQRect &rect ) const
ymin -= ( ymin - y0 ) / h;
xmax -= ( xmax - x0 ) / w;
ymax -= ( ymax - y0 ) / h;
- result = TQRect( qRound(xmin), qRound(ymin), qRound(xmax)-qRound(xmin)+1, qRound(ymax)-qRound(ymin)+1 );
+ result = TQRect( tqRound(xmin), tqRound(ymin), tqRound(xmax)-tqRound(xmin)+1, tqRound(ymax)-tqRound(ymin)+1 );
}
}
return result;
@@ -505,8 +505,8 @@ TQPoint TQWMatrix::operator *( const TQPoint &p ) const
{
double fx = p.x();
double fy = p.y();
- return TQPoint( qRound(_m11*fx + _m21*fy + _dx),
- qRound(_m12*fx + _m22*fy + _dy) );
+ return TQPoint( tqRound(_m11*fx + _m21*fy + _dx),
+ tqRound(_m12*fx + _m22*fy + _dy) );
}
@@ -580,8 +580,8 @@ TQPointArray TQWMatrix::operator *( const TQPointArray &a ) const
TQPointArray result( size );
TQPoint *dr = result.data();
for( i = 0; i < size; i++ ) {
- dr[i].setX( qRound( dp[i].x - (dp[i].x - dp[xminp].x)/w ) );
- dr[i].setY( qRound( dp[i].y - (dp[i].y - dp[yminp].y)/h ) );
+ dr[i].setX( tqRound( dp[i].x - (dp[i].x - dp[xminp].x)/w ) );
+ dr[i].setY( tqRound( dp[i].y - (dp[i].y - dp[yminp].y)/h ) );
}
return result;
}
@@ -599,10 +599,10 @@ TQRegion TQWMatrix::operator * (const TQRect &rect ) const
if( qt_old_transformations ) {
result = TQRect( map(rect.topLeft()), map(rect.bottomRight()) ).normalize();
} else {
- int x = qRound( _m11*rect.x() + _dx );
- int y = qRound( _m22*rect.y() + _dy );
- int w = qRound( _m11*rect.width() );
- int h = qRound( _m22*rect.height() );
+ int x = tqRound( _m11*rect.x() + _dx );
+ int y = tqRound( _m22*rect.y() + _dy );
+ int w = tqRound( _m11*rect.width() );
+ int h = tqRound( _m22*rect.height() );
if ( w < 0 ) {
w = -w;
x -= w - 1;
@@ -637,10 +637,10 @@ TQPointArray TQWMatrix::mapToPolygon( const TQRect &rect ) const
}
double x[4], y[4];
if ( _m12 == 0.0F && _m21 == 0.0F ) {
- x[0] = qRound( _m11*rect.x() + _dx );
- y[0] = qRound( _m22*rect.y() + _dy );
- double w = qRound( _m11*rect.width() );
- double h = qRound( _m22*rect.height() );
+ x[0] = tqRound( _m11*rect.x() + _dx );
+ y[0] = tqRound( _m22*rect.y() + _dy );
+ double w = tqRound( _m11*rect.width() );
+ double h = tqRound( _m22*rect.height() );
if ( w < 0 ) {
w = -w;
x[0] -= w - 1.;
@@ -702,16 +702,16 @@ TQPointArray TQWMatrix::mapToPolygon( const TQRect &rect ) const
#if 0
int i;
for( i = 0; i< 4; i++ )
- qDebug("coords(%d) = (%f/%f) (%d/%d)", i, x[i], y[i], qRound(x[i]), qRound(y[i]) );
+ qDebug("coords(%d) = (%f/%f) (%d/%d)", i, x[i], y[i], tqRound(x[i]), tqRound(y[i]) );
qDebug( "width=%f, height=%f", sqrt( (x[1]-x[0])*(x[1]-x[0]) + (y[1]-y[0])*(y[1]-y[0]) ),
sqrt( (x[0]-x[3])*(x[0]-x[3]) + (y[0]-y[3])*(y[0]-y[3]) ) );
#endif
// all coordinates are correctly, tranform to a pointarray
// (rounding to the next integer)
- a.setPoints( 4, qRound( x[0] ), qRound( y[0] ),
- qRound( x[1] ), qRound( y[1] ),
- qRound( x[2] ), qRound( y[2] ),
- qRound( x[3] ), qRound( y[3] ) );
+ a.setPoints( 4, tqRound( x[0] ), tqRound( y[0] ),
+ tqRound( x[1] ), tqRound( y[1] ),
+ tqRound( x[2] ), tqRound( y[2] ),
+ tqRound( x[3] ), tqRound( y[3] ) );
return a;
}
@@ -729,10 +729,10 @@ TQRegion TQWMatrix::operator * (const TQRegion &r ) const
if ( _m12 == 0.0F && _m21 == 0.0F && _m11 > 1.0F && _m22 > 1.0F ) {
// simple case, no rotation
while ( i ) {
- int x = qRound( _m11*rect->x() + _dx );
- int y = qRound( _m22*rect->y() + _dy );
- int w = qRound( _m11*rect->width() );
- int h = qRound( _m22*rect->height() );
+ int x = tqRound( _m11*rect->x() + _dx );
+ int y = tqRound( _m22*rect->y() + _dy );
+ int w = tqRound( _m11*rect->width() );
+ int h = tqRound( _m22*rect->height() );
if ( w < 0 ) {
w = -w;
x -= w-1;