LibreOffice Module canvas (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
canvas::CachedPrimitiveBase Class Referenceabstract

Base class, providing common functionality for implementers of the XCachedPrimitive interface. More...

#include <cachedprimitivebase.hxx>

Inheritance diagram for canvas::CachedPrimitiveBase:
[legend]
Collaboration diagram for canvas::CachedPrimitiveBase:
[legend]

Public Member Functions

 CachedPrimitiveBase (css::rendering::ViewState rUsedViewState, css::uno::Reference< css::rendering::XCanvas > xTarget)
 Create an XCachedPrimitive for given target canvas. More...
 
virtual void disposing (std::unique_lock< std::mutex > &rGuard) override
 Dispose all internal references. More...
 
virtual ::sal_Int8 SAL_CALL redraw (const css::rendering::ViewState &aState) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
- Public Member Functions inherited from comphelper::WeakComponentImplHelper< typename... Ifc >
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual void SAL_CALL dispose () noexcept final override
 
virtual void SAL_CALL addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override
 
virtual void SAL_CALL removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
- Public Member Functions inherited from comphelper::WeakComponentImplHelperBase
virtual ~WeakComponentImplHelperBase () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override
 
virtual void SAL_CALL removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) override
 
virtual void disposing (std::unique_lock< std::mutex > &)
 
- Public Member Functions inherited from comphelper::UnoImplBase
virtual ~UnoImplBase ()
 

Protected Member Functions

virtual ~CachedPrimitiveBase () override
 
- Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase
void throwIfDisposed (std::unique_lock< std::mutex > &)
 

Private Member Functions

 CachedPrimitiveBase (const CachedPrimitiveBase &)=delete
 
CachedPrimitiveBaseoperator= (const CachedPrimitiveBase &)=delete
 
virtual ::sal_Int8 doRedraw (const css::rendering::ViewState &rNewState, const css::rendering::ViewState &rOldState, const css::uno::Reference< css::rendering::XCanvas > &rTargetCanvas, bool bSameViewTransform)=0
 Actually perform the requested redraw. More...
 

Private Attributes

css::rendering::ViewState maUsedViewState
 
css::uno::Reference< css::rendering::XCanvas > mxTarget
 

Additional Inherited Members

- Protected Attributes inherited from comphelper::WeakComponentImplHelperBase
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > maEventListeners
 
- Protected Attributes inherited from comphelper::UnoImplBase
std::mutex m_aMutex
 
bool m_bDisposed
 

Detailed Description

Base class, providing common functionality for implementers of the XCachedPrimitive interface.

Definition at line 42 of file cachedprimitivebase.hxx.

Constructor & Destructor Documentation

◆ CachedPrimitiveBase() [1/2]

canvas::CachedPrimitiveBase::CachedPrimitiveBase ( css::rendering::ViewState  rUsedViewState,
css::uno::Reference< css::rendering::XCanvas >  xTarget 
)

Create an XCachedPrimitive for given target canvas.

Parameters
rUsedViewStateThe viewstate the original object was rendered with
rTargetThe target canvas the repaint should happen on.

References getImplementationName(), getSupportedServiceNames(), and supportsService().

◆ ~CachedPrimitiveBase()

canvas::CachedPrimitiveBase::~CachedPrimitiveBase ( )
overrideprotectedvirtual

Definition at line 42 of file cachedprimitivebase.cxx.

◆ CachedPrimitiveBase() [2/2]

canvas::CachedPrimitiveBase::CachedPrimitiveBase ( const CachedPrimitiveBase )
privatedelete

Member Function Documentation

◆ disposing()

void canvas::CachedPrimitiveBase::disposing ( std::unique_lock< std::mutex > &  rGuard)
overridevirtual

Dispose all internal references.

Reimplemented from comphelper::WeakComponentImplHelperBase.

Reimplemented in cairocanvas::CachedBitmap, and vclcanvas::CachedBitmap.

Definition at line 46 of file cachedprimitivebase.cxx.

◆ doRedraw()

virtual ::sal_Int8 canvas::CachedPrimitiveBase::doRedraw ( const css::rendering::ViewState rNewState,
const css::rendering::ViewState rOldState,
const css::uno::Reference< css::rendering::XCanvas > &  rTargetCanvas,
bool  bSameViewTransform 
)
privatepure virtual

Actually perform the requested redraw.

Clients must override this method, instead of the public redraw() one.

Parameters
rNewStateThe viewstate to redraw with
rOldStateThe viewstate this cache object was created with.
rTargetCanvasTarget canvas to render to.
bSameViewTransformWhen true, rNewState and rOldState have the same transformation.

Implemented in cairocanvas::CachedBitmap, and vclcanvas::CachedBitmap.

◆ getImplementationName()

OUString SAL_CALL canvas::CachedPrimitiveBase::getImplementationName ( )
overridevirtual

Definition at line 77 of file cachedprimitivebase.cxx.

◆ getSupportedServiceNames()

uno::Sequence< OUString > SAL_CALL canvas::CachedPrimitiveBase::getSupportedServiceNames ( )
overridevirtual

Definition at line 87 of file cachedprimitivebase.cxx.

◆ operator=()

CachedPrimitiveBase & canvas::CachedPrimitiveBase::operator= ( const CachedPrimitiveBase )
privatedelete

◆ redraw()

sal_Int8 SAL_CALL canvas::CachedPrimitiveBase::redraw ( const css::rendering::ViewState aState)
override

Definition at line 52 of file cachedprimitivebase.cxx.

◆ supportsService()

sal_Bool SAL_CALL canvas::CachedPrimitiveBase::supportsService ( const OUString &  ServiceName)
overridevirtual

Definition at line 82 of file cachedprimitivebase.cxx.

References ServiceName, and cppu::supportsService().

Member Data Documentation

◆ maUsedViewState

css::rendering::ViewState canvas::CachedPrimitiveBase::maUsedViewState
private

Definition at line 98 of file cachedprimitivebase.hxx.

◆ mxTarget

css::uno::Reference< css::rendering::XCanvas > canvas::CachedPrimitiveBase::mxTarget
private

Definition at line 99 of file cachedprimitivebase.hxx.


The documentation for this class was generated from the following files: