20#ifndef INCLUDED_VCL_INC_SALBMP_HXX
21#define INCLUDED_VCL_INC_SALBMP_HXX
29#include <com/sun/star/rendering/XBitmapCanvas.hpp>
32#if defined MACOSX || defined IOS
34#include <CoreGraphics/CoreGraphics.h>
57 , mbChecksumValid(false)
71 virtual bool Create(
const css::uno::Reference< css::rendering::XBitmapCanvas >& rBitmapCanvas,
73 bool bMask =
false ) = 0;
83 virtual bool Scale(
const double& rScaleX,
const double& rScaleY,
BmpScaleFlag nScaleFlag ) = 0;
84 void DropScaledCache();
112#if defined MACOSX || defined IOS
126 virtual CGImageRef CreateWithMask(
const SalBitmap&,
int,
int,
int,
int )
const {
return nullptr; }
127 virtual CGImageRef CreateColorMask(
int,
int,
int,
int,
Color )
const {
return nullptr; }
128 virtual CGImageRef CreateCroppedImage(
int,
int,
int,
int )
const {
return nullptr; }
134 if (!mbChecksumValid)
141 mbChecksumValid =
false;
145 void updateChecksum()
const;
154 static std::unique_ptr< sal_uInt8[] > convertDataBitCount(
const sal_uInt8* src,
155 int width,
int height,
int bitCount,
int bytesPerRow,
const BitmapPalette& palette,
169 return std::shared_ptr<T>();
172 template<
class T,
class... Args>
177 return std::shared_ptr<T>();
179 std::shared_ptr<T> r = std::make_shared<T>(std::forward<Args>(
args)...);
182 if(r->calculateCombinedHoldCyclesInSeconds() > 0)
sal_uInt64 BitmapChecksum
virtual bool Erase(const Color &)
BitmapChecksum mnChecksum
std::shared_ptr< T > getSystemDependentData() const
virtual bool Scale(const double &rScaleX, const double &rScaleY, BmpScaleFlag nScaleFlag)=0
virtual sal_uInt16 GetBitCount() const =0
virtual bool ConvertToGreyscale()
virtual bool InterpretAs8Bit()
virtual bool Replace(const Color &rSearchColor, const Color &rReplaceColor, sal_uInt8 nTol)=0
virtual void ReleaseBuffer(BitmapBuffer *pBuffer, BitmapAccessMode nMode)=0
virtual bool AlphaBlendWith(const SalBitmap &)
virtual bool GetSystemData(BitmapSystemData &rData)=0
virtual Size GetSize() const =0
virtual bool Create(const SalBitmap &rSalBmp)=0
void InvalidateChecksum()
std::shared_ptr< T > addOrReplaceSystemDependentData(Args &&... args) const
virtual BitmapBuffer * AcquireBuffer(BitmapAccessMode nMode)=0
BitmapChecksum GetChecksum() const
virtual bool ScalingSupported() const =0
virtual bool Create(const css::uno::Reference< css::rendering::XBitmapCanvas > &rBitmapCanvas, Size &rSize, bool bMask=false)=0
virtual bool Create(const Size &rSize, vcl::PixelFormat ePixelFormat, const BitmapPalette &rPal)=0
virtual bool Create(const SalBitmap &rSalBmp, SalGraphics *pGraphics)=0
virtual bool Create(const SalBitmap &rSalBmp, vcl::PixelFormat eNewPixelFormat)=0
SystemDependentData_SharedPtr getSystemDependentData(size_t hash_code) const
#define VCL_PLUGIN_PUBLIC
std::shared_ptr< SystemDependentData > SystemDependentData_SharedPtr
PixelFormat
Pixel format of the bitmap in bits per pixel.
const sal_uLong nVCLLut[256]
const sal_uLong nVCLBLut[6]
const sal_uLong nVCLGLut[6]
const sal_uLong nVCLRLut[6]
const sal_uLong nVCLDitherLut[256]