LibreOffice Module vcl (master) 1
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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 .
18 */
20#pragma once
22#include <salbmp.hxx>
24#include <memory>
26class QImage;
28class QtBitmap final : public SalBitmap
30 std::unique_ptr<QImage> m_pImage;
35 QtBitmap(const QImage& rQImage);
37 const QImage* GetQImage() const { return m_pImage.get(); }
39 virtual bool Create(const Size& rSize, vcl::PixelFormat ePixelFormat,
40 const BitmapPalette& rPal) override;
41 virtual bool Create(const SalBitmap& rSalBmp) override;
42 virtual bool Create(const SalBitmap& rSalBmp, SalGraphics* pGraphics) override;
43 virtual bool Create(const SalBitmap& rSalBmp, vcl::PixelFormat eNewPixelFormat) override;
44 virtual bool Create(const css::uno::Reference<css::rendering::XBitmapCanvas>& rBitmapCanvas,
45 Size& rSize, bool bMask = false) override;
46 virtual void Destroy() final override;
47 virtual Size GetSize() const override;
48 virtual sal_uInt16 GetBitCount() const override;
51 virtual void ReleaseBuffer(BitmapBuffer* pBuffer, BitmapAccessMode nMode) override;
52 virtual bool GetSystemData(BitmapSystemData& rData) override;
54 virtual bool ScalingSupported() const override;
55 virtual bool Scale(const double& rScaleX, const double& rScaleY,
56 BmpScaleFlag nScaleFlag) override;
57 virtual bool Replace(const Color& rSearchColor, const Color& rReplaceColor,
58 sal_uInt8 nTol) override;
61/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool Create(const SalBitmap &rSalBmp, vcl::PixelFormat eNewPixelFormat) override
virtual void Destroy() final override
virtual BitmapBuffer * AcquireBuffer(BitmapAccessMode nMode) override
virtual bool Scale(const double &rScaleX, const double &rScaleY, BmpScaleFlag nScaleFlag) override
virtual bool GetSystemData(BitmapSystemData &rData) override
virtual bool Replace(const Color &rSearchColor, const Color &rReplaceColor, sal_uInt8 nTol) override
virtual bool Create(const css::uno::Reference< css::rendering::XBitmapCanvas > &rBitmapCanvas, Size &rSize, bool bMask=false) override
virtual sal_uInt16 GetBitCount() const override
BitmapPalette m_aPalette
virtual bool Create(const SalBitmap &rSalBmp, SalGraphics *pGraphics) override
virtual Size GetSize() const override
virtual bool Create(const Size &rSize, vcl::PixelFormat ePixelFormat, const BitmapPalette &rPal) override
QtBitmap(const QImage &rQImage)
virtual bool ScalingSupported() const override
virtual bool Create(const SalBitmap &rSalBmp) override
std::unique_ptr< QImage > m_pImage
virtual void ReleaseBuffer(BitmapBuffer *pBuffer, BitmapAccessMode nMode) override
const QImage * GetQImage() const
Pixel format of the bitmap in bits per pixel.
Definition: BitmapTypes.hxx:20
unsigned char sal_uInt8