21#include <osl/diagnose.h>
22#include <rtl/math.hxx>
25#include <officecfg/Office/Common.hxx>
42#define MAX_TILE_WIDTH 1024
43#define MAX_TILE_HEIGHT 1024
56 if (0.0 < fW && 0.0 < fH && (fW <= 1.0 || fH <= 1.0))
61 double nW = std::max<double>(1.0, rtl::math::round(fW));
62 double nH = std::max<double>(1.0, rtl::math::round(fH));
78 for (
auto const& rB2DPolygon : rPolyPoly)
79 aTarget.
Insert(toPolygon(rB2DPolygon));
97 if(!rB2DPolyPoly.
count())
134 const double fAdjustedTransparency =
mpAlphaVDev ? 0 : fTransparency;
142 fAdjustedTransparency,
150 for(
auto const& rPolygon : std::as_const(aB2DPolyPolygon))
155 fAdjustedTransparency,
159 css::drawing::LineCap_BUTT,
172 aB2DPolyPoly.
transform(rObjectTransform);
176 static_cast< sal_uInt16
>(fTransparency * 100.0)));
189 aB2DPolyPoly.
transform(rObjectTransform);
191 toPolyPolygon(aB2DPolyPoly),
192 static_cast<sal_uInt16
>(fTransparency * 100.0));
196 sal_uInt16 nTransparencePercent )
203#
if defined UNX && ! defined MACOSX && ! defined IOS
229 const double fTransparency = 0.01 * nTransparencePercent;
256 for(
auto const& rPolygon : std::as_const(aB2DPolyPolygon))
265 css::drawing::LineCap_BUTT,
280 sal_uInt16 nTransparencePercent )
332 sal::static_int_cast<sal_uInt8>(nTransparencePercent),
347 if( aDstRect.
Left() || aDstRect.
Top() )
348 aPolyPoly.
Move( -aDstRect.
Left(), -aDstRect.
Top() );
350 if( aVDev->SetOutputSizePixel( aDstSz ) )
352 const bool bOldMap =
mbMap;
358 aVDev->DrawPolyPolygon( aPolyPoly );
361 Bitmap aPolyMask( aVDev->GetBitmap(
Point(), aDstSz ) );
391 aCol.
Merge( aFillCol, cTrans );
400 for( nY = 0; nY < nHeight; nY++ )
402 Scanline pWScan = pW->GetScanline( nY );
406 for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan++ )
413 if( ( *pRScan & cBit ) == cBlack )
415 *pWScan = pMap[ *pWScan ].
GetIndex();
422 for( nY = 0; nY < nHeight; nY++ )
424 Scanline pScanline = pW->GetScanline(nY);
426 for( nX = 0; nX < nWidth; nX++ )
430 pW->SetPixelOnData( pScanline, nX, pMap[ pW->GetIndexFromData( pScanline, nX ) ] );
443 for( nY = 0; nY < nHeight; nY++ )
445 Scanline pWScan = pW->GetScanline( nY );
449 for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan += 3 )
456 if( ( *pRScan & cBit ) == cBlack )
467 for( nY = 0; nY < nHeight; nY++ )
469 Scanline pScanline = pW->GetScanline(nY);
471 for( nX = 0; nX < nWidth; nX++ )
475 aPixCol = pW->GetColor( nY, nX );
476 aPixCol.
Merge(aFillCol, cTrans);
477 pW->SetPixelOnData(pScanline, nX, aPixCol);
515 sal_uInt16 nTransparencePercent )
553 sal_uInt8 nAlpha = 255 - sal::static_int_cast<sal_uInt8>(255*nTransparencePercent/100);
563 const Size& rSize,
const Gradient& rTransparenceGradient )
605 if( xVDev->SetOutputSizePixel( aDstRect.
GetSize(),
true,
true ) )
620 xVDev->SetMapMode(
aMap);
627 const bool bBufferMapModeEnabled(xVDev->IsMapModeEnabled());
628 xVDev->EnableMapMode(
false);
631 xVDev->DrawOutDev( aPoint, xVDev->GetOutputSizePixel(),
632 aDstRect.
TopLeft(), xVDev->GetOutputSizePixel(),
636 xVDev->EnableMapMode(bBufferMapModeEnabled);
642 xVDev->EnableMapMode(
false);
644 const BitmapEx aPaint(xVDev->GetBitmapEx(aPoint, xVDev->GetOutputSizePixel()));
647 xVDev->EnableMapMode(bBufferMapModeEnabled);
651 xVDev->EnableMapMode(
false);
653 AlphaMask aAlpha(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel()));
679 const bool bOldMap =
mbMap;
681 aMap.SetOrigin(
Point( -aOutPos.
X(), -aOutPos.
Y() ) );
682 xVDev->SetMapMode(
aMap );
683 const bool bVDevOldMap = xVDev->IsMapModeEnabled();
689 xVDev->EnableMapMode(
false );
690 BitmapEx aPaint = xVDev->GetBitmapEx(
Point(), xVDev->GetOutputSizePixel());
691 xVDev->EnableMapMode( bVDevOldMap );
695 xVDev->DrawGradient(
tools::Rectangle( rPos, rSize ), rTransparenceGradient );
697 xVDev->EnableMapMode(
false );
699 AlphaMask aAlpha(xVDev->GetBitmap(
Point(), xVDev->GetOutputSizePixel()));
733struct ConnectedComponents
735 ConnectedComponents() :
740 bIsFullyTransparent(
false)
743 ::std::list< Component > aComponentList;
747 bool bIsFullyTransparent;
758bool DoesActionHandleTransparency(
const MetaAction& rAct )
780bool doesRectCoverWithUniformColor(
787 return (rMapModeVDev.
LogicToPixel(rCurrRect).Contains(rPrevRect) &&
799 bool bRet = doesRectCoverWithUniformColor(io_rPrevRect, rCurrRect, rMapModeVDev);
803 io_rPrevRect = rCurrRect;
817void ImplConvertTransparentAction(
GDIMetaFile& o_rMtf,
834 aLineColor.SetRed(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency) * aLineColor.GetRed()) / 100));
835 aLineColor.SetGreen(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency) * aLineColor.GetGreen()) / 100));
836 aLineColor.SetBlue(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency) * aLineColor.GetBlue()) / 100));
840 aFillColor.SetRed(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency)*aFillColor.GetRed()) / 100));
841 aFillColor.SetGreen(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency)*aFillColor.GetGreen()) / 100));
842 aFillColor.SetBlue(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency)*aFillColor.GetBlue()) / 100));
872 OSL_FAIL(
"Printer::GetPreparedMetafile impossible state reached");
907 OSL_FAIL(
"Unexpected case");
924 if( !bLineTransparency )
929 if( !bLineTransparency )
934 if( !bLineTransparency || !bFillTransparency )
939 if( !bLineTransparency || !bFillTransparency )
944 if( !bLineTransparency || !bFillTransparency )
949 if( !bLineTransparency || !bFillTransparency )
954 if( !bLineTransparency || !bFillTransparency )
959 if( !bLineTransparency || !bFillTransparency )
964 if( !bLineTransparency )
969 if( !bLineTransparency || !bFillTransparency )
974 if( !bLineTransparency || !bFillTransparency )
982 if (!aString.isEmpty())
991 if (!aString.isEmpty())
1050 const tools::Long nHalfLineWidth((nLineWidth + 1) / 2);
1052 aActionBounds.
AdjustTop( -nHalfLineWidth );
1060 aActionBounds =
static_cast<const MetaRectAction&
>(rAct).GetRect();
1103 const tools::Long nHalfLineWidth((nLineWidth + 1) / 2);
1105 aActionBounds.
AdjustTop( -nHalfLineWidth );
1113 aActionBounds =
static_cast<const MetaPolygonAction&
>(rAct).GetPolygon().GetBoundRect();
1170 aActionBounds =
static_cast<const MetaGradientExAction&
>(rAct).GetPolyPolygon().GetBoundRect();
1174 aActionBounds =
static_cast<const MetaHatchAction&
>(rAct).GetPolyPolygon().GetBoundRect();
1200 if (!aString.isEmpty())
1208 aActionBounds.
Move( aPtLog.X(), aPtLog.Y() );
1218 if( !aString.isEmpty() )
1247 if( !aString.isEmpty() )
1263 OSL_FAIL(
"MetaActionType::TEXTLINE not supported");
1270 if( !aActionBounds.
IsEmpty() )
1289 bool bReduceTransparency,
bool bTransparencyAutoMode,
1290 bool bDownsampleBitmaps,
1291 const Color& rBackground
1295 bool bTransparent(
false );
1299 if(!bReduceTransparency || bTransparencyAutoMode)
1340 ConnectedComponents aBackgroundComponent;
1343 double fReduceTransparencyMinArea = officecfg::Office::Common::VCL::ReduceTransparencyMinArea::get() / 100.0;
1344 SAL_WARN_IF(fReduceTransparencyMinArea > 1.0,
"vcl",
1345 "Value of ReduceTransparencyMinArea config option is too high");
1346 SAL_WARN_IF(fReduceTransparencyMinArea < 0.0,
"vcl",
1347 "Value of ReduceTransparencyMinArea config option is too low");
1348 fReduceTransparencyMinArea = std::clamp(fReduceTransparencyMinArea, 0.0, 1.0);
1352 aMapModeVDev->mnDPIX =
mnDPIX;
1353 aMapModeVDev->mnDPIY =
mnDPIY;
1354 aMapModeVDev->EnableOutput(
false);
1360 bool bStillBackground=
true;
1361 int nActionNum = 0, nLastBgAction = -1;
1362 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).FirstAction();
1365 aBackgroundComponent.aBgColor = rBackground;
1368 while( pCurrAct && bStillBackground )
1375 aBackgroundComponent.aBounds,
1376 aBackgroundComponent.aBgColor,
1379 bStillBackground=
false;
1381 nLastBgAction=nActionNum;
1391 aBackgroundComponent.aBounds,
1392 aBackgroundComponent.aBgColor,
1395 bStillBackground=
false;
1397 nLastBgAction=nActionNum;
1404 if( aPoly.
Count() != 1 ||
1406 aPoly[0].getB2DPolygon()) ||
1408 aBackgroundComponent.aBounds,
1409 aBackgroundComponent.aBgColor,
1412 bStillBackground=
false;
1414 nLastBgAction=nActionNum;
1420 aBackgroundComponent.aBounds,
1421 aBackgroundComponent.aBgColor,
1424 bStillBackground=
false;
1426 nLastBgAction=nActionNum;
1431 if( ImplIsNotTransparent( *pCurrAct,
1433 bStillBackground=
false;
1438 aBackgroundComponent.aBounds.Union(
1439 ImplCalcActionBounds(*pCurrAct, *aMapModeVDev) );
1447 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction();
1451 if (nLastBgAction != -1)
1455 for (
size_t nPostLastBgAction = nLastBgAction + 1; nPostLastBgAction < nActionSize; ++nPostLastBgAction)
1459 nLastBgAction = nPostLastBgAction;
1463 aMapModeVDev->ClearStack();
1468 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).FirstAction();
1469 while( pCurrAct && nActionNum<=nLastBgAction )
1473 aBackgroundComponent.aComponentList.emplace_back(
1474 pCurrAct, nActionNum );
1478 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction();
1484 ::std::vector<ConnectedComponents> aCCList;
1490 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction(), ++nActionNum )
1496 const tools::Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, *aMapModeVDev) );
1501 bool bTreatSpecial(
false );
1502 ConnectedComponents aTotalComponents;
1517 aTotalComponents.bIsFullyTransparent = !ImplIsNotTransparent(*pCurrAct, *aMapModeVDev);
1520 !aTotalComponents.bIsFullyTransparent )
1522 if( !aBackgroundComponent.aComponentList.empty() &&
1523 !aBackgroundComponent.aBounds.Contains(aTotalBounds) )
1527 aTotalBounds.
Union( aBackgroundComponent.aBounds );
1530 aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
1531 aBackgroundComponent.aComponentList );
1533 if( aBackgroundComponent.bIsSpecial )
1534 bTreatSpecial =
true;
1537 bool bSomeComponentsChanged;
1549 bSomeComponentsChanged =
false;
1552 for(
auto aCurrCC=aCCList.begin(); aCurrCC != aCCList.end(); )
1563 if( !aCurrCC->aBounds.IsEmpty() &&
1564 !aCurrCC->bIsFullyTransparent &&
1565 aCurrCC->aBounds.Overlaps( aTotalBounds ) )
1570 aTotalBounds.
Union( aCurrCC->aBounds );
1573 aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
1574 aCurrCC->aComponentList );
1576 if( aCurrCC->bIsSpecial )
1577 bTreatSpecial =
true;
1580 aCurrCC = aCCList.erase( aCurrCC );
1583 bSomeComponentsChanged =
true;
1591 while( bSomeComponentsChanged );
1613 aTotalComponents.bIsSpecial =
true;
1619 aTotalComponents.bIsSpecial =
false;
1629 if( !DoesActionHandleTransparency( *pCurrAct ) )
1633 aTotalComponents.bIsSpecial =
true;
1639 if( aTotalComponents.aComponentList.empty() )
1643 aTotalComponents.bIsSpecial =
false;
1656 aTotalComponents.bIsSpecial =
true;
1664 aTotalComponents.aBounds = aTotalBounds;
1665 aTotalComponents.aComponentList.emplace_back(
1666 pCurrAct, nActionNum );
1669 aCCList.push_back( aTotalComponents );
1671 SAL_WARN_IF( aTotalComponents.aComponentList.empty(),
"vcl",
1672 "Printer::GetPreparedMetaFile empty component" );
1673 SAL_WARN_IF( aTotalComponents.aBounds.IsEmpty() && (aTotalComponents.aComponentList.size() != 1),
"vcl",
1674 "Printer::GetPreparedMetaFile non-output generating actions must be solitary");
1675 SAL_WARN_IF( aTotalComponents.bIsFullyTransparent && (aTotalComponents.aComponentList.size() != 1),
"vcl",
1676 "Printer::GetPreparedMetaFile fully transparent actions must be solitary");
1689 ::std::vector< const ConnectedComponents* > aCCList_MemberMap( rInMtf.
GetActionSize() );
1692 for (
auto const& currentItem : aCCList)
1694 for (
auto const& currentAction : currentItem.aComponentList)
1697 aCCList_MemberMap[ currentAction.second ] = ¤tItem;
1703 for (
auto & component : aBackgroundComponent.aComponentList)
1727 aPageOffset =
Point( 0, 0 ) - aPageOffset;
1731 bool bTiling =
dynamic_cast<Printer*
>(
this) !=
nullptr;
1734 for (
auto & currentItem : aCCList)
1736 if( currentItem.bIsSpecial )
1741 const double fBmpArea(
static_cast<double>(aBoundRect.
GetWidth()) * aBoundRect.
GetHeight() );
1742 const double fOutArea(
static_cast<double>(aOutputRect.
GetWidth()) * aOutputRect.
GetHeight() );
1745 if( bReduceTransparency && bTransparencyAutoMode && ( fBmpArea > ( fReduceTransparencyMinArea * fOutArea ) ) )
1750 currentItem.bIsSpecial =
false;
1761 aMapVDev->EnableOutput(
false);
1764 aPaintVDev->SetBackground( aBackgroundComponent.aBgColor );
1771 while( aDstPtPix.
Y() <= aBoundRect.
Bottom() )
1773 aDstPtPix.
setX( aBoundRect.
Left() );
1776 if( ( aDstPtPix.
Y() + aDstSzPix.
Height() - 1 ) > aBoundRect.
Bottom() )
1779 while( aDstPtPix.
X() <= aBoundRect.
Right() )
1781 if( ( aDstPtPix.
X() + aDstSzPix.
Width() - 1 ) > aBoundRect.
Right() )
1784 if( !
tools::Rectangle( aDstPtPix, aDstSzPix ).Intersection( aBoundRect ).IsEmpty() &&
1785 aPaintVDev->SetOutputSizePixel( aDstSzPix ) )
1790 aMapVDev->mnDPIX = aPaintVDev->mnDPIX =
mnDPIX;
1791 aMapVDev->mnDPIY = aPaintVDev->mnDPIY =
mnDPIY;
1793 aPaintVDev->EnableOutput(
false);
1796 for( pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).FirstAction(), nActionNum=0;
1798 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction(), ++nActionNum )
1804 if( aCCList_MemberMap[nActionNum] == ¤tItem )
1805 aPaintVDev->EnableOutput();
1814 MapMode aMtfMap( aMapVDev->GetMapMode() );
1815 const Point aNewOrg( aMapVDev->PixelToLogic( aDstPtPix ) );
1818 aPaintVDev->SetMapMode( aMtfMap );
1842 const bool bOldMap =
mbMap;
1843 mbMap = aPaintVDev->mbMap =
false;
1845 Bitmap aBandBmp( aPaintVDev->GetBitmap(
Point(), aDstSzPix ) );
1848 if( bDownsampleBitmaps )
1851 aBandBmp, nMaxBmpDPIX, nMaxBmpDPIY);
1857 aPaintVDev->mbMap =
true;
1877 aMapModeVDev->ClearStack();
1883 for( pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).FirstAction(), nActionNum=0;
1885 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction(), ++nActionNum )
1887 const ConnectedComponents* pCurrAssociatedComponent = aCCList_MemberMap[nActionNum];
1893 if( pCurrAssociatedComponent &&
1894 (pCurrAssociatedComponent->aBounds.IsEmpty() ||
1895 !pCurrAssociatedComponent->bIsSpecial) )
1901 if( DoesActionHandleTransparency( *pCurrAct ) &&
1902 pCurrAssociatedComponent->aComponentList.begin()->first == pCurrAct )
1906 ImplConvertTransparentAction(rOutMtf,
1909 aBackgroundComponent.aBgColor);
1924#if OSL_DEBUG_LEVEL > 1
1927 for(
auto const& aCurr:aCCList)
1929 if( aCurr.bIsSpecial )
1938 return bTransparent;
void BlendWith(const AlphaMask &rOther)
static bool Reschedule(bool bHandleAllCurrentEvents=false)
Attempt to process current pending event(s)
sal_uInt8 GetIndex() const
const AlphaMask & GetAlphaMask() const
Bitmap GetBitmap(Color aTransparentReplaceColor) const
const Size & GetSizePixel() const
BitmapColor GetBestMatchingColor(const BitmapColor &rBitmapColor) const
ScanlineFormat GetScanlineFormat() const
sal_uInt16 GetEntryCount() const
sal_uInt16 GetBestIndex(const BitmapColor &rCol) const
BitmapColor GetPixelFromData(const sal_uInt8 *pData, tools::Long nX) const
Scanline GetScanline(tools::Long nY) const
Size GetSizePixel() const
bool Invert()
Perform the Invert operation on every pixel.
vcl::PixelFormat getPixelFormat() const
sal_uInt8 GetBlue() const
bool IsFullyTransparent() const
void Merge(const Color &rMergeColor, sal_uInt8 cTransparency)
sal_uInt8 GetGreen() const
const Color & GetEndColor() const
const Color & GetStartColor() const
void SetOrigin(const Point &rOrigin)
sal_uInt32 GetWidth() const
sal_Int32 GetIndex() const
const OUString & GetText() const
const Point & GetPoint() const
const Point & GetPoint() const
const OUString & GetText() const
sal_Int32 GetIndex() const
sal_Int32 GetIndex() const
const KernArray & GetDXArray() const
const OUString & GetText() const
const Point & GetPoint() const
const std::vector< sal_Bool > & GetKashidaArray() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
virtual void InitClipRegion()
void EnableMapMode(bool bEnable=true)
vcl::Region GetClipRegion() const
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
SAL_DLLPRIVATE bool is_double_buffered_window() const
SAL_DLLPRIVATE void InitLineColor()
RasterOp GetRasterOp() const
SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel(const tools::Rectangle &rLogicRect) const
Convert a logical rectangle to a rectangle in physical device pixel units.
virtual bool AcquireGraphics() const =0
Acquire a graphics device that the output device uses to draw on.
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Size GetOutputSizePixel() const
SAL_DLLPRIVATE bool ImplIsRecordLayout() const
SAL_DLLPRIVATE void InitFillColor()
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, KernArraySpan aDXArray=KernArraySpan(), o3tl::span< const sal_Bool > pKashidaArray={}, const SalLayoutGlyphs *pGlyphs=nullptr) const
Return the exact bounding rectangle of rStr.
bool IsClipRegion() const
virtual void ClipToPaintRegion(tools::Rectangle &rDstRect)
virtual sal_uInt16 GetBitCount() const
SalGraphics * mpGraphics
Graphics context to draw on.
bool RemoveTransparenciesFromMetaFile(const GDIMetaFile &rInMtf, GDIMetaFile &rOutMtf, tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY, bool bReduceTransparency, bool bTransparencyAutoMode, bool bDownsampleBitmaps, const Color &rBackground=COL_TRANSPARENT)
helper method removing transparencies from a metafile (e.g.
SAL_DLLPRIVATE bool DrawTransparentNatively(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
tools::Rectangle ImplGetTextBoundRect(const SalLayout &) const
void DrawBitmap(const Point &rDestPt, const Bitmap &rBitmap)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
AntialiasingFlags mnAntialiasing
const Color & GetLineColor() const
virtual Bitmap GetBitmap(const Point &rSrcPt, const Size &rSize) const
bool IsDeviceOutputNecessary() const
VclPtr< VirtualDevice > mpAlphaVDev
const MapMode & GetMapMode() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
void DrawGradient(const tools::Rectangle &rRect, const Gradient &rGradient)
void DrawPolyPolygon(const tools::PolyPolygon &rPolyPoly)
Render the given poly-polygon.
std::unique_ptr< SalLayout > ImplLayout(const OUString &, sal_Int32 nIndex, sal_Int32 nLen, const Point &rLogicPos=Point(0, 0), tools::Long nLogicWidth=0, KernArraySpan aKernArray=KernArraySpan(), o3tl::span< const sal_Bool > pKashidaArray={}, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::text::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
AntialiasingFlags GetAntialiasing() const
SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const
Get device transformation.
virtual void EmulateDrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
DrawModeFlags GetDrawMode() const
void DrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
virtual tools::Rectangle GetBackgroundComponentBounds() const
bool IsMapModeEnabled() const
const Color & GetFillColor() const
const OutDevType meOutDevType
constexpr tools::Long Y() const
void setX(tools::Long nX)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
const Point & GetPageOffsetPixel() const
void DrawGradientEx(OutputDevice *pOut, const tools::Rectangle &rRect, const Gradient &rGradient)
const Size & GetPaperSizePixel() const
virtual void SetFillColor()=0
virtual bool supportsOperation(OutDevSupportType) const =0
bool DrawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency, const OutputDevice &rOutDev)
void DrawPolyLine(sal_uInt32 nPoints, Point const *pPtAry, const OutputDevice &rOutDev)
void DrawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry, const OutputDevice &rOutDev)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
reference_type * get() const
Get the body.
void transform(const basegfx::B2DHomMatrix &rMatrix)
void setClosed(bool bNew)
B2DRange const & getB2DRange() const
@ Warning_Transparency_Converted
tools::Rectangle GetBoundRect() const
This template handles BitmapAccess the RAII way.
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_RED(0x80, 0x00, 0x00)
constexpr ::Color COL_BLUE(0x00, 0x00, 0x80)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
tools::Long FRound(double fVal)
std::enable_if< std::is_signed< T >::value||std::is_floating_point< T >::value, long >::type MinMax(T nVal, tools::Long nMin, tools::Long nMax)
#define SAL_WARN_IF(condition, area, stream)
VCL_DLLPUBLIC bool isVCLSkiaEnabled()
bool isRectangle(const B2DPolygon &rPoly)
constexpr double deg2rad(double v)
constexpr sal_uInt8 ColorChannelMerge(sal_uInt8 nDst, sal_uInt8 nSrc, sal_uInt8 nSrcTrans)
Bitmap GetDownsampledBitmap(Size const &rDstSizeTwip, Point const &rSrcPt, Size const &rSrcSz, Bitmap const &rBmp, tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY)
Retrieve downsampled and cropped bitmap.
BitmapEx GetBitmapEx(BitmapEx const &rBitmapEx, DrawModeFlags nDrawMode)
constexpr bool isPalettePixelFormat(PixelFormat ePixelFormat)
Is it a pixel format that forces creation of a palette.
HashMap_OWString_Interface aMap
::std::pair< MetaAction *, int > Component