42 rendering::XGraphicDevice& rDevice,
46 mpBackBuffer = std::make_shared<BitmapBackBuffer>( rBitmap, rOutDevReference->getOutDev() );
69 return geometry::IntegerSize2D();
85 "disposed CanvasHelper" );
87 SAL_INFO(
"canvas.vcl",
"::vclcanvas::CanvasBitmapHelper::getScaledBitmap()" );
90 return uno::Reference< rendering::XBitmap >();
95 beFast ? BmpScaleFlag::Default : BmpScaleFlag::BestQuality );
97 return uno::Reference< rendering::XBitmap >(
102 const geometry::IntegerRectangle2D& rect )
104 SAL_INFO(
"canvas.vcl",
"::vclcanvas::CanvasBitmapHelper::getData()" );
107 return uno::Sequence< sal_Int8 >();
114 rLayout.ScanLines = aBmpSize.
Height();
115 rLayout.ScanLineBytes = aBmpSize.
Width()*4;
116 rLayout.ScanLineStride = rLayout.ScanLineBytes;
123 const geometry::IntegerPoint2D& pos )
125 SAL_INFO(
"canvas.vcl",
"::vclcanvas::CanvasBitmapHelper::getPixel()" );
128 return uno::Sequence< sal_Int8 >();
131 rLayout.ScanLines = 1;
132 rLayout.ScanLineBytes = 4;
133 rLayout.ScanLineStride = rLayout.ScanLineBytes;
138 "X coordinate out of bounds" );
140 "Y coordinate out of bounds" );
144 uno::Sequence< sal_Int8 > aRes( 4 );
146 pRes[ 0 ] = aColor.
GetRed();
157 return rendering::IntegerBitmapLayout();
163 return aBitmapLayout;
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
sal_uInt8 GetBlue() const
sal_uInt8 GetAlpha() const
sal_uInt8 GetGreen() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
OutDevProviderSharedPtr mpOutDevReference
css::uno::Sequence< sal_Int8 > getData(css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerRectangle2D &rect)
css::geometry::IntegerSize2D getSize() const
BitmapEx getBitmap() const
css::uno::Sequence< sal_Int8 > getPixel(css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerPoint2D &pos)
void init(const BitmapEx &rBitmap, css::rendering::XGraphicDevice &rDevice, const OutDevProviderSharedPtr &rOutDevProvider)
Set a new bitmap on this helper.
css::uno::Reference< css::rendering::XBitmap > getScaledBitmap(const css::geometry::RealSize2D &newSize, bool beFast)
css::rendering::IntegerBitmapLayout getMemoryLayout() const
BitmapBackBufferSharedPtr mpBackBuffer
css::rendering::XGraphicDevice * mpDevice
Phyical output device.
void disposing()
Release all references.
void init(css::rendering::XGraphicDevice &rDevice, const OutDevProviderSharedPtr &rOutDev, bool bProtect, bool bHaveAlpha)
Initialize canvas helper.
OutDevProviderSharedPtr mpOutDevProvider
Rendering to this outdev does not preserve its state.
#define ENSURE_OR_THROW(c, m)
#define ENSURE_ARG_OR_THROW(c, m)
#define SAL_INFO(area, stream)
uno::Sequence< sal_Int8 > CanvasExtractBitmapData(BitmapEx const &rBitmapEx, const geometry::IntegerRectangle2D &rect)
std::shared_ptr< OutDevProvider > OutDevProviderSharedPtr