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 Gtk3Surface
: public Surface
23 const GtkSalGraphics
* mpGraphics
;
25 CairoSurfaceSharedPtr mpSurface
;
27 /// takes over ownership of passed cairo_surface
28 explicit Gtk3Surface(CairoSurfaceSharedPtr pSurface
);
29 /// create surface on subarea of given drawable
30 explicit Gtk3Surface(const GtkSalGraphics
* pGraphics
, int x
, int y
, int width
, int height
);
33 virtual CairoSharedPtr
getCairo() const override
;
34 virtual CairoSurfaceSharedPtr
getCairoSurface() const override
{ return mpSurface
; }
35 virtual SurfaceSharedPtr
getSimilar(int nContentType
, int width
, int height
) const override
;
37 virtual VclPtr
<VirtualDevice
> createVirtualDevice() const override
;
39 virtual void flush() const override
;
41 virtual ~Gtk3Surface() override
;
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */