LibreOffice Module vcl (master) 1
svpvd.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
21#define INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
22
23#include <salvd.hxx>
24#include <vcl/salgtype.hxx>
26
27#include <vector>
28
29class SvpSalGraphics;
30typedef struct _cairo_surface cairo_surface_t;
31
33{
36 bool m_bOwnsSurface; // nearly always true, except for edge case of tdf#127529
38 std::vector< SvpSalGraphics* > m_aGraphics;
39
40 bool CreateSurface(tools::Long nNewDX, tools::Long nNewDY, sal_uInt8 *const pBuffer);
41
42protected:
44
45public:
46 SvpSalVirtualDevice(cairo_surface_t* pRefSurface, cairo_surface_t* pPreExistingTarget);
47 virtual ~SvpSalVirtualDevice() override;
48
49 // SalVirtualDevice
50 virtual SalGraphics* AcquireGraphics() override;
51 virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
52
53 virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) override;
54 virtual bool SetSizeUsingBuffer( tools::Long nNewDX, tools::Long nNewDY,
55 sal_uInt8 * pBuffer
56 ) override;
57
58 cairo_surface_t* GetSurface() const { return m_pSurface; }
59
60 // SalGeometryProvider
61 virtual tools::Long GetWidth() const override;
62 virtual tools::Long GetHeight() const override;
63};
64
65#endif // INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
66
67/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _cairo_surface cairo_surface_t
Definition: CairoCommon.hxx:46
A non-visible drawable/buffer (e.g. an X11 Pixmap).
Definition: salvd.hxx:30
virtual tools::Long GetHeight() const override
virtual void ReleaseGraphics(SalGraphics *pGraphics) override
virtual ~SvpSalVirtualDevice() override
SvpSalGraphics * AddGraphics(SvpSalGraphics *aGraphics)
cairo_surface_t * m_pSurface
Definition: svpvd.hxx:35
basegfx::B2IVector m_aFrameSize
Definition: svpvd.hxx:37
virtual SalGraphics * AcquireGraphics() override
std::vector< SvpSalGraphics * > m_aGraphics
Definition: svpvd.hxx:38
cairo_surface_t * m_pRefSurface
Definition: svpvd.hxx:34
SvpSalVirtualDevice(cairo_surface_t *pRefSurface, cairo_surface_t *pPreExistingTarget)
bool CreateSurface(tools::Long nNewDX, tools::Long nNewDY, sal_uInt8 *const pBuffer)
virtual bool SetSizeUsingBuffer(tools::Long nNewDX, tools::Long nNewDY, sal_uInt8 *pBuffer) override
virtual tools::Long GetWidth() const override
virtual bool SetSize(tools::Long nNewDX, tools::Long nNewDY) override
cairo_surface_t * GetSurface() const
Definition: svpvd.hxx:58
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
long Long
unsigned char sal_uInt8