summaryrefslogtreecommitdiff
path: root/basebmp
diff options
context:
space:
mode:
authorHerbert Duerr <hdu@openoffice.org>2006-06-07 09:10:21 +0000
committerHerbert Duerr <hdu@openoffice.org>2006-06-07 09:10:21 +0000
commit0ef3a9bf3418c03f350df5f91c9c623018c715cb (patch)
treea871d2be8bfefa854ca5a54bc7f63ad968eddf72 /basebmp
parentaae32238526a0df07e9995bcf21bcba17b959ed6 (diff)
#i65904# SAl_MAX_UINT8 was right in operator*
Diffstat (limited to 'basebmp')
-rw-r--r--basebmp/inc/basebmp/color.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/basebmp/inc/basebmp/color.hxx b/basebmp/inc/basebmp/color.hxx
index 3c96f22eb774..088e77ba9a07 100644
--- a/basebmp/inc/basebmp/color.hxx
+++ b/basebmp/inc/basebmp/color.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: color.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: hdu $ $Date: 2006-06-07 09:21:55 $
+ * last change: $Author: hdu $ $Date: 2006-06-07 10:10:21 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -71,9 +71,9 @@ public:
Color operator-( Color col ) const { return Color(vigra::abs((int)getRed()-col.getRed()),
vigra::abs((int)getGreen()-col.getGreen()),
vigra::abs((int)getBlue()-col.getBlue())); }
- Color operator*( sal_uInt8 n ) const { return Color(((sal_uInt32)n*getRed())/255,
- ((sal_uInt32)n*getGreen())/255,
- ((sal_uInt32)n*getBlue())/255); }
+ Color operator*( sal_uInt8 n ) const { return Color(((sal_uInt32)n*getRed())/SAL_MAX_UINT8,
+ ((sal_uInt32)n*getGreen())/SAL_MAX_UINT8,
+ ((sal_uInt32)n*getBlue())/SAL_MAX_UINT8); }
Color operator*( double n ) const { return Color((sal_uInt8)(n*getRed()+.5),
(sal_uInt8)(n*getGreen()+.5),
(sal_uInt8)(n*getBlue()+.5)); }