summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-27 02:13:42 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-27 02:13:42 -0600
commit520c05ef06ce203ad32470730f68402bc7719157 (patch)
tree8d0bb18bbbecb4c837e232848905e5819db84b81 /src/opengl
parentb82553bf90cb5311cfe8e673b07cf6cffc95fd3c (diff)
downloadtqt3-520c05ef06ce203ad32470730f68402bc7719157.tar.gz
tqt3-520c05ef06ce203ad32470730f68402bc7719157.zip
Automated update from qt3
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl_x11.cpp14
-rw-r--r--src/opengl/qglcolormap.cpp14
2 files changed, 14 insertions, 14 deletions
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index caa76398..8989a05b 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -765,7 +765,7 @@ TQColor TQGLContext::overlayTransparentColor() const
uchar r = (uchar)((col.red / 65535.0) * 255.0 + 0.5);
uchar g = (uchar)((col.green / 65535.0) * 255.0 + 0.5);
uchar b = (uchar)((col.blue / 65535.0) * 255.0 + 0.5);
- return TQColor(qRgb(r,g,b), trans_colors[i].color);
+ return TQColor(tqRgb(r,g,b), trans_colors[i].color);
}
}
}
@@ -823,9 +823,9 @@ uint TQGLContext::colorIndex( const TQColor& c ) const
XColor col;
col.flags = DoRed | DoGreen | DoBlue;
col.pixel = color_map_entry;
- col.red = (ushort)((qRed(c.rgb()) / 255.0) * 65535.0 + 0.5);
- col.green = (ushort)((qGreen(c.rgb()) / 255.0) * 65535.0 + 0.5);
- col.blue = (ushort)((qBlue(c.rgb()) / 255.0) * 65535.0 + 0.5);
+ col.red = (ushort)((tqRed(c.rgb()) / 255.0) * 65535.0 + 0.5);
+ col.green = (ushort)((tqGreen(c.rgb()) / 255.0) * 65535.0 + 0.5);
+ col.blue = (ushort)((tqBlue(c.rgb()) / 255.0) * 65535.0 + 0.5);
XStoreColor(TQPaintDevice::x11AppDisplay(), x->cmap, &col);
cmap->insert(color_map_entry, target);
@@ -1275,9 +1275,9 @@ static void qStoreColors( TQWidget * tlw, Colormap cmap,
for ( int i = 0; i < cols.size(); i++ ) {
color = cols.entryRgb( i );
c.pixel = i;
- c.red = (ushort)( (qRed( color ) / 255.0) * 65535.0 + 0.5 );
- c.green = (ushort)( (qGreen( color ) / 255.0) * 65535.0 + 0.5 );
- c.blue = (ushort)( (qBlue( color ) / 255.0) * 65535.0 + 0.5 );
+ c.red = (ushort)( (tqRed( color ) / 255.0) * 65535.0 + 0.5 );
+ c.green = (ushort)( (tqGreen( color ) / 255.0) * 65535.0 + 0.5 );
+ c.blue = (ushort)( (tqBlue( color ) / 255.0) * 65535.0 + 0.5 );
c.flags = DoRed | DoGreen | DoBlue;
XStoreColor( tlw->x11Display(), cmap, &c );
}
diff --git a/src/opengl/qglcolormap.cpp b/src/opengl/qglcolormap.cpp
index 048b7dc2..d095a754 100644
--- a/src/opengl/qglcolormap.cpp
+++ b/src/opengl/qglcolormap.cpp
@@ -86,7 +86,7 @@
// This will fill the colormap with colors ranging from
// black to white.
for ( int i = 0; i < colormap.size(); i++ )
- colormap.setEntry( i, qRgb( i, i, i ) );
+ colormap.setEntry( i, tqRgb( i, i, i ) );
widget.setColormap( colormap );
widget.show();
@@ -273,15 +273,15 @@ int TQGLColormap::findNearest( TQRgb color ) const
return idx;
int mapSize = size();
int mindist = 200000;
- int r = qRed( color );
- int g = qGreen( color );
- int b = qBlue( color );
+ int r = tqRed( color );
+ int g = tqGreen( color );
+ int b = tqBlue( color );
int rx, gx, bx, dist;
for ( int i=0; i < mapSize; i++ ) {
TQRgb ci = d->cells[i];
- rx = r - qRed( ci );
- gx = g - qGreen( ci );
- bx = b - qBlue( ci );
+ rx = r - tqRed( ci );
+ gx = g - tqGreen( ci );
+ bx = b - tqBlue( ci );
dist = rx*rx + gx*gx + bx*bx; // calculate distance
if ( dist < mindist ) { // minimal?
mindist = dist;