bump product version to 7.2.5.1
[LibreOffice.git] / vcl / inc / qt5 / Qt5SvpSurface.hxx
blob0e4da4877c0672171f65a01ec5cfce39ba86803b
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 #pragma once
12 #include <sal/config.h>
14 #include <vcl/cairo.hxx>
16 class Qt5SvpGraphics;
17 class OutputDevice;
19 namespace cairo
21 class Qt5SvpSurface final : public Surface
23 const Qt5SvpGraphics* m_pGraphics;
24 cairo_t* const m_pCairoContext;
25 CairoSurfaceSharedPtr m_pSurface;
27 public:
28 /// takes over ownership of passed cairo_surface
29 explicit Qt5SvpSurface(const CairoSurfaceSharedPtr& pSurface);
30 /// create surface on subarea of given drawable
31 explicit Qt5SvpSurface(const Qt5SvpGraphics* pGraphics, int x, int y, int width, int height);
32 ~Qt5SvpSurface() override;
34 // Surface interface
35 CairoSharedPtr getCairo() const override;
36 CairoSurfaceSharedPtr getCairoSurface() const override { return m_pSurface; }
37 SurfaceSharedPtr getSimilar(int nContentType, int width, int height) const override;
39 VclPtr<VirtualDevice> createVirtualDevice() const override;
40 void flush() const override;
44 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */