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/.
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_SVPBMP_HXX
21 #define INCLUDED_VCL_INC_HEADLESS_SVPBMP_HXX
23 #include <sal/config.h>
26 #include <basegfx/utils/systemdependentdata.hxx>
29 class VCL_DLLPUBLIC SvpSalBitmap final
: public SalBitmap
, public basegfx::SystemDependentDataHolder
// MM02
31 std::optional
<BitmapBuffer
> moDIB
;
34 virtual ~SvpSalBitmap() override
;
36 SAL_DLLPRIVATE
bool ImplCreate(const Size
& rSize
,
37 vcl::PixelFormat ePixelFormat
,
38 const BitmapPalette
& rPalette
,
42 SAL_DLLPRIVATE
virtual bool Create(const Size
& rSize
,
43 vcl::PixelFormat ePixelFormat
,
44 const BitmapPalette
& rPalette
) override
;
45 SAL_DLLPRIVATE
virtual bool Create( const SalBitmap
& rSalBmp
) override
;
46 SAL_DLLPRIVATE
virtual bool Create( const SalBitmap
& rSalBmp
,
47 SalGraphics
* pGraphics
) override
;
48 SAL_DLLPRIVATE
virtual bool Create(const SalBitmap
& rSalBmp
,
49 vcl::PixelFormat eNewPixelFormat
) override
;
50 SAL_DLLPRIVATE
virtual bool Create( const css::uno::Reference
< css::rendering::XBitmapCanvas
>& rBitmapCanvas
,
52 bool bMask
= false ) override
;
53 SAL_DLLPRIVATE
void Create(const std::optional
<BitmapBuffer
> & pBuf
);
54 const BitmapBuffer
* GetBuffer() const
56 return moDIB
? &*moDIB
: nullptr;
58 SAL_DLLPRIVATE
virtual void Destroy() final override
;
59 SAL_DLLPRIVATE
virtual Size
GetSize() const override
;
60 SAL_DLLPRIVATE
virtual sal_uInt16
GetBitCount() const override
;
62 SAL_DLLPRIVATE
virtual BitmapBuffer
* AcquireBuffer( BitmapAccessMode nMode
) override
;
63 SAL_DLLPRIVATE
virtual void ReleaseBuffer( BitmapBuffer
* pBuffer
, BitmapAccessMode nMode
) override
;
64 SAL_DLLPRIVATE
virtual bool GetSystemData( BitmapSystemData
& rData
) override
;
66 SAL_DLLPRIVATE
virtual bool ScalingSupported() const override
;
67 SAL_DLLPRIVATE
virtual bool Scale( const double& rScaleX
, const double& rScaleY
, BmpScaleFlag nScaleFlag
) override
;
68 SAL_DLLPRIVATE
virtual bool Replace( const Color
& rSearchColor
, const Color
& rReplaceColor
, sal_uInt8 nTol
) override
;
70 SAL_DLLPRIVATE
virtual const basegfx::SystemDependentDataHolder
* accessSystemDependentDataHolder() const override
;
73 #endif // INCLUDED_VCL_INC_HEADLESS_SVPBMP_HXX
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */