Commit aeac47f8 authored by Ingo Klöcker's avatar Ingo Klöcker

Fix compilation (round returns a floating point number and no integer)

svn path=/trunk/kdegraphics/kpdf/; revision=255361
parent 78504f30
......@@ -736,7 +736,7 @@ void QOutputDev::drawImageMask ( GfxState *state, Object */*ref*/, Stream *str,
GfxRGB rgb;
state-> getFillRGB ( &rgb );
uint val = ( round ( rgb. r * 255 ) & 0xff ) << 16 | ( round ( rgb. g * 255 ) & 0xff ) << 8 | ( round ( rgb. b * 255 ) & 0xff );
uint val = ( int( round ( rgb. r * 255 ) ) & 0xff ) << 16 | ( int( round ( rgb. g * 255 ) ) & 0xff ) << 8 | ( int( round ( rgb. b * 255 ) ) & 0xff );
QImage img ( width, height, 32 );
......@@ -882,7 +882,7 @@ void QOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, int wi
imgStr-> getPixel ( pixBuf );
colorMap-> getRGB ( pixBuf, &rgb );
uint val = ( round ( rgb. r * 255 ) & 0xff ) << 16 | ( round ( rgb. g * 255 ) & 0xff ) << 8 | ( round ( rgb. b * 255 ) & 0xff );
uint val = ( int( round ( rgb. r * 255 ) ) & 0xff ) << 16 | ( int( round ( rgb. g * 255 ) ) & 0xff ) << 8 | ( int( round ( rgb. b * 255 ) ) & 0xff );
if ( maskColors ) {
for ( int k = 0; k < nComps; ++k ) {
......
......@@ -721,7 +721,7 @@ void QOutputDevPixmap::drawImageMask ( GfxState *state, Object */*ref*/, Stream
GfxRGB rgb;
state-> getFillRGB ( &rgb );
uint val = ( round ( rgb. r * 255 ) & 0xff ) << 16 | ( round ( rgb. g * 255 ) & 0xff ) << 8 | ( round ( rgb. b * 255 ) & 0xff );
uint val = ( int( round ( rgb. r * 255 ) ) & 0xff ) << 16 | ( int( round ( rgb. g * 255 ) ) & 0xff ) << 8 | ( int( round ( rgb. b * 255 ) ) & 0xff );
QImage img ( width, height, 32 );
......@@ -866,7 +866,7 @@ void QOutputDevPixmap::drawImage(GfxState *state, Object */*ref*/, Stream *str,
imgStr-> getPixel ( pixBuf );
colorMap-> getRGB ( pixBuf, &rgb );
uint val = ( round ( rgb. r * 255 ) & 0xff ) << 16 | ( round ( rgb. g * 255 ) & 0xff ) << 8 | ( round ( rgb. b * 255 ) & 0xff );
uint val = ( int( round ( rgb. r * 255 ) ) & 0xff ) << 16 | ( int( round ( rgb. g * 255 ) ) & 0xff ) << 8 | ( int( round ( rgb. b * 255 ) ) & 0xff );
if ( maskColors ) {
for ( int k = 0; k < nComps; ++k ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment