diff options
author | Rüdiger Timm <rt@openoffice.org> | 2007-11-09 09:14:27 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2007-11-09 09:14:27 +0000 |
commit | 24d3f09e0fe891b351207ebd3383a1e5dee168bc (patch) | |
tree | 3ca1bc5eff287b87fe7868b6ab70b90fd3beedd0 /canvas | |
parent | 921c7b49a5d6be44cec8ff63099822e04b765034 (diff) |
INTEGRATION: CWS transogl01 (1.9.42); FILE MERGED
2007/07/25 15:05:05 thb 1.9.42.2: RESYNC: (1.9-1.10); FILE MERGED
2007/07/20 15:33:41 radekdoulik 1.9.42.1: Issue number: 78745
return memory layout from getData methods
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/vcl/canvasbitmaphelper.cxx | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx index 0d16bc97af49..9d9892543972 100644 --- a/canvas/source/vcl/canvasbitmaphelper.cxx +++ b/canvas/source/vcl/canvasbitmaphelper.cxx @@ -4,9 +4,9 @@ * * $RCSfile: canvasbitmaphelper.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: obo $ $Date: 2007-07-17 14:25:12 $ + * last change: $Author: rt $ $Date: 2007-11-09 10:14:27 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -137,7 +137,7 @@ namespace vclcanvas new CanvasBitmap( aRes, mpDevice ) ); } - uno::Sequence< sal_Int8 > CanvasBitmapHelper::getData( rendering::IntegerBitmapLayout& , + uno::Sequence< sal_Int8 > CanvasBitmapHelper::getData( rendering::IntegerBitmapLayout& aLayout, const geometry::IntegerRectangle2D& rect ) { RTL_LOGFILE_CONTEXT( aLog, "::vclcanvas::CanvasBitmapHelper::getData()" ); @@ -145,6 +145,24 @@ namespace vclcanvas if( !mpBackBuffer ) return uno::Sequence< sal_Int8 >(); // we're disposed + const sal_Int32 nWidth( rect.X2 - rect.X1 ); + const sal_Int32 nHeight( rect.Y2 - rect.Y1 ); + aLayout.ScanLines = nHeight; + aLayout.ScanLineBytes = nWidth*4; + aLayout.ScanLineStride = aLayout.ScanLineBytes; + aLayout.PlaneStride = 0; + aLayout.ColorSpace.set( mpDevice ); + aLayout.NumComponents = 4; + aLayout.ComponentMasks.realloc(4); + aLayout.ComponentMasks[0] = 0x00FF0000; + aLayout.ComponentMasks[1] = 0x0000FF00; + aLayout.ComponentMasks[2] = 0x000000FF; + aLayout.ComponentMasks[3] = 0xFF000000; + aLayout.Palette.clear(); + aLayout.Endianness = rendering::Endianness::LITTLE; + aLayout.Format = rendering::IntegerBitmapFormat::CHUNKY_32BIT; + aLayout.IsMsbFirst = sal_False; + Bitmap aBitmap( mpBackBuffer->getBitmapReference().GetBitmap() ); Bitmap aAlpha( mpBackBuffer->getBitmapReference().GetAlpha().GetBitmap() ); |