1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef INCLUDED_CPPCANVAS_SOURCE_UNO_UNO_MTFRENDERER_HXX
11 #define INCLUDED_CPPCANVAS_SOURCE_UNO_UNO_MTFRENDERER_HXX
12 #include <com/sun/star/rendering/MtfRenderer.hpp>
13 #include <com/sun/star/rendering/XBitmapCanvas.hpp>
14 #include <com/sun/star/uno/XComponentContext.hpp>
15 #include <com/sun/star/beans/XFastPropertySet.hpp>
16 #include <cppuhelper/compbase2.hxx>
17 #include <cppuhelper/basemutex.hxx>
18 #include <vcl/gdimtf.hxx>
20 typedef cppu::WeakComponentImplHelper2
<com::sun::star::rendering::XMtfRenderer
, com::sun::star::beans::XFastPropertySet
> MtfRendererBase
;
22 class MtfRenderer
: private cppu::BaseMutex
, public MtfRendererBase
25 MtfRenderer (com::sun::star::uno::Sequence
<com::sun::star::uno::Any
> const& args
,
26 com::sun::star::uno::Reference
<com::sun::star::uno::XComponentContext
> const&);
29 void SAL_CALL
setMetafile (const ::com::sun::star::uno::Sequence
< sal_Int8
>& rMtf
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
30 void SAL_CALL
draw (double fScaleX
, double fScaleY
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
33 // setFastPropertyValue (0, GDIMetaFile*) is used to speedup the rendering
34 virtual ::com::sun::star::uno::Any SAL_CALL
getFastPropertyValue(sal_Int32
/*nHandle*/) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
{ return ::com::sun::star::uno::Any(); }
35 virtual void SAL_CALL
setFastPropertyValue(sal_Int32 nHandle
, const ::com::sun::star::uno::Any
&) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
38 GDIMetaFile
* mpMetafile
;
39 com::sun::star::uno::Reference
<com::sun::star::rendering::XBitmapCanvas
> mxCanvas
;
44 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */