37 rendering::XGraphicDevice& rDevice,
38 const ::canvas::SpriteSurface::Reference& rOwningSpriteCanvas,
40 bool bShowSpriteBounds )
44 "CanvasCustomSprite::CanvasCustomSprite(): Invalid sprite canvas" );
50 static_cast<sal_Int32
>(
std::max( 1.0,
51 ceil( rSpriteSize.Width ))),
54 static_cast<sal_Int32
>(
std::max( 1.0,
55 ceil( rSpriteSize.Height ))) );
58 BackBufferSharedPtr pBackBuffer = std::make_shared<BackBuffer>( rOutDevProvider->getOutDev() );
59 pBackBuffer->setSize( aSize );
62 BackBufferSharedPtr pBackBufferMask = std::make_shared<BackBuffer>( rOutDevProvider->getOutDev() );
63 pBackBufferMask->setSize( aSize );
69 pBackBuffer->getOutDev().SetAntialiasing( AntialiasingFlags::DisableText );
70 pBackBufferMask->getOutDev().SetAntialiasing( AntialiasingFlags::DisableText );
75 pBackBufferMask->getOutDev().SetDrawMode( DrawModeFlags::BlackLine | DrawModeFlags::BlackFill | DrawModeFlags::BlackText |
76 DrawModeFlags::BlackGradient | DrawModeFlags::BlackBitmap );
106 return "VCLCanvas.CanvasCustomSprite";
116 return {
"com.sun.star.rendering.CanvasCustomSprite" };
121 bool bBufferedUpdate )
const
129 const ::basegfx::B2DPoint& rOrigOutputPos,
130 bool bBufferedUpdate )
const
143 const rendering::ViewState& viewState,
144 const rendering::RenderState& renderState,
153 return maCanvasHelper.repaint( rGrf, viewState, renderState, rPt, rSz, rAttr );
CanvasHelper maCanvasHelper
SpriteHelper maSpriteHelper
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
virtual void redraw(OutputDevice &rOutDev, bool bBufferedUpdate) const override
virtual bool repaint(const GraphicObjectSharedPtr &rGrf, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const ::Point &rPt, const ::Size &rSz, const GraphicAttr &rAttr) const override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
CanvasCustomSprite(const css::geometry::RealSize2D &rSpriteSize, css::rendering::XGraphicDevice &rDevice, const ::canvas::SpriteSurface::Reference &rOwningSpriteCanvas, const OutDevProviderSharedPtr &rOutDevProvider, bool bShowSpriteBounds)
#define ENSURE_OR_THROW(c, m)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
std::shared_ptr< OutDevProvider > OutDevProviderSharedPtr
std::shared_ptr< GraphicObject > GraphicObjectSharedPtr
std::shared_ptr< BackBuffer > BackBufferSharedPtr