summaryrefslogtreecommitdiff
path: root/basebmp/inc
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-10-12 12:46:55 +0000
committerOliver Bolte <obo@openoffice.org>2006-10-12 12:46:55 +0000
commit7c3a03f66cbffd21fd069ab7dfca1117c3f57f22 (patch)
tree0c610ac4e35417331cd03908e9ab63613e190997 /basebmp/inc
parent3a335081b176d980ab90fa0822d00c3283cf0075 (diff)
INTEGRATION: CWS sb59 (1.1.4); FILE MERGED
2006/08/30 22:52:04 thb 1.1.4.1: #i69122# Made basebmp compile warning-free
Diffstat (limited to 'basebmp/inc')
-rw-r--r--basebmp/inc/basebmp/rgbmaskpixelformats.hxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/basebmp/inc/basebmp/rgbmaskpixelformats.hxx b/basebmp/inc/basebmp/rgbmaskpixelformats.hxx
index e0a12e211ddf..bbaf5e6f2b54 100644
--- a/basebmp/inc/basebmp/rgbmaskpixelformats.hxx
+++ b/basebmp/inc/basebmp/rgbmaskpixelformats.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: rgbmaskpixelformats.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: thb $ $Date: 2006-07-11 11:38:55 $
+ * last change: $Author: obo $ $Date: 2006-10-12 13:46:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -129,31 +129,34 @@ template< typename PixelType,
const typename base_type::unsigned_pixel_type green(v & GreenMask);
const typename base_type::unsigned_pixel_type blue (v & BlueMask);
+ // shift color nibbles to right-aligend position. ORing it
+ // channel value shifted twice the number of channel bits, to
+ // spread the value into the component_type range
ColorType res( (shiftRight(red,
base_type::red_shift-8*
- sizeof(typename base_type::component_type)+
+ (signed)sizeof(typename base_type::component_type)+
base_type::red_bits)) |
(shiftRight(red,
base_type::red_shift-8*
- sizeof(typename base_type::component_type)+
+ (signed)sizeof(typename base_type::component_type)+
2*base_type::red_bits)),
(shiftRight(green,
base_type::green_shift-8*
- sizeof(typename base_type::component_type)+
+ (signed)sizeof(typename base_type::component_type)+
base_type::green_bits)) |
(shiftRight(green,
base_type::green_shift-8*
- sizeof(typename base_type::component_type)+
+ (signed)sizeof(typename base_type::component_type)+
2*base_type::green_bits)),
(shiftRight(blue,
base_type::blue_shift-8*
- sizeof(typename base_type::component_type)+
+ (signed)sizeof(typename base_type::component_type)+
base_type::blue_bits)) |
(shiftRight(blue,
base_type::blue_shift-8*
- sizeof(typename base_type::component_type)+
+ (signed)sizeof(typename base_type::component_type)+
2*base_type::blue_bits)) );
return res;
}
@@ -189,15 +192,15 @@ template< typename PixelType,
typename base_type::unsigned_pixel_type res(
(shiftLeft(red,
base_type::red_shift-8*
- sizeof(typename base_type::component_type)+
+ (signed)sizeof(typename base_type::component_type)+
base_type::red_bits) & RedMask) |
(shiftLeft(green,
base_type::green_shift-8*
- sizeof(typename base_type::component_type)+
+ (signed)sizeof(typename base_type::component_type)+
base_type::green_bits) & GreenMask) |
(shiftLeft(blue,
base_type::blue_shift-8*
- sizeof(typename base_type::component_type)+
+ (signed)sizeof(typename base_type::component_type)+
base_type::blue_bits) & BlueMask) );
return SwapBytes ? byteSwap(res) : res;