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 #ifndef INCLUDED_CANVAS_SOURCE_CAIRO_CAIRO_GTK3_CAIRO_HXX
11 #define INCLUDED_CANVAS_SOURCE_CAIRO_CAIRO_GTK3_CAIRO_HXX
13 #include <sal/config.h>
15 #include <sal/types.h>
17 #include <vcl/cairo.hxx>
24 class Gtk3Surface
: public Surface
26 const GtkSalGraphics
* mpGraphics
;
28 CairoSurfaceSharedPtr mpSurface
;
30 /// takes over ownership of passed cairo_surface
31 explicit Gtk3Surface(const CairoSurfaceSharedPtr
& pSurface
);
32 /// create surface on subarea of given drawable
33 explicit Gtk3Surface(const GtkSalGraphics
* pGraphics
, int x
, int y
, int width
, int height
);
36 virtual CairoSharedPtr
getCairo() const override
;
37 virtual CairoSurfaceSharedPtr
getCairoSurface() const override
{ return mpSurface
; }
38 virtual SurfaceSharedPtr
getSimilar(int nContentType
, int width
, int height
) const override
;
40 virtual VclPtr
<VirtualDevice
> createVirtualDevice() const override
;
42 virtual void flush() const override
;
44 virtual ~Gtk3Surface() override
;
51 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */