20#ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_VIEWSHAPE_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_VIEWSHAPE_HXX
49 template<>
struct typed_flags<
UpdateFlags> : is_typed_flags<UpdateFlags, 0x3f> {};
140 const ::basegfx::B2DRectangle& rUpdateBounds,
141 const ::basegfx::B2DRectangle& rBounds,
142 const ::basegfx::B2DRectangle& rUnitBounds,
191 bool bIsVisible )
const;
236 const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
245 bool draw( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
248 const ::basegfx::B2DHomMatrix& rTransform,
249 const ::basegfx::B2DPolyPolygon* pClip,
256 const ::basegfx::B2DRectangle& rOrigBounds,
257 const ::basegfx::B2DRectangle& rBounds,
258 const ::basegfx::B2DRectangle& rUnitBounds,
263 bool bIsVisible )
const;
267 bool render( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
269 const ::basegfx::B2DRectangle& rBounds,
270 const ::basegfx::B2DRectangle& rUpdateBounds,
274 bool bIsVisible )
const;
290 RendererCacheVector::iterator
getCacheEntry( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas )
const;
This class is the viewable representation of a draw document's XShape, associated to a specific View.
ViewShape & operator=(const ViewShape &)=delete
Forbid copy assignment.
bool update(const GDIMetaFileSharedPtr &rMtf, const RenderArgs &rArgs, UpdateFlags nUpdateFlags, bool bIsVisible) const
Update the ViewShape.
::cppcanvas::RendererSharedPtr getRenderer(const ::cppcanvas::CanvasSharedPtr &rDestinationCanvas, const GDIMetaFileSharedPtr &rMtf, const ShapeAttributeLayerSharedPtr &rAttr) const
Retrieve renderer for given canvas and metafile.
::basegfx::B2DSize getAntialiasingBorder() const
Query dimension of a safety border around the shape for AA.
@ MAX_RENDER_CACHE_ENTRIES
bool render(const ::cppcanvas::CanvasSharedPtr &rDestinationCanvas, const GDIMetaFileSharedPtr &rMtf, const ::basegfx::B2DRectangle &rBounds, const ::basegfx::B2DRectangle &rUpdateBounds, UpdateFlags nUpdateFlags, const ShapeAttributeLayerSharedPtr &pAttr, const VectorOfDocTreeNodes &rSubsets, bool bIsVisible) const
Render shape to given canvas.
RendererCacheVector maRenderers
A set of cached mtf/canvas combinations.
bool renderSprite(const ViewLayerSharedPtr &rViewLayer, const GDIMetaFileSharedPtr &rMtf, const ::basegfx::B2DRectangle &rOrigBounds, const ::basegfx::B2DRectangle &rBounds, const ::basegfx::B2DRectangle &rUnitBounds, UpdateFlags nUpdateFlags, const ShapeAttributeLayerSharedPtr &pAttr, const VectorOfDocTreeNodes &rSubsets, double nPrio, bool bIsVisible) const
Render shape to an active sprite.
const ViewLayerSharedPtr & getViewLayer() const
Query the associated view layer of this shape.
void enterAnimationMode()
Notify the ViewShape that an animation starts now.
AnimatedSpriteSharedPtr mpSprite
The sprite object.
bool mbAnimationMode
If true, render() calls go to the sprite.
bool draw(const ::cppcanvas::CanvasSharedPtr &rDestinationCanvas, const GDIMetaFileSharedPtr &rMtf, const ShapeAttributeLayerSharedPtr &rAttr, const ::basegfx::B2DHomMatrix &rTransform, const ::basegfx::B2DPolyPolygon *pClip, const VectorOfDocTreeNodes &rSubsets) const
Draw with prefetched Renderer to stored canvas.
static bool prefetch(RendererCacheEntry &io_rCacheEntry, const ::cppcanvas::CanvasSharedPtr &rDestinationCanvas, const GDIMetaFileSharedPtr &rMtf, const ShapeAttributeLayerSharedPtr &rAttr)
Prefetch Renderer for given canvas.
RendererCacheVector::iterator getCacheEntry(const ::cppcanvas::CanvasSharedPtr &rDestinationCanvas) const
Retrieve a valid iterator to renderer cache entry.
ViewShape(const ViewShape &)=delete
Forbid copy construction.
ViewLayerSharedPtr mpViewLayer
The view layer this object is part of.
void leaveAnimationMode()
Notify the ViewShape that it is no longer animated.
::std::vector< RendererCacheEntry > RendererCacheVector
ViewShape(ViewLayerSharedPtr xViewLayer)
Create a ViewShape for the given View.
bool mbForceUpdate
If true, shape needs full repaint (and the sprite a setup, if any)
void invalidateRenderer() const
std::shared_ptr< ::cppcanvas::Renderer > RendererSharedPtr
std::shared_ptr< BitmapCanvas > BitmapCanvasSharedPtr
std::shared_ptr< ::cppcanvas::Bitmap > BitmapSharedPtr
std::shared_ptr< Canvas > CanvasSharedPtr
::std::shared_ptr< ViewShape > ViewShapeSharedPtr
::std::shared_ptr< ShapeAttributeLayer > ShapeAttributeLayerSharedPtr
::std::vector< DocTreeNode > VectorOfDocTreeNodes
std::shared_ptr< ViewLayer > ViewLayerSharedPtr
::std::shared_ptr< AnimatedSprite > AnimatedSpriteSharedPtr
std::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr
const double mnShapePriority
const ::basegfx::B2DRectangle maUpdateBounds
RenderArgs(const ::basegfx::B2DRectangle &rOrigBounds, const ::basegfx::B2DRectangle &rUpdateBounds, const ::basegfx::B2DRectangle &rBounds, const ::basegfx::B2DRectangle &rUnitBounds, const ShapeAttributeLayerSharedPtr &rAttr, const VectorOfDocTreeNodes &rSubsets, double nPrio)
Create render argument struct.
const ::basegfx::B2DRectangle maOrigBounds
const ::basegfx::B2DRectangle maBounds
const VectorOfDocTreeNodes & mrSubsets
const ::basegfx::B2DRectangle maUnitBounds
const ShapeAttributeLayerSharedPtr & mrAttr
::cppcanvas::RendererSharedPtr mpRenderer
GDIMetaFileSharedPtr mpMtf
::cppcanvas::BitmapCanvasSharedPtr mpLastBitmapCanvas
::cppcanvas::BitmapSharedPtr mpLastBitmap
const ::cppcanvas::CanvasSharedPtr & getDestinationCanvas() const
::cppcanvas::CanvasSharedPtr mpDestinationCanvas