21#include <rtl/math.hxx>
23#include <osl/diagnose.h>
47#include <com/sun/star/beans/XFastPropertySet.hpp>
71 CopyPixel( aDestRect, aSrcRect, &rBitmapEx );
100 SAL_WARN_IF( !bSuccess,
"vcl",
"BitmapEx::BitmapEx(): could not load image " << rIconName <<
" via icon theme " << aIconTheme);
105 maBitmapSize ( maBitmap.GetSizePixel() )
111 maBitmapSize ( maBitmap.GetSizePixel() )
127 SAL_WARN(
"vcl",
"BitmapEx: forced mask to monochrome");
135 OSL_ENSURE(
false,
"Mask size differs from Bitmap size, corrected Mask (!)");
142 maAlphaMask ( rAlphaMask.ImplGetBitmap() ),
143 maBitmapSize ( maBitmap.GetSizePixel() )
147 OSL_ENSURE(
false,
"Alpha size differs from Bitmap size, corrected Mask (!)");
155 maBitmapSize ( maBitmap.GetSizePixel() )
160 "BitmapEx::BitmapEx(): size mismatch for bitmap and alpha mask.");
285 "BitmapEx::Scale(): size mismatch for bitmap and alpha mask." );
343 "BitmapEx::Rotate(): size mismatch for bitmap and alpha mask.");
363 "BitmapEx::Crop(): size mismatch for bitmap and alpha mask.");
392 "BitmapEx::Expand(): size mismatch for bitmap and alpha mask.");
400 if( !pBmpExSrc || pBmpExSrc->
IsEmpty() )
426 std::optional<AlphaMask> pAlpha(std::in_place,
GetSizePixel(), &cBlack);
477 maBitmap.
Replace( pSearchColors, pReplaceColors, nColorCount,
nullptr );
481 short nChannelRPercent,
short nChannelGPercent,
short nChannelBPercent,
482 double fGamma,
bool bInvert,
bool msoBrightness )
485 nChannelRPercent, nChannelGPercent, nChannelBPercent,
486 fGamma, bInvert, msoBrightness );
495 const Point& rDestPt,
const Size& rDestSize )
const
502 Point aEmptyPoint(0,0);
509 if (imgOldWidth >= aStandardSize || imgOldHeight >= aStandardSize)
511 sal_Int32 imgNewWidth = 0;
512 sal_Int32 imgNewHeight = 0;
513 if (imgOldWidth >= imgOldHeight)
515 imgNewWidth = aStandardSize;
516 imgNewHeight = sal_Int32(imgOldHeight / (imgOldWidth / aStandardSize) + 0.5);
518 imgposY = (aStandardSize - (imgOldHeight / (imgOldWidth / aStandardSize) + 0.5)) / 2 + 0.5;
522 imgNewHeight = aStandardSize;
523 imgNewWidth = sal_Int32(imgOldWidth / (imgOldHeight / aStandardSize) + 0.5);
525 imgposX = (aStandardSize - (imgOldWidth / (imgOldHeight / aStandardSize) + 0.5)) / 2 + 0.5;
528 Size aScaledSize( imgNewWidth, imgNewHeight );
533 imgposX = (aStandardSize - imgOldWidth) / 2 + 0.5;
534 imgposY = (aStandardSize - imgOldHeight) / 2 + 0.5;
537 Size aStdSize( aStandardSize, aStandardSize );
541 aVirDevice->SetOutputSizePixel( aStdSize );
546 aVirDevice->DrawRect( aRect );
548 aVirDevice->DrawBitmapEx( aPointPixel, aRet );
549 aRet = aVirDevice->GetBitmapEx( aEmptyPoint, aStdSize );
579 nAlpha = 255 - aBitmapColor.
GetIndex();
597 aColor.
SetAlpha(255 - pAlphaReadAccess->GetPixel(nY, nX).GetIndex());
608bool BitmapEx::Create(
const css::uno::Reference< css::rendering::XBitmapCanvas > &xBitmapCanvas,
611 uno::Reference< beans::XFastPropertySet > xFastPropertySet( xBitmapCanvas, uno::UNO_QUERY );
612 if( xFastPropertySet )
615 uno::Any aAny = xFastPropertySet->getFastPropertyValue( 0 );
616 std::unique_ptr<BitmapEx> xBitmapEx(
reinterpret_cast<BitmapEx*
>(*o3tl::doAccess<sal_Int64>(aAny)));
624 std::shared_ptr<SalBitmap> pSalBmp;
625 std::shared_ptr<SalBitmap> pSalMask;
629 Size aLocalSize(rSize);
630 if( pSalBmp->Create( xBitmapCanvas, aLocalSize ) )
633 if ( pSalMask->Create( xBitmapCanvas, aLocalSize,
true ) )
650 Bitmap impTransformBitmap(
652 const Size& rDestinationSize,
665 const Size aDestinationSizePixel(aDestination.GetSizePixel());
670 Scanline pScanline = xWrite->GetScanline( y );
677 xWrite->SetPixelOnData(
680 xRead->GetInterpolatedColorWithFallback(
689 xWrite->SetPixelOnData(
692 xRead->GetColorWithFallback(
712 double fRotate, fShearX;
713 rTransformation.
decompose(aScale, aTranslate, fRotate, fShearX);
719 fRotate = fmod( fRotate, 2 * M_PI );
724 if (!rtl::math::approxEqual(fRotate, 0)
725 && !rtl::math::approxEqual(fRotate, M_PI_2)
726 && !rtl::math::approxEqual(fRotate, M_PI)
727 && !rtl::math::approxEqual(fRotate, 3 * M_PI_2))
732 if (!rtl::math::approxEqual(fShearX, 0))
746 if(fWidth <= 1 || fHeight <= 1)
751 bool bSmooth = implTransformNeedsSmooth(rTransformation);
752 const Bitmap aDestination(impTransformBitmap(
GetBitmap(), aDestinationSize, rTransformation, bSmooth));
767 double fMaximumArea)
const
777 if(!nSourceWidth || !nSourceHeight)
783 aOutlineRange.
transform(rTransformation);
794 double fWidth(aVisibleRange.
getWidth());
795 double fHeight(aVisibleRange.
getHeight());
797 if(fWidth < 1.0 || fHeight < 1.0)
803 const double fArea(fWidth * fHeight);
805 double fReduceFactor(1.0);
809 fReduceFactor = sqrt(fMaximumArea / fArea);
810 fWidth *= fReduceFactor;
811 fHeight *= fReduceFactor;
819 1.0 / nSourceHeight));
823 aTransform = rTransformation * aTransform;
833 aTransform.
scale(fReduceFactor, fReduceFactor);
850 for(sal_uInt32
a(rBColorModifierStack.
count());
a && !bDone; )
867 OSL_ENSURE(xReadAccess,
"Got no Bitmap ReadAccess ?!?");
895 const double fConvertColor(1.0 / 255.0);
897 if(xContent->HasPalette())
899 const sal_uInt16
nCount(xContent->GetPaletteEntryCount());
901 for(sal_uInt16 b(0); b <
nCount; b++)
903 const BitmapColor& rCol = xContent->GetPaletteColor(b);
905 rCol.
GetRed() * fConvertColor,
907 rCol.
GetBlue() * fConvertColor);
916 Scanline pScan = xContent->GetScanline(
y);
921 *(pScan + 2)* fConvertColor,
922 *(pScan + 1) * fConvertColor,
923 *pScan * fConvertColor);
935 Scanline pScan = xContent->GetScanline(
y);
940 *pScan * fConvertColor,
941 *(pScan + 1) * fConvertColor,
942 *(pScan + 2) * fConvertColor);
954 Scanline pScanline = xContent->GetScanline(
y );
959 static_cast<double>(aBMCol.
GetRed()) * fConvertColor,
960 static_cast<double>(aBMCol.
GetGreen()) * fConvertColor,
961 static_cast<double>(aBMCol.
GetBlue()) * fConvertColor);
993 Color aColorBottomRight)
995 const sal_uInt32 nW(rSize.
Width());
996 const sal_uInt32 nH(rSize.
Height());
1000 Color aColTopRight(aColorTopLeft);
1001 Color aColBottomLeft(aColorTopLeft);
1002 const sal_uInt32 nDE(nW + nH);
1004 aColTopRight.
Merge(aColorBottomRight, 255 -
sal_uInt8((nW * 255) / nDE));
1005 aColBottomLeft.
Merge(aColorBottomRight, 255 -
sal_uInt8((nH * 255) / nDE));
1007 return createBlendFrame(rSize, nAlpha, aColorTopLeft, aColTopRight, aColorBottomRight, aColBottomLeft);
1016 Color aColorTopLeft,
1017 Color aColorTopRight,
1018 Color aColorBottomRight,
1019 Color aColorBottomLeft)
1044 if(nW > 1 && nH > 1)
1055 if(pContent && pAlpha)
1059 Scanline pScanContent = pContent->GetScanline( 0 );
1060 Scanline pScanAlpha = pContent->GetScanline( 0 );
1063 pContent->SetPixelOnData(pScanContent, 0, aColorTopLeft);
1064 pAlpha->SetPixelOnData(pScanAlpha, 0,
BitmapColor(nAlpha));
1067 for(
x = 1;
x < nW - 1;
x++)
1069 Color aMix(aColorTopLeft);
1072 pContent->SetPixelOnData(pScanContent,
x, aMix);
1073 pAlpha->SetPixelOnData(pScanAlpha,
x,
BitmapColor(nAlpha));
1080 pContent->SetPixelOnData(pScanContent,
x, aColorTopRight);
1081 pAlpha->SetPixelOnData(pScanAlpha,
x,
BitmapColor(nAlpha));
1085 for(
y = 1;
y < nH - 1;
y++)
1087 pScanContent = pContent->GetScanline(
y );
1088 pScanAlpha = pContent->GetScanline(
y );
1089 Color aMixA(aColorTopLeft);
1092 pContent->SetPixelOnData(pScanContent, 0, aMixA);
1093 pAlpha->SetPixelOnData(pScanAlpha, 0,
BitmapColor(nAlpha));
1098 Color aMixB(aColorTopRight);
1101 pContent->SetPixelOnData(pScanContent,
x, aMixB);
1102 pAlpha->SetPixelOnData(pScanAlpha,
x,
BitmapColor(nAlpha));
1110 pContent->SetPixelOnData(pScanContent, 0, aColorBottomLeft);
1111 pAlpha->SetPixelOnData(pScanAlpha, 0,
BitmapColor(nAlpha));
1114 for(
x = 1;
x < nW - 1;
x++)
1116 Color aMix(aColorBottomLeft);
1119 pContent->SetPixelOnData(pScanContent,
x, aMix);
1120 pAlpha->SetPixelOnData(pScanAlpha,
x,
BitmapColor(nAlpha));
1127 pContent->SetPixelOnData(pScanContent,
x, aColorBottomRight);
1128 pAlpha->SetPixelOnData(pScanAlpha,
x,
BitmapColor(nAlpha));
1143 const Color& rReplaceColor,
1150 const Color* pReplaceColors,
1154 maBitmap.
Replace( pSearchColors, pReplaceColors, nColorCount, pTols );
1169 constexpr sal_uInt8 cEdgeDetectThreshold = 128;
1172 if( ( aSize.
Width() <= 2 ) || ( aSize.
Height() <= 2 ) )
1181 pVirDev->SetOutputSizePixel(aSize);
1197 pVirDev->DrawLine(
Point(),
Point( nWidth - 1, 0L ) );
1198 pVirDev->DrawLine(
Point( nWidth - 1, 0L ),
Point( nWidth - 1, nHeight - 1 ) );
1199 pVirDev->DrawLine(
Point( nWidth - 1, nHeight - 1 ),
Point( 0L, nHeight - 1 ) );
1200 pVirDev->DrawLine(
Point( 0, nHeight - 1 ),
Point() );
1202 for(
tools::Long nY = 0, nY1 = 1, nY2 = 2; nY < nHeight2; nY++, nY1++, nY2++ )
1207 for(
tools::Long nX = 0, nXDst = 1, nXTmp; nX < nWidth2; nX++, nXDst++ )
1230 if( ( nSum1 * nSum1 + nSum2 * nSum2 ) < lThres2 )
1239 Bitmap aRetBmp = pVirDev->GetBitmap(
Point(0,0), aSize);
1260 if( pWorkRectPixel )
1268 if( bContourEdgeDetect )
1278 if (pAcc && nWidth && nHeight)
1281 const double fFactorX =
static_cast<double>(rPrefSize.
Width()) / nWidth;
1282 const double fFactorY =
static_cast<double>(rPrefSize.
Height()) / nHeight;
1288 std::unique_ptr<Point[]> pPoints1;
1289 std::unique_ptr<Point[]> pPoints2;
1291 sal_uInt16 nPolyPos = 0;
1294 pPoints1.reset(
new Point[ nHeight ]);
1295 pPoints2.reset(
new Point[ nHeight ]);
1297 for ( nY = nStartY1; nY < nEndY1; nY++ )
1303 while( nX < nEndX1 )
1307 pPoints1[ nPolyPos ] =
Point( nX, nY );
1315 pPoints2[ nPolyPos ] =
Point( nX, nY );
1330 const sal_uInt16 nNewSize1 = nPolyPos << 1;
1333 aRetPoly.
SetSize( nNewSize1 + 1 );
1334 aRetPoly[ nNewSize1 ] = aRetPoly[ 0 ];
1336 for( sal_uInt16 j = nPolyPos; nPolyPos < nNewSize1; )
1337 aRetPoly[ nPolyPos++ ] = pPoints2[ --j ];
1339 if( ( fFactorX != 0. ) && ( fFactorY != 0. ) )
1340 aRetPoly.
Scale( fFactorX, fFactorY );
1354 assert( pReadAccess.
get() && pAlphaWriteAccess.
get() );
1355 if ( !(pReadAccess.
get() && pAlphaWriteAccess.
get()) )
1360 Scanline pScanline = pAlphaWriteAccess->GetScanline( nY );
1365 if ( cIndex == cIndexFrom )
1366 pAlphaWriteAccess->SetPixelOnData( pScanline, nX,
BitmapColor(255 - nAlphaTo) );
1390 const tools::Long nWidth = pA->Width(), nHeight = pA->Height();
1396 Scanline pAScan = pA->GetScanline( nY );
1400 nNewTrans = nTrans + *pAScan;
1401 *pAScan++ =
static_cast<sal_uInt8>( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans );
1411 Scanline pScanline = pA->GetScanline( nY );
1414 nNewTrans = nTrans + pA->GetIndexFromData( pScanline, nX );
1415 aAlphaValue.
SetIndex(
static_cast<sal_uInt8>( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans ) );
1416 pA->SetPixelOnData( pScanline, nX, aAlphaValue );
1436 sal_uInt32& rnRedMask, sal_uInt32& rnGreenMask, sal_uInt32& rnBlueMask, sal_uInt32& rnAlphaMask, sal_uInt32& rnTransparencyIndex,
1437 sal_uInt32& rnWidth, sal_uInt32& rnHeight,
sal_uInt8& rnBitCount)
1440 assert( pReadAccess );
1448 rRGBPalette = css::uno::Sequence< sal_Int32 >( nPalCount + 1 );
1450 sal_Int32* pTmp = rRGBPalette.getArray();
1452 for( sal_uInt32
i = 0;
i < nPalCount;
i++, pTmp++ )
1456 *pTmp =
static_cast<sal_Int32
>(rCol.
GetRed()) << sal_Int32(24);
1457 *pTmp |=
static_cast<sal_Int32
>(rCol.
GetGreen()) << sal_Int32(16);
1458 *pTmp |=
static_cast<sal_Int32
>(rCol.
GetBlue()) << sal_Int32(8);
1459 *pTmp |= sal_Int32(0x000000ffL);
1465 *pTmp = sal_Int32(0xffffff00L);
1466 rnTransparencyIndex = nPalCount;
1470 rnTransparencyIndex = 0;
1475 rnRedMask = 0xff000000UL;
1476 rnGreenMask = 0x00ff0000UL;
1477 rnBlueMask = 0x0000ff00UL;
1478 rnAlphaMask = 0x000000ffUL;
1479 rnTransparencyIndex = 0;
1482 rnWidth = pReadAccess->
Width();
1483 rnHeight = pReadAccess->
Height();
1492 sPath = OUString::fromUtf8(pFileName);
1494 else if (
const char* pEnv = std::getenv(
"VCL_DUMP_BMP_PATH"))
1496 sPath = OUString::fromUtf8(pEnv);
1500 sPath =
"file:///tmp/bitmap.png";
1502 SvFileStream aStream(sPath, StreamMode::STD_READWRITE | StreamMode::TRUNC);
1503 assert(aStream.
good());
1505 aWriter.
write(*
this);
static Bitmap DetectEdges(const Bitmap &rBmp)
BitmapEx createBlendFrame(const Size &rSize, sal_uInt8 nAlpha, Color aColorTopLeft, Color aColorBottomRight)
Create a blend frame as BitmapEx.
#define BITMAP_CHECKSUM_SIZE
sal_uInt8 BitmapChecksumOctetArray[BITMAP_CHECKSUM_SIZE]
sal_uInt64 BitmapChecksum
void BCToBCOA(BitmapChecksum n, BitmapChecksumOctetArray p)
BitmapChecksum vcl_get_checksum(BitmapChecksum Checksum, const void *Data, sal_uInt32 DatLen)
const StyleSettings & GetStyleSettings() const
SAL_DLLPRIVATE const Bitmap & ImplGetBitmap() const
void Erase(sal_uInt8 cTransparency)
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
static const AllSettings & GetSettings()
Gets the application's settings.
sal_uInt8 GetIndex() const
void SetIndex(sal_uInt8 cIndex)
tools::Polygon GetContour(bool bContourEdgeDetect, const tools::Rectangle *pWorkRect)
Get contours in image.
bool Invert()
Perform the Invert operation on every pixel.
const AlphaMask & GetAlphaMask() const
sal_Int64 GetSizeBytes() const
BitmapEx & operator=(const BitmapEx &rBitmapEx)
BitmapEx getTransformed(const basegfx::B2DHomMatrix &rTransformation, const basegfx::B2DRange &rVisibleRange, double fMaximumArea) const
Create transformed Bitmap.
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
Scale the bitmap.
void ChangeColorAlpha(sal_uInt8 cIndexFrom, sal_Int8 nAlphaTo)
void ReplaceTransparency(const Color &rColor)
Replace transparency with given color.
static BitmapEx AutoScaleBitmap(BitmapEx const &aBitmap, const tools::Long aStandardSize)
bool Erase(const Color &rFillColor)
Fill the entire bitmap with the given color.
bool Convert(BmpConversion eConversion)
Convert bitmap format.
::Color GetPixelColor(sal_Int32 nX, sal_Int32 nY) const
Get pixel color (including alpha) at given position.
void Expand(sal_Int32 nDX, sal_Int32 nDY, bool bExpandTransparent=false)
Expand the bitmap by pixel padding.
bool Rotate(Degree10 nAngle10, const Color &rFillColor)
Rotate bitmap by the specified angle.
BitmapChecksum GetChecksum() const
BitmapEx TransformBitmapEx(double fWidth, double fHeight, const basegfx::B2DHomMatrix &rTransformation) const
Create transformed Bitmap.
bool CopyPixel(const tools::Rectangle &rRectDst, const tools::Rectangle &rRectSrc, const BitmapEx *pBmpExSrc)
Copy a rectangular area from another bitmap.
bool Mirror(BmpMirrorFlags nMirrorFlags)
Mirror the bitmap.
bool operator==(const BitmapEx &rBitmapEx) const
Bitmap GetBitmap(Color aTransparentReplaceColor) const
sal_uInt8 GetAlpha(sal_Int32 nX, sal_Int32 nY) const
Get alpha at given position.
void Replace(const Color &rSearchColor, const Color &rReplaceColor)
Replace all pixel having the search color with the specified color.
void CombineMaskOr(Color maskColor, sal_uInt8 nTol)
void loadFromIconTheme(const OUString &rIconName)
bool Create(const css::uno::Reference< css::rendering::XBitmapCanvas > &xBitmapCanvas, const Size &rSize)
populate from a canvas implementation
bool Crop(const tools::Rectangle &rRectPixel)
Crop the bitmap.
void AdjustTransparency(sal_uInt8 cTrans)
void Draw(OutputDevice *pOutDev, const Point &rDestPt) const
const Bitmap & GetBitmap() const
Gives direct access to the contained bitmap.
void SetSizePixel(const Size &rNewSize)
bool Adjust(short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, double fGamma=1.0, bool bInvert=false, bool msoBrightness=false)
Change various global color characteristics.
BitmapEx ModifyBitmapEx(const basegfx::BColorModifierStack &rBColorModifierStack) const
Create ColorStack-modified version of this BitmapEx.
const Size & GetSizePixel() const
void GetColorModel(css::uno::Sequence< sal_Int32 > &rRGBPalette, sal_uInt32 &rnRedMask, sal_uInt32 &rnGreenMask, sal_uInt32 &rnBlueMask, sal_uInt32 &rnAlphaMask, sal_uInt32 &rnTransparencyIndex, sal_uInt32 &rnWidth, sal_uInt32 &rnHeight, sal_uInt8 &rnBitCount)
Retrieves the color model data we need for the XImageConsumer stuff.
void DumpAsPng(const char *pFileName=nullptr) const
Dumps the pixels as PNG in bitmap.png.
static bool Filter(BitmapEx &rBmpEx, BitmapFilter const &rFilter)
tools::Long Height() const
tools::Long Width() const
const BitmapPalette & GetPalette() const
BitmapColor GetBestMatchingColor(const BitmapColor &rBitmapColor) const
sal_uInt16 GetPaletteEntryCount() const
sal_uInt16 GetBitCount() const
const BitmapColor & GetPaletteColor(sal_uInt16 nColor) const
BitmapColor GetPixel(tools::Long nY, tools::Long nX) const
BitmapColor GetColor(tools::Long nY, tools::Long nX) const
BitmapColor GetPixelFromData(const sal_uInt8 *pData, tools::Long nX) const
sal_uInt8 GetIndexFromData(const sal_uInt8 *pData, tools::Long nX) const
Scanline GetScanline(tools::Long nY) const
bool CombineOr(const Bitmap &rMask)
Perform boolean OR operation with another bitmap.
sal_Int64 GetSizeBytes() const
void SetPrefMapMode(const MapMode &rMapMode)
bool Rotate(Degree10 nAngle10, const Color &rFillColor)
Rotate bitmap by the specified angle.
bool Crop(const tools::Rectangle &rRectPixel)
Crop the bitmap.
bool HasGreyPalette8Bit() const
Bitmap CreateMask(const Color &rTransColor) const
Create on-off mask from bitmap.
bool Convert(BmpConversion eConversion)
Convert bitmap format.
static const BitmapPalette & GetGreyPalette(int nEntries)
BitmapChecksum GetChecksum() const
bool Replace(const AlphaMask &rAlpha, const Color &rMergeColor)
Merge bitmap with given background color according to specified alpha mask.
const MapMode & GetPrefMapMode() const
Size GetSizePixel() const
static void ReleaseAccess(BitmapInfoAccess *pAccess)
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
Scale the bitmap.
bool CopyPixel_AlphaOptimized(const tools::Rectangle &rRectDst, const tools::Rectangle &rRectSrc, const Bitmap *pBmpSrc)
BitmapReadAccess * AcquireReadAccess()
bool Adjust(short nLuminancePercent, short nContrastPercent=0, short nChannelRPercent=0, short nChannelGPercent=0, short nChannelBPercent=0, double fGamma=1.0, bool bInvert=false, bool msoBrightness=false)
Change various global color characteristics.
void SetPrefSize(const Size &rSize)
bool Invert()
Perform the Invert operation on every pixel.
bool CopyPixel(const tools::Rectangle &rRectDst, const tools::Rectangle &rRectSrc, const Bitmap *pBmpSrc=nullptr)
Copy a rectangular area from another bitmap.
const Size & GetPrefSize() const
bool Erase(const Color &rFillColor)
Fill the entire bitmap with the given color.
void AdaptBitCount(Bitmap &rNew) const
bool Expand(sal_Int32 nDX, sal_Int32 nDY, const Color *pInitColor=nullptr)
Expand the bitmap by pixel padding.
vcl::PixelFormat getPixelFormat() const
bool Mirror(BmpMirrorFlags nMirrorFlags)
Mirror the bitmap.
sal_uInt8 GetBlue() const
void Merge(const Color &rMergeColor, sal_uInt8 cTransparency)
sal_uInt8 GetAlpha() const
bool IsTransparent() const
sal_uInt8 GetGreen() const
void SetAlpha(sal_uInt8 nAlpha)
static VCL_DLLPUBLIC ImageTree & get()
VCL_DLLPUBLIC bool loadImage(OUString const &name, OUString const &style, BitmapEx &bitmap, bool localized, const ImageLoadFlags eFlags=ImageLoadFlags::NONE)
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
virtual std::shared_ptr< SalBitmap > CreateSalBitmap()=0
constexpr tools::Long Height() const
constexpr tools::Long Width() const
OUString DetermineIconTheme() const
Determine which icon theme should be used.
A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for refer...
bool decompose(B2DTuple &rScale, B2DTuple &rTranslate, double &rRotate, double &rShearX) const
void translate(double fX, double fY)
void scale(double fX, double fY)
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
B2DVector getRange() const
B2DPoint getMinimum() const
const BColorModifierSharedPtr & getBColorModifier(sal_uInt32 nIndex) const
const ::basegfx::BColor & getBColor() const
bool write(const BitmapEx &rBitmap)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
B2DHomMatrix createScaleB2DHomMatrix(double fScaleX, double fScaleY)
std::shared_ptr< BColorModifier > BColorModifierSharedPtr
B2IRange fround(const B2DRange &rRange)
constexpr bool isPalettePixelFormat(PixelFormat ePixelFormat)
Is it a pixel format that forces creation of a palette.
PixelFormat
Pixel format of the bitmap in bits per pixel.
Color m_aLastColorTopLeft
Color m_aLastColorBottomRight
Color m_aLastColorTopRight
Color m_aLastColorBottomLeft
ImplSVData * ImplGetSVData()
BlendFrameCache * ImplGetBlendFrameCache()