|
| CanvasBase () |
| Create CanvasBase. More...
|
|
virtual void | disposeThis () override |
|
virtual void SAL_CALL | clear () override |
|
virtual void SAL_CALL | drawPoint (const css::geometry::RealPoint2D &aPoint, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState) override |
|
virtual void SAL_CALL | drawLine (const css::geometry::RealPoint2D &aStartPoint, const css::geometry::RealPoint2D &aEndPoint, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState) override |
|
virtual void SAL_CALL | drawBezier (const css::geometry::RealBezierSegment2D &aBezierSegment, const css::geometry::RealPoint2D &aEndPoint, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | drawPolyPolygon (const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | strokePolyPolygon (const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::rendering::StrokeAttributes &strokeAttributes) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | strokeTexturedPolyPolygon (const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::uno::Sequence< css::rendering::Texture > &textures, const css::rendering::StrokeAttributes &strokeAttributes) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | strokeTextureMappedPolyPolygon (const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::uno::Sequence< css::rendering::Texture > &textures, const css::uno::Reference< css::geometry::XMapping2D > &xMapping, const css::rendering::StrokeAttributes &strokeAttributes) override |
|
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL | queryStrokeShapes (const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::rendering::StrokeAttributes &strokeAttributes) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | fillPolyPolygon (const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | fillTexturedPolyPolygon (const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::uno::Sequence< css::rendering::Texture > &textures) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | fillTextureMappedPolyPolygon (const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::uno::Sequence< css::rendering::Texture > &textures, const css::uno::Reference< css::geometry::XMapping2D > &xMapping) override |
|
virtual css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL | createFont (const css::rendering::FontRequest &fontRequest, const css::uno::Sequence< css::beans::PropertyValue > &extraFontProperties, const css::geometry::Matrix2D &fontMatrix) override |
|
virtual css::uno::Sequence< css::rendering::FontInfo > SAL_CALL | queryAvailableFonts (const css::rendering::FontInfo &aFilter, const css::uno::Sequence< css::beans::PropertyValue > &aFontProperties) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | drawText (const css::rendering::StringContext &text, const css::uno::Reference< css::rendering::XCanvasFont > &xFont, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, sal_Int8 textDirection) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | drawTextLayout (const css::uno::Reference< css::rendering::XTextLayout > &laidOutText, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | drawBitmap (const css::uno::Reference< css::rendering::XBitmap > &xBitmap, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState) override |
|
virtual css::uno::Reference< css::rendering::XCachedPrimitive > SAL_CALL | drawBitmapModulated (const css::uno::Reference< css::rendering::XBitmap > &xBitmap, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState) override |
|
virtual css::uno::Reference< css::rendering::XGraphicDevice > SAL_CALL | getDevice () override |
|
template<class
Base, class CanvasHelper, class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
class canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >
Helper template to handle XCanvas method forwarding to CanvasHelper.
Use this helper to handle the XCanvas part of your implementation. In theory, we could have provided CanvasHelper and CanvasBase as a single template, but that would duplicate a lot of code now residing in CanvasHelper only.
This template basically interposes itself between the full interface you implement (i.e. not restricted to XCanvas. The problem with UNO partial interface implementation actually is, that you cannot do it the plain way, since deriving from a common base subclass always introduces the whole set of pure virtuals, that your baseclass helper just overridden) and your implementation class. You then only have to implement the functionality besides XCanvas.
Example:
typedef ::cppu::WeakComponentImplHelper < css::rendering::XSpriteCanvas,
css::lang::XInitialization,
css::lang::XServiceInfo,
css::lang::XServiceName > CanvasBase_Base;
typedef ::canvas::internal::CanvasBase< CanvasBase_Base, CanvasHelper > ExampleCanvas_Base;
class ExampleCanvas : public ExampleCanvas_Base,
public SpriteSurface,
public RepaintTarget
{
};
- Template parameter: \n Base
- Base class to use, most probably the WeakComponentImplHelper template with the appropriate interfaces. At least XCanvas should be among them (why else would you use this template, then?). Base class must have an Base( const Mutex& ) constructor (like the WeakComponentImplHelper template has). As the very least, the base class must be derived from uno::XInterface, as some error reporting mechanisms rely on that.
- Template parameter: \n CanvasHelper
- Canvas helper implementation for the backend in question. This object will be held as a member of this template class, and basically gets forwarded all XCanvas API calls. Furthermore, every time the canvas API semantically changes the content of the canvas, CanvasHelper::modifying() will get called (before the actual modification takes place).
- Template parameter: \n Mutex
- Lock strategy to use. Defaults to using the BaseMutex-provided lock. Every time one of the methods is entered, an object of type Mutex is created with m_aMutex as the sole parameter, and destroyed again when the method scope is left.
- Template parameter: \n UnambiguousBase
- Optional unambiguous base class for XInterface of Base. It's sometimes necessary to specify this parameter, e.g. if Base derives from multiple UNO interface (were each provides its own version of XInterface, making the conversion ambiguous)
Definition at line 107 of file canvasbase.hxx.