Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / cppcanvas / source / uno / uno_mtfrenderer.hxx
blobafd9e82a8676408c2c2887f4eb5d29a710f23d44
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef _UNO_MTF_RENDERER_HXX_
11 #define _UNO_MTF_RENDERER_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
24 public:
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&);
28 // XMtfRenderer iface
29 void SAL_CALL setMetafile (const ::com::sun::star::uno::Sequence< sal_Int8 >& rMtf) throw (::com::sun::star::uno::RuntimeException);
30 void SAL_CALL draw (double fScaleX, double fScaleY) throw (::com::sun::star::uno::RuntimeException);
32 // XFastPropertySet
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) { 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);
37 private:
38 GDIMetaFile* mpMetafile;
39 com::sun::star::uno::Reference<com::sun::star::rendering::XBitmapCanvas> mxCanvas;
42 #endif
44 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */