LibreOffice Module vcl (master)  1
svpbmp.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_SVPBMP_HXX
21 #define INCLUDED_VCL_INC_HEADLESS_SVPBMP_HXX
22 
23 #include <sal/config.h>
24 
25 #include <salbmp.hxx>
26 
28 {
29  std::unique_ptr<BitmapBuffer> mpDIB;
30 public:
31  virtual ~SvpSalBitmap() override;
32 
33  // SalBitmap
34  virtual bool Create( const Size& rSize,
35  sal_uInt16 nBitCount,
36  const BitmapPalette& rPal ) override;
37  virtual bool Create( const SalBitmap& rSalBmp ) override;
38  virtual bool Create( const SalBitmap& rSalBmp,
39  SalGraphics* pGraphics ) override;
40  virtual bool Create( const SalBitmap& rSalBmp,
41  sal_uInt16 nNewBitCount ) override;
42  virtual bool Create( const css::uno::Reference< css::rendering::XBitmapCanvas >& rBitmapCanvas,
43  Size& rSize,
44  bool bMask = false ) override;
45  void Create(std::unique_ptr<BitmapBuffer> pBuf);
46  const BitmapBuffer* GetBuffer() const
47  {
48  return mpDIB.get();
49  }
50  virtual void Destroy() final override;
51  virtual Size GetSize() const override;
52  virtual sal_uInt16 GetBitCount() const override;
53 
54  virtual BitmapBuffer* AcquireBuffer( BitmapAccessMode nMode ) override;
55  virtual void ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode ) override;
56  virtual bool GetSystemData( BitmapSystemData& rData ) override;
57 
58  virtual bool ScalingSupported() const override;
59  virtual bool Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) override;
60  virtual bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uInt8 nTol ) override;
61 };
62 
63 #endif // INCLUDED_VCL_INC_HEADLESS_SVPBMP_HXX
64 
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
std::unique_ptr< BitmapBuffer > mpDIB
Definition: svpbmp.hxx:29
virtual bool Create(const Size &rSize, sal_uInt16 nBitCount, const BitmapPalette &rPal)=0
virtual void Destroy()=0
BitmapAccessMode
BmpScaleFlag
Definition: bitmap.hxx:48
unsigned char sal_uInt8
const BitmapBuffer * GetBuffer() const
Definition: svpbmp.hxx:46