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 #include <sal/config.h>
11 #include <sal/log.hxx>
13 #include <config_cairo_canvas.h>
15 #include <Qt5SvpGraphics.hxx>
16 #include <Qt5SvpSurface.hxx>
18 #include <QtWidgets/QWidget>
20 Qt5SvpGraphics::Qt5SvpGraphics(QWidget
* pQWidget
)
22 , m_pQWidget(pQWidget
)
26 Qt5SvpGraphics::~Qt5SvpGraphics() {}
28 void Qt5SvpGraphics::updateQWidget() const
31 m_pQWidget
->update(m_pQWidget
->rect());
34 #if ENABLE_CAIRO_CANVAS
36 bool Qt5SvpGraphics::SupportsCairo() const { return true; }
38 cairo::SurfaceSharedPtr
39 Qt5SvpGraphics::CreateSurface(const cairo::CairoSurfaceSharedPtr
& rSurface
) const
41 return cairo::SurfaceSharedPtr(new cairo::Qt5SvpSurface(rSurface
));
44 cairo::SurfaceSharedPtr
Qt5SvpGraphics::CreateSurface(const OutputDevice
& /*rRefDevice*/, int x
,
45 int y
, int width
, int height
) const
47 return cairo::SurfaceSharedPtr(new cairo::Qt5SvpSurface(this, x
, y
, width
, height
));
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */