LibreOffice Module cppcanvas (master) 1
|
Base class providing cached re-rendering, if XCanvas returns XCachedPrimitive. More...
#include <cachedprimitivebase.hxx>
Public Member Functions | |
CachedPrimitiveBase (CanvasSharedPtr xCanvas, bool bOnlyRedrawWithSameTransform) | |
Constructor. More... | |
CachedPrimitiveBase (const CachedPrimitiveBase &)=delete | |
const CachedPrimitiveBase & | operator= (const CachedPrimitiveBase &)=delete |
virtual bool | render (const ::basegfx::B2DHomMatrix &rTransformation) const override |
Render this action to the associated canvas. More... | |
Public Member Functions inherited from cppcanvas::internal::Action | |
virtual | ~Action () |
virtual bool | render (const ::basegfx::B2DHomMatrix &rTransformation) const =0 |
Render this action to the associated canvas. More... | |
virtual bool | renderSubset (const ::basegfx::B2DHomMatrix &rTransformation, const Subset &rSubset) const =0 |
Render the given part of the action to the associated canvas. More... | |
virtual ::basegfx::B2DRange | getBounds (const ::basegfx::B2DHomMatrix &rTransformation) const =0 |
Query bounds of this action on the associated canvas. More... | |
virtual ::basegfx::B2DRange | getBounds (const ::basegfx::B2DHomMatrix &rTransformation, const Subset &rSubset) const =0 |
Query bounds for the given part of the action on the associated canvas. More... | |
virtual sal_Int32 | getActionCount () const =0 |
Query action count. More... | |
Protected Member Functions | |
virtual bool | render (const ::basegfx::B2DHomMatrix &rTransformation) const=0 |
Render this action to the associated canvas. More... | |
Private Member Functions | |
virtual bool | renderPrimitive (css::uno::Reference< css::rendering::XCachedPrimitive > &rCachedPrimitive, const ::basegfx::B2DHomMatrix &rTransformation) const =0 |
Private Attributes | |
CanvasSharedPtr | mpCanvas |
css::uno::Reference< css::rendering::XCachedPrimitive > | mxCachedPrimitive |
mutable::basegfx::B2DHomMatrix | maLastTransformation |
const bool | mbOnlyRedrawWithSameTransform |
Base class providing cached re-rendering, if XCanvas returns XCachedPrimitive.
Derive from this class and implement private render() method to perform the actual primitive rendering. Return cached primitive into given reference. Next time this class' public render() method gets called, the cached representation is taken.
Definition at line 46 of file cachedprimitivebase.hxx.
cppcanvas::internal::CachedPrimitiveBase::CachedPrimitiveBase | ( | CanvasSharedPtr | xCanvas, |
bool | bOnlyRedrawWithSameTransform | ||
) |
Constructor.
rCanvas | Canvas on which this primitive is to appear |
bOnlyRedrawWithSameTransform | When true, this class only reuses the cached primitive, if the overall transformation stays the same. Otherwise, repaints are always performed via the cached primitive. |
Definition at line 35 of file cachedprimitivebase.cxx.
|
delete |
|
delete |
|
overridevirtual |
Render this action to the associated canvas.
rTransformation | Transformation matrix to apply before rendering |
Implements cppcanvas::internal::Action.
Definition at line 44 of file cachedprimitivebase.cxx.
References maLastTransformation, mbOnlyRedrawWithSameTransform, mpCanvas, mxCachedPrimitive, renderPrimitive(), and SAL_INFO.
|
protectedvirtual |
Render this action to the associated canvas.
rTransformation | Transformation matrix to apply before rendering |
Implements cppcanvas::internal::Action.
|
privatepure virtual |
Referenced by render().
|
private |
Definition at line 77 of file cachedprimitivebase.hxx.
Referenced by render().
|
private |
Definition at line 78 of file cachedprimitivebase.hxx.
Referenced by render().
|
private |
Definition at line 75 of file cachedprimitivebase.hxx.
Referenced by render().
|
mutableprivate |
Definition at line 76 of file cachedprimitivebase.hxx.
Referenced by render().