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/.
12 #include <sal/config.h>
14 #include <vcl/cairo.hxx>
21 class Qt5SvpSurface final
: public Surface
23 const Qt5SvpGraphics
* m_pGraphics
;
24 cairo_t
* const m_pCairoContext
;
25 CairoSurfaceSharedPtr m_pSurface
;
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
;
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: */