Branch libreoffice-5-0-4
[LibreOffice.git] / vcl / inc / headless / svpvd.hxx
blob255de3a6792344c95d22400eab5e8ff5befad6da
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
21 #define INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
23 #include <salvd.hxx>
25 #include <list>
27 class SvpSalGraphics;
29 class VCL_DLLPUBLIC SvpSalVirtualDevice : public SalVirtualDevice
31 sal_uInt16 m_nBitCount;
32 basebmp::BitmapDeviceSharedPtr m_aDevice;
33 std::list< SvpSalGraphics* > m_aGraphics;
35 public:
36 SvpSalVirtualDevice( sal_uInt16 nBitCount ) : m_nBitCount(nBitCount) {}
37 virtual ~SvpSalVirtualDevice();
39 // SalVirtualDevice
40 virtual SalGraphics* AcquireGraphics() SAL_OVERRIDE;
41 virtual void ReleaseGraphics( SalGraphics* pGraphics ) SAL_OVERRIDE;
43 virtual bool SetSize( long nNewDX, long nNewDY ) SAL_OVERRIDE;
44 virtual bool SetSizeUsingBuffer( long nNewDX, long nNewDY,
45 const basebmp::RawMemorySharedArray &pBuffer,
46 const bool bTopDown
47 ) SAL_OVERRIDE;
49 basebmp::BitmapDeviceSharedPtr getBitmapDevice() { return m_aDevice; }
51 // SalGeometryProvider
52 virtual long GetWidth() const SAL_OVERRIDE { return m_aDevice.get() ? m_aDevice->getSize().getX() : 0; }
53 virtual long GetHeight() const SAL_OVERRIDE { return m_aDevice.get() ? m_aDevice->getSize().getY() : 0; }
56 #endif // INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */