1 #ifndef _UNO_MTF_RENDERER_HXX_
2 #define _UNO_MTF_RENDERER_HXX_
3 #include <com/sun/star/rendering/MtfRenderer.hpp>
4 #include <com/sun/star/rendering/XBitmapCanvas.hpp>
5 #include <com/sun/star/uno/XComponentContext.hpp>
6 #include <com/sun/star/beans/XFastPropertySet.hpp>
7 #include <cppuhelper/compbase2.hxx>
8 #include <cppuhelper/basemutex.hxx>
9 #include <vcl/gdimtf.hxx>
11 typedef cppu::WeakComponentImplHelper2
<com::sun::star::rendering::XMtfRenderer
, com::sun::star::beans::XFastPropertySet
> MtfRendererBase
;
13 class MtfRenderer
: private cppu::BaseMutex
, public MtfRendererBase
16 MtfRenderer (com::sun::star::uno::Sequence
<com::sun::star::uno::Any
> const& args
,
17 com::sun::star::uno::Reference
<com::sun::star::uno::XComponentContext
> const&);
20 void SAL_CALL
setMetafile (const ::com::sun::star::uno::Sequence
< sal_Int8
>& rMtf
) throw (::com::sun::star::uno::RuntimeException
);
21 void SAL_CALL
draw (double fScaleX
, double fScaleY
) throw (::com::sun::star::uno::RuntimeException
);
24 // setFastPropertyValue (0, GDIMetaFile*) is used to speedup the rendering
25 virtual ::com::sun::star::uno::Any SAL_CALL
getFastPropertyValue(sal_Int32 nHandle
) throw (::com::sun::star::uno::RuntimeException
) { return ::com::sun::star::uno::Any(); }
26 virtual void SAL_CALL
setFastPropertyValue(sal_Int32 nHandle
, const ::com::sun::star::uno::Any
&) throw (::com::sun::star::uno::RuntimeException
);
29 GDIMetaFile
* mpMetafile
;
30 com::sun::star::uno::Reference
<com::sun::star::rendering::XBitmapCanvas
> mxCanvas
;