diff options
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qgl_x11.cpp | 14 | ||||
-rw-r--r-- | src/opengl/qglcolormap.cpp | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index caa763981..8989a05b4 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 048b7dc29..d095a754c 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; |