26 #include <officecfg/Office/Common.hxx>
37 #define MAX_TILE_WIDTH 1024
38 #define MAX_TILE_HEIGHT 1024
45 struct ConnectedComponents
47 ConnectedComponents() :
52 bIsFullyTransparent(
false)
55 ::std::list< Component > aComponentList;
59 bool bIsFullyTransparent;
70 bool DoesActionHandleTransparency(
const MetaAction& rAct )
92 bool doesRectCoverWithUniformColor(
99 return (rMapModeVDev.
LogicToPixel(rCurrRect).IsInside(rPrevRect) &&
111 bool bRet = doesRectCoverWithUniformColor(io_rPrevRect, rCurrRect, rMapModeVDev);
115 io_rPrevRect = rCurrRect;
129 void ImplConvertTransparentAction(
GDIMetaFile& o_rMtf,
146 aLineColor.
SetRed(static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency) * aLineColor.GetRed()) / 100));
147 aLineColor.SetGreen(static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency) * aLineColor.GetGreen()) / 100));
148 aLineColor.SetBlue(static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency) * aLineColor.GetBlue()) / 100));
152 aFillColor.
SetRed(static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency)*aFillColor.GetRed()) / 100));
153 aFillColor.SetGreen(static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency)*aFillColor.GetGreen()) / 100));
154 aFillColor.SetBlue(static_cast<sal_uInt8>((255*nTransparency + (100 - nTransparency)*aFillColor.GetBlue()) / 100));
184 OSL_FAIL(
"Printer::GetPreparedMetafile impossible state reached");
197 Color aActualColor(aBgColor);
199 if (pRA->HasPalette())
200 aActualColor = pRA->GetBestPaletteColor(aBgColor);
205 if (aActualColor.GetColorError(aBgColor))
211 aBmp.Replace(aBmpEx.
GetMask(), aBgColor);
216 aBmp.Replace(aBmpEx.
GetMask(), aActualColor);
223 aBmp.Blend(aBmpEx.
GetAlpha(), aBgColor);
231 static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
236 static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
237 static_cast<const MetaBmpExScaleAction&>(rAct).GetSize(),
241 o_rMtf.
AddAction(
new MetaBmpScalePartAction(
242 static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
243 static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize(),
244 static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcPoint(),
245 static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcSize(),
249 OSL_FAIL(
"Unexpected case");
266 if( !bLineTransparency )
271 if( !bLineTransparency )
276 if( !bLineTransparency || !bFillTransparency )
281 if( !bLineTransparency || !bFillTransparency )
286 if( !bLineTransparency || !bFillTransparency )
291 if( !bLineTransparency || !bFillTransparency )
296 if( !bLineTransparency || !bFillTransparency )
301 if( !bLineTransparency || !bFillTransparency )
306 if( !bLineTransparency )
311 if( !bLineTransparency || !bFillTransparency )
316 if( !bLineTransparency || !bFillTransparency )
324 if (!aString.isEmpty())
331 const MetaTextArrayAction& rTextAct =
static_cast<const MetaTextArrayAction&
>(rAct);
332 const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
333 if (!aString.isEmpty())
377 aActionBounds =
tools::Rectangle( static_cast<const MetaPixelAction&>(rAct).GetPoint(),
Size( 1, 1 ) );
381 aActionBounds =
tools::Rectangle( static_cast<const MetaPointAction&>(rAct).GetPoint(),
Size( 1, 1 ) );
392 const tools::Long nHalfLineWidth((nLineWidth + 1) / 2);
394 aActionBounds.
AdjustTop( -nHalfLineWidth );
402 aActionBounds =
static_cast<const MetaRectAction&
>(rAct).GetRect();
406 aActionBounds =
tools::Polygon( static_cast<const MetaRoundRectAction&>(rAct).GetRect(),
407 static_cast<const MetaRoundRectAction&>(rAct).GetHorzRound(),
408 static_cast<const MetaRoundRectAction&>(rAct).GetVertRound() ).
GetBoundRect();
413 const tools::Rectangle& rRect =
static_cast<const MetaEllipseAction&
>(rAct).GetRect();
421 aActionBounds =
tools::Polygon( static_cast<const MetaArcAction&>(rAct).GetRect(),
422 static_cast<const MetaArcAction&>(rAct).GetStartPoint(),
423 static_cast<const MetaArcAction&>(rAct).GetEndPoint(), PolyStyle::Arc ).
GetBoundRect();
427 aActionBounds =
tools::Polygon( static_cast<const MetaPieAction&>(rAct).GetRect(),
428 static_cast<const MetaPieAction&>(rAct).GetStartPoint(),
429 static_cast<const MetaPieAction&>(rAct).GetEndPoint(), PolyStyle::Pie ).
GetBoundRect();
433 aActionBounds =
tools::Polygon( static_cast<const MetaChordAction&>(rAct).GetRect(),
434 static_cast<const MetaChordAction&>(rAct).GetStartPoint(),
435 static_cast<const MetaChordAction&>(rAct).GetEndPoint(), PolyStyle::Chord ).
GetBoundRect();
440 const MetaPolyLineAction& rMetaPolyLineAction =
static_cast<const MetaPolyLineAction&
>(rAct);
441 aActionBounds = rMetaPolyLineAction.GetPolygon().GetBoundRect();
445 const tools::Long nHalfLineWidth((nLineWidth + 1) / 2);
447 aActionBounds.
AdjustTop( -nHalfLineWidth );
455 aActionBounds =
static_cast<const MetaPolygonAction&
>(rAct).GetPolygon().GetBoundRect();
459 aActionBounds =
static_cast<const MetaPolyPolygonAction&
>(rAct).GetPolyPolygon().GetBoundRect();
463 aActionBounds =
tools::Rectangle( static_cast<const MetaBmpAction&>(rAct).GetPoint(),
464 rOut.
PixelToLogic( static_cast<const MetaBmpAction&>(rAct).GetBitmap().GetSizePixel() ) );
468 aActionBounds =
tools::Rectangle( static_cast<const MetaBmpScaleAction&>(rAct).GetPoint(),
469 static_cast<const MetaBmpScaleAction&>(rAct).GetSize() );
473 aActionBounds =
tools::Rectangle( static_cast<const MetaBmpScalePartAction&>(rAct).GetDestPoint(),
474 static_cast<const MetaBmpScalePartAction&>(rAct).GetDestSize() );
478 aActionBounds =
tools::Rectangle( static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
479 rOut.
PixelToLogic( static_cast<const MetaBmpExAction&>(rAct).GetBitmapEx().GetSizePixel() ) );
483 aActionBounds =
tools::Rectangle( static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
484 static_cast<const MetaBmpExScaleAction&>(rAct).GetSize() );
488 aActionBounds =
tools::Rectangle( static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
489 static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize() );
493 aActionBounds =
tools::Rectangle( static_cast<const MetaMaskAction&>(rAct).GetPoint(),
494 rOut.
PixelToLogic( static_cast<const MetaMaskAction&>(rAct).GetBitmap().GetSizePixel() ) );
498 aActionBounds =
tools::Rectangle( static_cast<const MetaMaskScaleAction&>(rAct).GetPoint(),
499 static_cast<const MetaMaskScaleAction&>(rAct).GetSize() );
503 aActionBounds =
tools::Rectangle( static_cast<const MetaMaskScalePartAction&>(rAct).GetDestPoint(),
504 static_cast<const MetaMaskScalePartAction&>(rAct).GetDestSize() );
512 aActionBounds =
static_cast<const MetaGradientExAction&
>(rAct).GetPolyPolygon().GetBoundRect();
516 aActionBounds =
static_cast<const MetaHatchAction&
>(rAct).GetPolyPolygon().GetBoundRect();
520 aActionBounds =
static_cast<const MetaWallpaperAction&
>(rAct).GetRect();
528 aActionBounds =
tools::Rectangle( static_cast<const MetaFloatTransparentAction&>(rAct).GetPoint(),
529 static_cast<const MetaFloatTransparentAction&>(rAct).GetSize() );
533 aActionBounds =
tools::Rectangle( static_cast<const MetaEPSAction&>(rAct).GetPoint(),
534 static_cast<const MetaEPSAction&>(rAct).GetSize() );
542 if (!aString.isEmpty())
550 aActionBounds.
Move( aPtLog.X(), aPtLog.Y() );
557 const MetaTextArrayAction& rTextAct =
static_cast<const MetaTextArrayAction&
>(rAct);
558 const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
560 if( !aString.isEmpty() )
563 std::unique_ptr<SalLayout> pSalLayout = rOut.
ImplLayout( rTextAct.GetText(), rTextAct.GetIndex(),
564 rTextAct.GetLen(), rTextAct.GetPoint(),
565 0, rTextAct.GetDXArray() );
568 tools::Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) );
589 if( !aString.isEmpty() )
597 tools::Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) );
605 OSL_FAIL(
"MetaActionType::TEXTLINE not supported");
629 bool bReduceTransparency,
bool bTransparencyAutoMode,
630 bool bDownsampleBitmaps,
631 const Color& rBackground
635 bool bTransparent(
false );
639 if(!bReduceTransparency || bTransparencyAutoMode)
680 ConnectedComponents aBackgroundComponent;
683 double fReduceTransparencyMinArea = officecfg::Office::Common::VCL::ReduceTransparencyMinArea::get() / 100.0;
684 SAL_WARN_IF(fReduceTransparencyMinArea > 1.0,
"vcl",
685 "Value of ReduceTransparencyMinArea config option is too high");
686 SAL_WARN_IF(fReduceTransparencyMinArea < 0.0,
"vcl",
687 "Value of ReduceTransparencyMinArea config option is too low");
688 fReduceTransparencyMinArea = std::clamp(fReduceTransparencyMinArea, 0.0, 1.0);
692 aMapModeVDev->mnDPIX =
mnDPIX;
693 aMapModeVDev->mnDPIY =
mnDPIY;
694 aMapModeVDev->EnableOutput(
false);
696 int nLastBgAction, nActionNum;
702 bool bStillBackground=
true;
703 nActionNum=0; nLastBgAction=-1;
704 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).FirstAction();
707 aBackgroundComponent.aBgColor = rBackground;
710 while( pCurrAct && bStillBackground )
717 aBackgroundComponent.aBounds,
718 aBackgroundComponent.aBgColor,
719 static_cast<const MetaRectAction*>(pCurrAct)->GetRect(),
721 bStillBackground=
false;
723 nLastBgAction=nActionNum;
729 static_cast<const MetaPolygonAction*>(pCurrAct)->GetPolygon());
733 aBackgroundComponent.aBounds,
734 aBackgroundComponent.aBgColor,
737 bStillBackground=
false;
739 nLastBgAction=nActionNum;
745 static_cast<const MetaPolyPolygonAction*>(pCurrAct)->GetPolyPolygon());
746 if( aPoly.
Count() != 1 ||
748 aPoly[0].getB2DPolygon()) ||
750 aBackgroundComponent.aBounds,
751 aBackgroundComponent.aBgColor,
754 bStillBackground=
false;
756 nLastBgAction=nActionNum;
762 aBackgroundComponent.aBounds,
763 aBackgroundComponent.aBgColor,
764 static_cast<const MetaWallpaperAction*>(pCurrAct)->GetRect(),
766 bStillBackground=
false;
768 nLastBgAction=nActionNum;
773 if( ImplIsNotTransparent( *pCurrAct,
775 bStillBackground=
false;
780 aBackgroundComponent.aBounds.Union(
781 ImplCalcActionBounds(*pCurrAct, *aMapModeVDev) );
789 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction();
793 aMapModeVDev->ClearStack();
798 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).FirstAction();
799 while( pCurrAct && nActionNum<=nLastBgAction )
803 aBackgroundComponent.aComponentList.emplace_back(
804 pCurrAct, nActionNum );
808 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction();
814 ::std::vector<ConnectedComponents> aCCList;
820 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction(), ++nActionNum )
826 const tools::Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, *aMapModeVDev) );
831 bool bTreatSpecial(
false );
832 ConnectedComponents aTotalComponents;
847 aTotalComponents.bIsFullyTransparent = !ImplIsNotTransparent(*pCurrAct, *aMapModeVDev);
850 !aTotalComponents.bIsFullyTransparent )
852 if( !aBackgroundComponent.aComponentList.empty() &&
853 !aBackgroundComponent.aBounds.IsInside(aTotalBounds) )
857 aTotalBounds.
Union( aBackgroundComponent.aBounds );
860 aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
861 aBackgroundComponent.aComponentList );
863 if( aBackgroundComponent.bIsSpecial )
864 bTreatSpecial =
true;
867 bool bSomeComponentsChanged;
879 bSomeComponentsChanged =
false;
882 for(
auto aCurrCC=aCCList.begin(); aCurrCC != aCCList.end(); )
893 if( !aCurrCC->aBounds.IsEmpty() &&
894 !aCurrCC->bIsFullyTransparent &&
895 aCurrCC->aBounds.IsOver( aTotalBounds ) )
900 aTotalBounds.
Union( aCurrCC->aBounds );
903 aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
904 aCurrCC->aComponentList );
906 if( aCurrCC->bIsSpecial )
907 bTreatSpecial =
true;
910 aCurrCC = aCCList.erase( aCurrCC );
913 bSomeComponentsChanged =
true;
921 while( bSomeComponentsChanged );
943 aTotalComponents.bIsSpecial =
true;
949 aTotalComponents.bIsSpecial =
false;
959 if( !DoesActionHandleTransparency( *pCurrAct ) )
963 aTotalComponents.bIsSpecial =
true;
969 if( aTotalComponents.aComponentList.empty() )
973 aTotalComponents.bIsSpecial =
false;
986 aTotalComponents.bIsSpecial =
true;
994 aTotalComponents.aBounds = aTotalBounds;
995 aTotalComponents.aComponentList.emplace_back(
996 pCurrAct, nActionNum );
999 aCCList.push_back( aTotalComponents );
1001 SAL_WARN_IF( aTotalComponents.aComponentList.empty(),
"vcl",
1002 "Printer::GetPreparedMetaFile empty component" );
1003 SAL_WARN_IF( aTotalComponents.aBounds.IsEmpty() && (aTotalComponents.aComponentList.size() != 1),
"vcl",
1004 "Printer::GetPreparedMetaFile non-output generating actions must be solitary");
1005 SAL_WARN_IF( aTotalComponents.bIsFullyTransparent && (aTotalComponents.aComponentList.size() != 1),
"vcl",
1006 "Printer::GetPreparedMetaFile fully transparent actions must be solitary");
1019 ::std::vector< const ConnectedComponents* > aCCList_MemberMap( rInMtf.
GetActionSize() );
1022 for (
auto const& currentItem : aCCList)
1024 for (
auto const& currentAction : currentItem.aComponentList)
1027 aCCList_MemberMap[ currentAction.second ] = ¤tItem;
1033 for (
auto & component : aBackgroundComponent.aComponentList)
1057 aPageOffset =
Point( 0, 0 ) - aPageOffset;
1061 bool bTiling =
dynamic_cast<Printer*
>(
this) !=
nullptr;
1064 for (
auto & currentItem : aCCList)
1066 if( currentItem.bIsSpecial )
1071 const double fBmpArea( static_cast<double>(aBoundRect.
GetWidth()) * aBoundRect.
GetHeight() );
1072 const double fOutArea( static_cast<double>(aOutputRect.
GetWidth()) * aOutputRect.
GetHeight() );
1075 if( bReduceTransparency && bTransparencyAutoMode && ( fBmpArea > ( fReduceTransparencyMinArea * fOutArea ) ) )
1080 currentItem.bIsSpecial =
false;
1091 aMapVDev->EnableOutput(
false);
1094 aPaintVDev->SetBackground( aBackgroundComponent.aBgColor );
1097 rOutMtf.
AddAction(
new MetaMapModeAction() );
1101 while( aDstPtPix.Y() <= aBoundRect.
Bottom() )
1103 aDstPtPix.setX( aBoundRect.
Left() );
1106 if( ( aDstPtPix.Y() + aDstSzPix.Height() - 1 ) > aBoundRect.
Bottom() )
1109 while( aDstPtPix.X() <= aBoundRect.
Right() )
1111 if( ( aDstPtPix.X() + aDstSzPix.Width() - 1 ) > aBoundRect.
Right() )
1112 aDstSzPix.setWidth( aBoundRect.
Right() - aDstPtPix.X() + 1 );
1115 aPaintVDev->SetOutputSizePixel( aDstSzPix ) )
1120 aMapVDev->mnDPIX = aPaintVDev->mnDPIX =
mnDPIX;
1121 aMapVDev->mnDPIY = aPaintVDev->mnDPIY =
mnDPIY;
1123 aPaintVDev->EnableOutput(
false);
1126 for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
1128 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction(), ++nActionNum )
1134 if( aCCList_MemberMap[nActionNum] == ¤tItem )
1135 aPaintVDev->EnableOutput();
1144 MapMode aMtfMap( aMapVDev->GetMapMode() );
1145 const Point aNewOrg( aMapVDev->PixelToLogic( aDstPtPix ) );
1147 aMtfMap.SetOrigin(
Point( -aNewOrg.X(), -aNewOrg.Y() ) );
1148 aPaintVDev->SetMapMode( aMtfMap );
1172 const bool bOldMap =
mbMap;
1173 mbMap = aPaintVDev->mbMap =
false;
1175 Bitmap aBandBmp( aPaintVDev->GetBitmap(
Point(), aDstSzPix ) );
1178 if( bDownsampleBitmaps )
1181 Point(), aBandBmp.GetSizePixel(),
1182 aBandBmp, nMaxBmpDPIX, nMaxBmpDPIY );
1189 aPaintVDev->mbMap =
true;
1196 aDstPtPix.AdjustX(aDstSzPix.Width() );
1200 aDstPtPix.AdjustY(aDstSzPix.Height() );
1203 rOutMtf.
AddAction(
new MetaPopAction() );
1209 aMapModeVDev->ClearStack();
1215 for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
1217 pCurrAct=
const_cast<GDIMetaFile&
>(rInMtf).NextAction(), ++nActionNum )
1219 const ConnectedComponents* pCurrAssociatedComponent = aCCList_MemberMap[nActionNum];
1225 if( pCurrAssociatedComponent &&
1226 (pCurrAssociatedComponent->aBounds.IsEmpty() ||
1227 !pCurrAssociatedComponent->bIsSpecial) )
1233 if( DoesActionHandleTransparency( *pCurrAct ) &&
1234 pCurrAssociatedComponent->aComponentList.begin()->first == pCurrAct )
1238 ImplConvertTransparentAction(rOutMtf,
1241 aBackgroundComponent.aBgColor);
1256 #if OSL_DEBUG_LEVEL > 1
1259 for(
auto const& aCurr:aCCList)
1261 if( aCurr.bIsSpecial )
1270 return bTransparent;
1277 if( rPrinterOptions.IsReduceGradients() )
1281 if( !rGradient.
GetSteps() || ( rGradient.
GetSteps() > rPrinterOptions.GetReducedGradientStepCount() ) )
1283 Gradient aNewGradient( rGradient );
1285 aNewGradient.
SetSteps( rPrinterOptions.GetReducedGradientStepCount() );
1301 const Color aColor( static_cast<sal_uInt8>(nR), static_cast<sal_uInt8>(nG), static_cast<sal_uInt8>(nB) );
vcl::Region GetClipRegion() const
const PrinterOptions & GetPrinterOptions() const
constexpr::Color COL_RED(0x80, 0x00, 0x00)
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
const OUString & GetText() const
tools::Rectangle GetBoundRect() const
SAL_DLLPRIVATE Bitmap GetDownsampledBitmap(const Size &rDstSz, const Point &rSrcPt, const Size &rSrcSz, const Bitmap &rBmp, tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY)
Retrieve downsampled and cropped bitmap.
void SetSteps(sal_uInt16 nSteps)
const OUString & GetText() const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
const Size & GetPaperSizePixel() const
void DrawGradientEx(OutputDevice *pOut, const tools::Rectangle &rRect, const Gradient &rGradient)
sal_uInt8 GetBlue() const
void DrawRect(const tools::Rectangle &rRect)
static bool Reschedule(bool bHandleAllCurrentEvents=false)
Attempt to process current pending event(s)
virtual tools::Rectangle GetBackgroundComponentBounds() const
bool IsClipRegion() const
const Point & GetPoint() const
sal_uInt32 GetWidth() const
const OutDevType meOutDevType
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const Color & GetLineColor() const
void SetRed(sal_uInt8 nRed)
sal_uInt16 GetEndIntensity() const
bool IsFullyTransparent() const
Size GetOutputSizePixel() const
DrawModeFlags GetDrawMode() const
std::unique_ptr< SalLayout > ImplLayout(const OUString &, sal_Int32 nIndex, sal_Int32 nLen, const Point &rLogicPos=Point(0, 0), tools::Long nLogicWidth=0, const tools::Long *pLogicDXArray=nullptr, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
sal_uInt16 GetSteps() const
const Color & GetStartColor() const
Bitmap GetBitmap(Color aTransparentReplaceColor) const
Point PixelToLogic(const Point &rDevicePt) const
Point LogicToPixel(const Point &rLogicPt) const
const Point & GetPoint() const
sal_uInt8 GetGreen() const
const Point & GetPageOffsetPixel() const
AlphaMask GetAlpha() const
#define SAL_WARN_IF(condition, area, stream)
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.
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
const Color & GetEndColor() const
::std::pair< MetaAction *, int > Component
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const tools::Long *pDXArray=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
Return the exact bounding rectangle of rStr.
void setHeight(tools::Long nHeight)
reference_type * get() const
Get the body.
constexpr::Color COL_BLUE(0x00, 0x00, 0x80)
void Push(PushFlags nFlags=PushFlags::ALL)
void DrawGradient(const tools::Rectangle &rRect, const Gradient &rGradient)
sal_uInt16 GetStartIntensity() const
sal_Int32 GetIndex() const
bool isRectangle(const B2DPolygon &rPoly)
sal_Int32 GetIndex() const
const Color & GetFillColor() const