44 rendering::XGraphicDevice& rDevice,
48 mpBackBuffer = std::make_shared<BitmapBackBuffer>( rBitmap, rOutDevReference->getOutDev() );
56 rBitmap.IsTransparent() );
71 return geometry::IntegerSize2D();
87 "disposed CanvasHelper" );
89 SAL_INFO(
"canvas.vcl",
"::vclcanvas::CanvasBitmapHelper::getScaledBitmap()" );
92 return uno::Reference< rendering::XBitmap >();
97 beFast ? BmpScaleFlag::Default : BmpScaleFlag::BestQuality );
99 return uno::Reference< rendering::XBitmap >(
104 const geometry::IntegerRectangle2D& rect )
106 SAL_INFO(
"canvas.vcl",
"::vclcanvas::CanvasBitmapHelper::getData()" );
109 return uno::Sequence< sal_Int8 >();
116 rLayout.ScanLines = aBmpSize.
Height();
117 rLayout.ScanLineBytes = aBmpSize.Width()*4;
118 rLayout.ScanLineStride = rLayout.ScanLineBytes;
125 const geometry::IntegerPoint2D& pos )
127 SAL_INFO(
"canvas.vcl",
"::vclcanvas::CanvasBitmapHelper::getPixel()" );
130 return uno::Sequence< sal_Int8 >();
133 rLayout.ScanLines = 1;
134 rLayout.ScanLineBytes = 4;
135 rLayout.ScanLineStride = rLayout.ScanLineBytes;
140 "X coordinate out of bounds" );
142 "Y coordinate out of bounds" );
146 uno::Sequence< sal_Int8 > aRes( 4 );
148 pRes[ 0 ] = aColor.GetRed();
149 pRes[ 1 ] = aColor.GetGreen();
150 pRes[ 2 ] = aColor.GetBlue();
151 pRes[ 3 ] = 255 - aColor.GetAlpha();
159 return rendering::IntegerBitmapLayout();
165 return aBitmapLayout;
std::shared_ptr< OutDevProvider > OutDevProviderSharedPtr
css::uno::Sequence< sal_Int8 > getPixel(css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerPoint2D &pos)
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
BitmapBackBufferSharedPtr mpBackBuffer
void init(css::rendering::XGraphicDevice &rDevice, const OutDevProviderSharedPtr &rOutDev, bool bProtect, bool bHaveAlpha)
Initialize canvas helper.
void disposing()
Release all references.
OutDevProviderSharedPtr mpOutDevProvider
Rendering to this outdev does not preserve its state.
css::rendering::XGraphicDevice * mpDevice
Phyical output device.
BitmapEx getBitmap() const
css::geometry::IntegerSize2D getSize() const
void init(const BitmapEx &rBitmap, css::rendering::XGraphicDevice &rDevice, const OutDevProviderSharedPtr &rOutDevProvider)
Set a new bitmap on this helper.
OutDevProviderSharedPtr mpOutDevReference
uno::Sequence< sal_Int8 > CanvasExtractBitmapData(BitmapEx const &rBitmapEx, const geometry::IntegerRectangle2D &rect)
css::uno::Sequence< sal_Int8 > getData(css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerRectangle2D &rect)
#define ENSURE_ARG_OR_THROW(c, m)
#define ENSURE_OR_THROW(c, m)
css::uno::Reference< css::rendering::XBitmap > getScaledBitmap(const css::geometry::RealSize2D &newSize, bool beFast)
#define SAL_INFO(area, stream)
tools::Long Height() const
css::rendering::IntegerBitmapLayout getMemoryLayout() const