From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. Signed-off-by: Daniel Baumann --- cppcanvas/source/uno/uno_mtfrenderer.hxx | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 cppcanvas/source/uno/uno_mtfrenderer.hxx (limited to 'cppcanvas/source/uno/uno_mtfrenderer.hxx') diff --git a/cppcanvas/source/uno/uno_mtfrenderer.hxx b/cppcanvas/source/uno/uno_mtfrenderer.hxx new file mode 100644 index 000000000..6cb720a31 --- /dev/null +++ b/cppcanvas/source/uno/uno_mtfrenderer.hxx @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_CPPCANVAS_SOURCE_UNO_UNO_MTFRENDERER_HXX +#define INCLUDED_CPPCANVAS_SOURCE_UNO_UNO_MTFRENDERER_HXX +#include +#include +#include +#include +#include +#include +#include + +typedef cppu::WeakComponentImplHelper MtfRendererBase; + +class MtfRenderer : private cppu::BaseMutex, public MtfRendererBase +{ +public: + MtfRenderer (css::uno::Sequence const& args, + css::uno::Reference const&); + + // XMtfRenderer iface + void SAL_CALL setMetafile (const css::uno::Sequence< sal_Int8 >& rMtf) override; + void SAL_CALL draw (double fScaleX, double fScaleY) override; + + // XFastPropertySet + // setFastPropertyValue (0, GDIMetaFile*) is used to speedup the rendering + virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 /*nHandle*/) override { return css::uno::Any(); } + virtual void SAL_CALL setFastPropertyValue(sal_Int32 nHandle, const css::uno::Any&) override; + +private: + GDIMetaFile* mpMetafile; + css::uno::Reference mxCanvas; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3