LibreOffice Module vcl (master)  1
Qt5SvpSurface.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  */
9 
10 #pragma once
11 
12 #include <sal/config.h>
13 
14 #include <vcl/cairo.hxx>
15 
16 class Qt5SvpGraphics;
17 class OutputDevice;
18 
19 namespace cairo
20 {
21 class Qt5SvpSurface : public Surface
22 {
26 
27 public:
29  explicit Qt5SvpSurface(const CairoSurfaceSharedPtr& pSurface);
31  explicit Qt5SvpSurface(const Qt5SvpGraphics* pGraphics, int x, int y, int width, int height);
32  ~Qt5SvpSurface() override;
33 
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;
38 
40  void flush() const override;
41 };
42 }
43 
44 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
~Qt5SvpSurface() override
cairo_t *const m_pCairoContext
std::shared_ptr< cairo_t > CairoSharedPtr
Definition: cairo.hxx:35
Qt5SvpSurface(const CairoSurfaceSharedPtr &pSurface)
takes over ownership of passed cairo_surface
CairoSharedPtr getCairo() const override
std::shared_ptr< Surface > SurfaceSharedPtr
Definition: cairo.hxx:36
void flush() const override
Flush all pending output to surface.
const Qt5SvpGraphics * m_pGraphics
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
std::shared_ptr< cairo_surface_t > CairoSurfaceSharedPtr
Definition: cairo.hxx:34
struct _cairo cairo_t
Definition: svpgdi.hxx:69
CairoSurfaceSharedPtr m_pSurface
Cairo surface interface.
Definition: cairo.hxx:44
CairoSurfaceSharedPtr getCairoSurface() const override
SurfaceSharedPtr getSimilar(int nContentType, int width, int height) const override
VclPtr< VirtualDevice > createVirtualDevice() const override
factory for VirDev on this surface