21#include <osl/diagnose.h>
22#include <rtl/math.hxx>
25#include <officecfg/Office/Common.hxx>
41#define MAX_TILE_WIDTH 1024
42#define MAX_TILE_HEIGHT 1024
55 if (0.0 < fW && 0.0 < fH && (fW <= 1.0 || fH <= 1.0))
60 double nW = std::max<double>(1.0, rtl::math::round(fW));
61 double nH = std::max<double>(1.0, rtl::math::round(fH));
77 for (
auto const& rB2DPolygon : rPolyPoly)
78 aTarget.
Insert(toPolygon(rB2DPolygon));
96 if(!rB2DPolyPoly.
count())
133 const double fAdjustedTransparency =
mpAlphaVDev ? 0 : fTransparency;
141 fAdjustedTransparency,
149 for(
auto const& rPolygon : std::as_const(aB2DPolyPolygon))
154 fAdjustedTransparency,
158 css::drawing::LineCap_BUTT,
171 aB2DPolyPoly.
transform(rObjectTransform);
175 static_cast< sal_uInt16
>(fTransparency * 100.0)));
188 aB2DPolyPoly.
transform(rObjectTransform);
190 toPolyPolygon(aB2DPolyPoly),
191 static_cast<sal_uInt16
>(fTransparency * 100.0));
195 sal_uInt16 nTransparencePercent )
202#
if defined UNX && ! defined MACOSX && ! defined IOS
228 const double fTransparency = 0.01 * nTransparencePercent;
255 for(
auto const& rPolygon : std::as_const(aB2DPolyPolygon))
264 css::drawing::LineCap_BUTT,
279 sal_uInt16 nTransparencePercent )
331 sal::static_int_cast<sal_uInt8>(nTransparencePercent),
346 if( aDstRect.
Left() || aDstRect.
Top() )
347 aPolyPoly.
Move( -aDstRect.
Left(), -aDstRect.
Top() );
349 if( aVDev->SetOutputSizePixel( aDstSz ) )
351 const bool bOldMap =
mbMap;
357 aVDev->DrawPolyPolygon( aPolyPoly );
360 Bitmap aPolyMask( aVDev->GetBitmap(
Point(), aDstSz ) );
390 aCol.
Merge( aFillCol, cTrans );
399 for( nY = 0; nY < nHeight; nY++ )
401 Scanline pWScan = pW->GetScanline( nY );
405 for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan++ )
412 if( ( *pRScan & cBit ) == cBlack )
414 *pWScan = pMap[ *pWScan ].
GetIndex();
421 for( nY = 0; nY < nHeight; nY++ )
423 Scanline pScanline = pW->GetScanline(nY);
425 for( nX = 0; nX < nWidth; nX++ )
429 pW->SetPixelOnData( pScanline, nX, pMap[ pW->GetIndexFromData( pScanline, nX ) ] );
442 for( nY = 0; nY < nHeight; nY++ )
444 Scanline pWScan = pW->GetScanline( nY );
448 for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan += 3 )
455 if( ( *pRScan & cBit ) == cBlack )
466 for( nY = 0; nY < nHeight; nY++ )
468 Scanline pScanline = pW->GetScanline(nY);
470 for( nX = 0; nX < nWidth; nX++ )
474 aPixCol = pW->GetColor( nY, nX );
475 aPixCol.
Merge(aFillCol, cTrans);
476 pW->SetPixelOnData(pScanline, nX, aPixCol);
514 sal_uInt16 nTransparencePercent )
553 sal::static_int_cast<sal_uInt8>(255*nTransparencePercent/100),
554 sal::static_int_cast<sal_uInt8>(255*nTransparencePercent/100)) );
563 const Size& rSize,
const Gradient& rTransparenceGradient )
605 if( xVDev->SetOutputSizePixel( aDstRect.
GetSize() ) )
619 aMap.SetOrigin(
Point(-aOutPos.X(), -aOutPos.Y()));
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 Bitmap aPaint(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel()));
647 xVDev->EnableMapMode(bBufferMapModeEnabled);
651 xVDev->EnableMapMode(
false);
653 const AlphaMask aAlpha(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel()));
665 const bool bOldMap =
mbMap;
667 aMap.SetOrigin(
Point( -aOutPos.X(), -aOutPos.Y() ) );
668 xVDev->SetMapMode(
aMap );
669 const bool bVDevOldMap = xVDev->IsMapModeEnabled();
675 xVDev->EnableMapMode(
false );
676 BitmapEx aPaint = xVDev->GetBitmapEx(
Point(), xVDev->GetOutputSizePixel());
677 xVDev->EnableMapMode( bVDevOldMap );
681 xVDev->DrawGradient(
tools::Rectangle( rPos, rSize ), rTransparenceGradient );
683 xVDev->EnableMapMode(
false );
685 AlphaMask aAlpha(xVDev->GetBitmap(
Point(), xVDev->GetOutputSizePixel()));
706struct ConnectedComponents
708 ConnectedComponents() :
713 bIsFullyTransparent(
false)
716 ::std::list< Component > aComponentList;
720 bool bIsFullyTransparent;
731bool DoesActionHandleTransparency(
const MetaAction& rAct )
753bool doesRectCoverWithUniformColor(
760 return (rMapModeVDev.
LogicToPixel(rCurrRect).Contains(rPrevRect) &&
772 bool bRet = doesRectCoverWithUniformColor(io_rPrevRect, rCurrRect, rMapModeVDev);
776 io_rPrevRect = rCurrRect;
790void ImplConvertTransparentAction(
GDIMetaFile& o_rMtf,
807 aLineColor.SetRed(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency) * aLineColor.GetRed()) / 100));
808 aLineColor.SetGreen(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency) * aLineColor.GetGreen()) / 100));
809 aLineColor.SetBlue(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency) * aLineColor.GetBlue()) / 100));
813 aFillColor.SetRed(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency)*aFillColor.GetRed()) / 100));
814 aFillColor.SetGreen(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency)*aFillColor.GetGreen()) / 100));
815 aFillColor.SetBlue(
static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency)*aFillColor.GetBlue()) / 100));
845 OSL_FAIL(
"Printer::GetPreparedMetafile impossible state reached");
880 OSL_FAIL(
"Unexpected case");
897 if( !bLineTransparency )
902 if( !bLineTransparency )
907 if( !bLineTransparency || !bFillTransparency )
912 if( !bLineTransparency || !bFillTransparency )
917 if( !bLineTransparency || !bFillTransparency )
922 if( !bLineTransparency || !bFillTransparency )
927 if( !bLineTransparency || !bFillTransparency )
932 if( !bLineTransparency || !bFillTransparency )
937 if( !bLineTransparency )
942 if( !bLineTransparency || !bFillTransparency )
947 if( !bLineTransparency || !bFillTransparency )
955 if (!aString.isEmpty())
964 if (!aString.isEmpty())
1023 const tools::Long nHalfLineWidth((nLineWidth + 1) / 2);
1025 aActionBounds.
AdjustTop( -nHalfLineWidth );
1033 aActionBounds =
static_cast<const MetaRectAction&
>(rAct).GetRect();
1076 const tools::Long nHalfLineWidth((nLineWidth + 1) / 2);
1078 aActionBounds.
AdjustTop( -nHalfLineWidth );
1086 aActionBounds =
static_cast<const MetaPolygonAction&
>(rAct).GetPolygon().GetBoundRect();
1143 aActionBounds =
static_cast<const MetaGradientExAction&
>(rAct).GetPolyPolygon().GetBoundRect();
1147 aActionBounds =
static_cast<const MetaHatchAction&
>(rAct).GetPolyPolygon().GetBoundRect();
1173 if (!aString.isEmpty())
1181 aActionBounds.
Move( aPtLog.X(), aPtLog.Y() );
1191 if( !aString.isEmpty() )
1220 if( !aString.isEmpty() )
1236 OSL_FAIL(
"MetaActionType::TEXTLINE not supported");
1243 if( !aActionBounds.
IsEmpty() )
1262 bool bReduceTransparency,
bool bTransparencyAutoMode,
1263 bool bDownsampleBitmaps,
1264 const Color& rBackground
1268 bool bTransparent(
false );
1272 if(!bReduceTransparency || bTransparencyAutoMode)
1313 ConnectedComponents aBackgroundComponent;
1316 double fReduceTransparencyMinArea = officecfg::Office::Common::VCL::ReduceTransparencyMinArea::get() / 100.0;
1317 SAL_WARN_IF(fReduceTransparencyMinArea > 1.0,
"vcl",
1318 "Value of ReduceTransparencyMinArea config option is too high");
1319 SAL_WARN_IF(fReduceTransparencyMinArea < 0.0,
"vcl",
1320 "Value of ReduceTransparencyMinArea config option is too low");
1321 fReduceTransparencyMinArea = std::clamp(fReduceTransparencyMinArea, 0.0, 1.0);
1325 aMapModeVDev->mnDPIX =
mnDPIX;
1326 aMapModeVDev->mnDPIY =
mnDPIY;
1327 aMapModeVDev->EnableOutput(
false);
1333 bool bStillBackground=
true;
1334 int nActionNum = 0, nLastBgAction = -1;
1335 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).FirstAction();
1338 aBackgroundComponent.aBgColor = rBackground;
1341 while( pCurrAct && bStillBackground )
1348 aBackgroundComponent.aBounds,
1349 aBackgroundComponent.aBgColor,
1352 bStillBackground=
false;
1354 nLastBgAction=nActionNum;
1364 aBackgroundComponent.aBounds,
1365 aBackgroundComponent.aBgColor,
1368 bStillBackground=
false;
1370 nLastBgAction=nActionNum;
1377 if( aPoly.
Count() != 1 ||
1379 aPoly[0].getB2DPolygon()) ||
1381 aBackgroundComponent.aBounds,
1382 aBackgroundComponent.aBgColor,
1385 bStillBackground=
false;
1387 nLastBgAction=nActionNum;
1393 aBackgroundComponent.aBounds,
1394 aBackgroundComponent.aBgColor,
1397 bStillBackground=
false;
1399 nLastBgAction=nActionNum;
1404 if( ImplIsNotTransparent( *pCurrAct,
1406 bStillBackground=
false;
1411 aBackgroundComponent.aBounds.Union(
1412 ImplCalcActionBounds(*pCurrAct, *aMapModeVDev) );
1420 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction();
1424 if (nLastBgAction != -1)
1428 for (
size_t nPostLastBgAction = nLastBgAction + 1; nPostLastBgAction < nActionSize; ++nPostLastBgAction)
1432 nLastBgAction = nPostLastBgAction;
1436 aMapModeVDev->ClearStack();
1441 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).FirstAction();
1442 while( pCurrAct && nActionNum<=nLastBgAction )
1446 aBackgroundComponent.aComponentList.emplace_back(
1447 pCurrAct, nActionNum );
1451 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction();
1457 ::std::vector<ConnectedComponents> aCCList;
1463 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction(), ++nActionNum )
1469 const tools::Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, *aMapModeVDev) );
1474 bool bTreatSpecial(
false );
1475 ConnectedComponents aTotalComponents;
1490 aTotalComponents.bIsFullyTransparent = !ImplIsNotTransparent(*pCurrAct, *aMapModeVDev);
1493 !aTotalComponents.bIsFullyTransparent )
1495 if( !aBackgroundComponent.aComponentList.empty() &&
1496 !aBackgroundComponent.aBounds.Contains(aTotalBounds) )
1500 aTotalBounds.
Union( aBackgroundComponent.aBounds );
1503 aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
1504 aBackgroundComponent.aComponentList );
1506 if( aBackgroundComponent.bIsSpecial )
1507 bTreatSpecial =
true;
1510 bool bSomeComponentsChanged;
1522 bSomeComponentsChanged =
false;
1525 for(
auto aCurrCC=aCCList.begin(); aCurrCC != aCCList.end(); )
1536 if( !aCurrCC->aBounds.IsEmpty() &&
1537 !aCurrCC->bIsFullyTransparent &&
1538 aCurrCC->aBounds.Overlaps( aTotalBounds ) )
1543 aTotalBounds.
Union( aCurrCC->aBounds );
1546 aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
1547 aCurrCC->aComponentList );
1549 if( aCurrCC->bIsSpecial )
1550 bTreatSpecial =
true;
1553 aCurrCC = aCCList.erase( aCurrCC );
1556 bSomeComponentsChanged =
true;
1564 while( bSomeComponentsChanged );
1586 aTotalComponents.bIsSpecial =
true;
1592 aTotalComponents.bIsSpecial =
false;
1602 if( !DoesActionHandleTransparency( *pCurrAct ) )
1606 aTotalComponents.bIsSpecial =
true;
1612 if( aTotalComponents.aComponentList.empty() )
1616 aTotalComponents.bIsSpecial =
false;
1629 aTotalComponents.bIsSpecial =
true;
1637 aTotalComponents.aBounds = aTotalBounds;
1638 aTotalComponents.aComponentList.emplace_back(
1639 pCurrAct, nActionNum );
1642 aCCList.push_back( aTotalComponents );
1644 SAL_WARN_IF( aTotalComponents.aComponentList.empty(),
"vcl",
1645 "Printer::GetPreparedMetaFile empty component" );
1646 SAL_WARN_IF( aTotalComponents.aBounds.IsEmpty() && (aTotalComponents.aComponentList.size() != 1),
"vcl",
1647 "Printer::GetPreparedMetaFile non-output generating actions must be solitary");
1648 SAL_WARN_IF( aTotalComponents.bIsFullyTransparent && (aTotalComponents.aComponentList.size() != 1),
"vcl",
1649 "Printer::GetPreparedMetaFile fully transparent actions must be solitary");
1662 ::std::vector< const ConnectedComponents* > aCCList_MemberMap( rInMtf.
GetActionSize() );
1665 for (
auto const& currentItem : aCCList)
1667 for (
auto const& currentAction : currentItem.aComponentList)
1670 aCCList_MemberMap[ currentAction.second ] = ¤tItem;
1676 for (
auto & component : aBackgroundComponent.aComponentList)
1700 aPageOffset =
Point( 0, 0 ) - aPageOffset;
1704 bool bTiling =
dynamic_cast<Printer*
>(
this) !=
nullptr;
1707 for (
auto & currentItem : aCCList)
1709 if( currentItem.bIsSpecial )
1714 const double fBmpArea(
static_cast<double>(aBoundRect.
GetWidth()) * aBoundRect.
GetHeight() );
1715 const double fOutArea(
static_cast<double>(aOutputRect.
GetWidth()) * aOutputRect.
GetHeight() );
1718 if( bReduceTransparency && bTransparencyAutoMode && ( fBmpArea > ( fReduceTransparencyMinArea * fOutArea ) ) )
1723 currentItem.bIsSpecial =
false;
1734 aMapVDev->EnableOutput(
false);
1737 aPaintVDev->SetBackground( aBackgroundComponent.aBgColor );
1744 while( aDstPtPix.Y() <= aBoundRect.
Bottom() )
1746 aDstPtPix.setX( aBoundRect.
Left() );
1749 if( ( aDstPtPix.Y() + aDstSzPix.
Height() - 1 ) > aBoundRect.
Bottom() )
1752 while( aDstPtPix.X() <= aBoundRect.
Right() )
1754 if( ( aDstPtPix.X() + aDstSzPix.
Width() - 1 ) > aBoundRect.
Right() )
1755 aDstSzPix.
setWidth( aBoundRect.
Right() - aDstPtPix.X() + 1 );
1757 if( !
tools::Rectangle( aDstPtPix, aDstSzPix ).Intersection( aBoundRect ).IsEmpty() &&
1758 aPaintVDev->SetOutputSizePixel( aDstSzPix ) )
1763 aMapVDev->mnDPIX = aPaintVDev->mnDPIX =
mnDPIX;
1764 aMapVDev->mnDPIY = aPaintVDev->mnDPIY =
mnDPIY;
1766 aPaintVDev->EnableOutput(
false);
1769 for( pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).FirstAction(), nActionNum=0;
1771 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction(), ++nActionNum )
1777 if( aCCList_MemberMap[nActionNum] == ¤tItem )
1778 aPaintVDev->EnableOutput();
1787 MapMode aMtfMap( aMapVDev->GetMapMode() );
1788 const Point aNewOrg( aMapVDev->PixelToLogic( aDstPtPix ) );
1791 aPaintVDev->SetMapMode( aMtfMap );
1815 const bool bOldMap =
mbMap;
1816 mbMap = aPaintVDev->mbMap =
false;
1818 Bitmap aBandBmp( aPaintVDev->GetBitmap(
Point(), aDstSzPix ) );
1821 if( bDownsampleBitmaps )
1824 aBandBmp, nMaxBmpDPIX, nMaxBmpDPIY);
1830 aPaintVDev->mbMap =
true;
1837 aDstPtPix.AdjustX(aDstSzPix.
Width() );
1841 aDstPtPix.AdjustY(aDstSzPix.
Height() );
1850 aMapModeVDev->ClearStack();
1856 for( pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).FirstAction(), nActionNum=0;
1858 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction(), ++nActionNum )
1860 const ConnectedComponents* pCurrAssociatedComponent = aCCList_MemberMap[nActionNum];
1866 if( pCurrAssociatedComponent &&
1867 (pCurrAssociatedComponent->aBounds.IsEmpty() ||
1868 !pCurrAssociatedComponent->bIsSpecial) )
1874 if( DoesActionHandleTransparency( *pCurrAct ) &&
1875 pCurrAssociatedComponent->aComponentList.begin()->first == pCurrAct )
1879 ImplConvertTransparentAction(rOutMtf,
1882 aBackgroundComponent.aBgColor);
1897#if OSL_DEBUG_LEVEL > 1
1900 for(
auto const& aCurr:aCCList)
1902 if( aCurr.bIsSpecial )
1911 return bTransparent;
void BlendWith(const Bitmap &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
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
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)
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