diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-25 12:59:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-25 14:56:25 +0000 |
commit | 4b06c351bd573b81b1b4f4ff3df0fd5d8e68e28c (patch) | |
tree | 59df01f2f683cb4b5a13fecb7737b6cc9979baf9 /include | |
parent | 923a8604aa631dbfb9c62f8fa9bef71dc8addcef (diff) |
give basebmp a cairo compatible 24 bit surface
where each unit is actually 32bit with unused upper 8bit.
Change-Id: I5c406cebe406d2db6fda73d744dfd22a99b80ba3
Diffstat (limited to 'include')
-rw-r--r-- | include/basebmp/rgbmaskpixelformats.hxx | 13 | ||||
-rw-r--r-- | include/basebmp/scanlineformats.hxx | 6 |
2 files changed, 18 insertions, 1 deletions
diff --git a/include/basebmp/rgbmaskpixelformats.hxx b/include/basebmp/rgbmaskpixelformats.hxx index 696f35aac846..eaee275554c2 100644 --- a/include/basebmp/rgbmaskpixelformats.hxx +++ b/include/basebmp/rgbmaskpixelformats.hxx @@ -334,6 +334,19 @@ typedef PixelFormatTraitsTemplate_RGBMask< BASEBMP_SPECIALIZE_ACCESSORTRAITS(PixelFormatTraits_RGBX32_8888::getter_type, PixelFormatTraits_RGBX32_8888::setter_type); +// The following hybrid 24bits used out of 32bit was added for Cairo needs + +typedef PixelFormatTraitsTemplate_RGBMask< + sal_uInt32, + 0x00000000, + 0x00FF0000, + 0x0000FF00, + 0x000000FF, + BASEBMP_TRUECOLORMASK_LSB_SWAP > PixelFormatTraits_BGRU32_8888; +BASEBMP_SPECIALIZE_ACCESSORTRAITS(PixelFormatTraits_BGRU32_8888::getter_type, + PixelFormatTraits_BGRU32_8888::setter_type); + + } // namespace basebmp #endif /* INCLUDED_BASEBMP_RGBMASKPIXELFORMATS_HXX */ diff --git a/include/basebmp/scanlineformats.hxx b/include/basebmp/scanlineformats.hxx index a5a88aa5d19c..80278792241a 100644 --- a/include/basebmp/scanlineformats.hxx +++ b/include/basebmp/scanlineformats.hxx @@ -42,8 +42,12 @@ enum Format FORMAT_SIXTEEN_BIT_LSB_TC_MASK, FORMAT_SIXTEEN_BIT_MSB_TC_MASK, FORMAT_TWENTYFOUR_BIT_TC_MASK, + // CAIRO_FORMAT_RGB24, each pixel is a 32-bit quantity, with the upper 8 + // bits unused. Red, Green, and Blue are stored in the remaining 24 bits in + // that order (below U is for unused) + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRU, // The order of the channels code letters indicates the order of the - // channel bytes in memory, I think + // channel bytes in memory FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA, FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB, FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR, |