LibreOffice Module vcl (master) 1
qt5/QtSvpSurface.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
16class QtSvpGraphics;
17class OutputDevice;
18
19namespace cairo
20{
21class QtSvpSurface final : public Surface
22{
26
27public:
31 explicit QtSvpSurface(const QtSvpGraphics* pGraphics, int x, int y, int width, int height);
32 ~QtSvpSurface() override;
33
34 // Surface interface
35 CairoSharedPtr getCairo() const override;
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: */
struct _cairo cairo_t
Definition: CairoCommon.hxx:71
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
cairo_t *const m_pCairoContext
QtSvpSurface(const QtSvpGraphics *pGraphics, int x, int y, int width, int height)
create surface on subarea of given drawable
SurfaceSharedPtr getSimilar(int nContentType, int width, int height) const override
CairoSurfaceSharedPtr getCairoSurface() const override
const QtSvpGraphics * m_pGraphics
CairoSurfaceSharedPtr m_pSurface
QtSvpSurface(CairoSurfaceSharedPtr pSurface)
takes over ownership of passed cairo_surface
void flush() const override
Flush all pending output to surface.
VclPtr< VirtualDevice > createVirtualDevice() const override
factory for VirDev on this surface
CairoSharedPtr getCairo() const override
~QtSvpSurface() override
std::shared_ptr< Surface > SurfaceSharedPtr
Definition: cairo.hxx:36
std::shared_ptr< cairo_t > CairoSharedPtr
Definition: cairo.hxx:35
std::shared_ptr< cairo_surface_t > CairoSurfaceSharedPtr
Definition: cairo.hxx:34
Cairo surface interface.
Definition: cairo.hxx:45