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 .
28 class VCL_DLLPUBLIC Qt5Bitmap
: public SalBitmap
30 std::unique_ptr
<QImage
> m_pImage
;
31 BitmapPalette m_aPalette
;
34 std::unique_ptr
<sal_uInt8
> m_pBuffer
;
36 sal_uInt32 m_nScanline
;
40 Qt5Bitmap(const QImage
& rQImage
);
41 virtual ~Qt5Bitmap() override
;
43 const QImage
* GetQImage() const { return m_pImage
.get(); }
45 virtual bool Create(const Size
& rSize
, sal_uInt16 nBitCount
,
46 const BitmapPalette
& rPal
) override
;
47 virtual bool Create(const SalBitmap
& rSalBmp
) override
;
48 virtual bool Create(const SalBitmap
& rSalBmp
, SalGraphics
* pGraphics
) override
;
49 virtual bool Create(const SalBitmap
& rSalBmp
, sal_uInt16 nNewBitCount
) override
;
50 virtual bool Create(const css::uno::Reference
<css::rendering::XBitmapCanvas
>& rBitmapCanvas
,
51 Size
& rSize
, bool bMask
= false) override
;
52 virtual void Destroy() final override
;
53 virtual Size
GetSize() const override
;
54 virtual sal_uInt16
GetBitCount() const override
;
56 virtual BitmapBuffer
* AcquireBuffer(BitmapAccessMode nMode
) override
;
57 virtual void ReleaseBuffer(BitmapBuffer
* pBuffer
, BitmapAccessMode nMode
) override
;
58 virtual bool GetSystemData(BitmapSystemData
& rData
) override
;
60 virtual bool ScalingSupported() const override
;
61 virtual bool Scale(const double& rScaleX
, const double& rScaleY
,
62 BmpScaleFlag nScaleFlag
) override
;
63 virtual bool Replace(const Color
& rSearchColor
, const Color
& rReplaceColor
,
64 sal_uInt8 nTol
) override
;
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */