23#include <osl/diagnose.h>
43#include <com/sun/star/beans/XFastPropertySet.hpp>
44#include <com/sun/star/rendering/MtfRenderer.hpp>
45#include <com/sun/star/rendering/XBitmapCanvas.hpp>
46#include <com/sun/star/rendering/XCanvas.hpp>
53struct ImplColAdjustParam
55 std::unique_ptr<sal_uInt8[]> pMapR;
56 std::unique_ptr<sal_uInt8[]> pMapG;
57 std::unique_ptr<sal_uInt8[]> pMapB;
60struct ImplBmpAdjustParam
62 short nLuminancePercent;
63 short nContrastPercent;
64 short nChannelRPercent;
65 short nChannelGPercent;
66 short nChannelBPercent;
71struct ImplColConvertParam
76struct ImplBmpConvertParam
81struct ImplColMonoParam
86struct ImplBmpMonoParam
91struct ImplColReplaceParam
93 std::unique_ptr<sal_uLong[]> pMinR;
94 std::unique_ptr<sal_uLong[]> pMaxR;
95 std::unique_ptr<sal_uLong[]> pMinG;
96 std::unique_ptr<sal_uLong[]> pMaxG;
97 std::unique_ptr<sal_uLong[]> pMinB;
98 std::unique_ptr<sal_uLong[]> pMaxB;
99 const Color * pDstCols;
103struct ImplBmpReplaceParam
105 const Color* pSrcCols;
106 const Color* pDstCols;
113 m_nCurrentActionElement( 0 ),
114 m_aPrefSize ( 1, 1 ),
117 m_pOutDev ( nullptr ),
120 m_bUseCanvas ( false )
125 m_nCurrentActionElement( rMtf.m_nCurrentActionElement ),
126 m_aPrefMapMode ( rMtf.m_aPrefMapMode ),
127 m_aPrefSize ( rMtf.m_aPrefSize ),
128 m_pPrev ( rMtf.m_pPrev ),
129 m_pNext ( rMtf.m_pNext ),
130 m_pOutDev ( nullptr ),
133 m_bUseCanvas ( rMtf.m_bUseCanvas )
186 return (nAction <
m_aList.size()) ?
m_aList[ nAction ].get() :
nullptr;
202 if ( nAction >=
m_aList.size() )
208 std::swap(pAction,
m_aList[nAction]);
246 const size_t nObjCount =
m_aList.size();
257 for(
size_t n = 0;
n < nObjCount;
n++ )
284 pOut->SetConnectMetaFile(
this );
328 const size_t nObjCount =
m_aList.size();
349 const size_t nObjCount =
m_aList.size();
352 if(
nPos > nObjCount )
374 if(
i++ > nSyncCount )
415 uno::Reference< rendering::XBitmapCanvas > xBitmapCanvas( xBitmap, uno::UNO_QUERY );
416 if( xBitmapCanvas.is() )
419 uno::Reference< rendering::XMtfRenderer > xMtfRenderer = rendering::MtfRenderer::createWithBitmapCanvas( xContext, xBitmapCanvas );
421 xBitmapCanvas->clear();
422 uno::Reference< beans::XFastPropertySet > xMtfFastPropertySet( xMtfRenderer, uno::UNO_QUERY );
423 if( xMtfFastPropertySet.is() )
427 xMtfFastPropertySet->setFastPropertyValue( 0,
uno::Any(
reinterpret_cast<sal_Int64
>(
this ) ) );
429 xMtfRenderer->draw( rDestSize.
Width(), rDestSize.
Height() );
432 if( aBitmapEx.
Create( xBitmapCanvas, aSize ) )
443 catch (
const uno::RuntimeException& )
447 catch (
const uno::Exception&)
462 if (aDestSize.
Width() <= 0 || aDestSize.
Height() <= 0)
465 if (aDestSize.
Width() > std::numeric_limits<sal_Int32>::max() ||
466 aDestSize.
Height() > std::numeric_limits<sal_Int32>::max())
476 if( !aTmpPrefSize.
Width() )
479 if( !aTmpPrefSize.
Height() )
496 SAL_WARN(
"vcl",
"GDIMetaFile Scaling is too high");
514 const Size aEmptySize;
521 bool bIsRecord = (pMtf && pMtf->
IsRecord());
617 double fScaleX, fScaleY;
621 nMoveX = std::abs( aOldPrefSize.
Width() ) - 1;
632 nMoveY = std::abs( aOldPrefSize.
Height() ) - 1;
641 if( ( fScaleX != 1.0 ) || ( fScaleY != 1.0 ) )
643 Scale( fScaleX, fScaleY );
644 Move( nMoveX, nMoveY );
651 const Size aBaseOffset( nX, nY );
652 Size aOffset( aBaseOffset );
655 aMapVDev->EnableOutput(
false );
663 if( pAct->GetRefCount() > 1 )
685 const Size aBaseOffset( nX, nY );
686 Size aOffset( aBaseOffset );
689 aMapVDev->EnableOutput(
false );
690 aMapVDev->SetReferenceDevice( nDPIX, nDPIY );
698 if( pAct->GetRefCount() > 1 )
711 if( aMapVDev->GetMapMode().GetMapUnit() == MapUnit::MapPixel )
713 aOffset = aMapVDev->LogicToPixel( aBaseOffset,
GetPrefMapMode() );
732 if( pAct->GetRefCount() > 1 )
740 pModAct->
Scale( fScaleX, fScaleY );
749 Scale(
static_cast<double>(rScaleX),
static_cast<double>(rScaleY) );
757 aMapVDev->EnableOutput(
false );
768 pAct->Execute( aMapVDev.
get() );
784 const Size& rOffset,
double fSin,
double fCos )
789 return Point(
FRound( fCos * nX + fSin * nY ) + rRotatePt.X() + rOffset.
Width(),
790 -
FRound( fSin * nX - fCos * nY ) + rRotatePt.Y() + rOffset.
Height() );
794 const Size& rOffset,
double fSin,
double fCos )
798 aRet.
Rotate( rRotatePt, fSin, fCos );
805 const Size& rOffset,
double fSin,
double fCos )
809 aRet.
Rotate( rRotatePt, fSin, fCos );
822 aVDev->EnableOutput(
false );
826 aVDev->DrawGradient( rPolyPoly, rGrad );
830 for(
i=0;
i < nAct; ++
i )
839 nAngle10 %= 3600_deg10;
840 nAngle10 = ( nAngle10 < 0_deg10 ) ? (
Degree10(3599) + nAngle10 ) : nAngle10;
847 const double fAngle =
toRadians(nAngle10);
848 const double fSin = sin( fAngle );
849 const double fCos = cos( fAngle );
855 aMapVDev->EnableOutput(
false );
861 const Size aOffset( -aNewBound.
Left(), -aNewBound.
Top() );
863 Point aRotAnchor( aOrigin );
864 Size aRotOffset( aOffset );
870 switch( nActionType )
979 MetaTextArrayAction* pAct =
static_cast<MetaTextArrayAction*
>(pAction);
981 pAct->GetText(), pAct->GetDXArray(), pAct->GetKashidaArray(), pAct->GetIndex(), pAct->GetLen() ) );
1016 MetaBmpScalePartAction* pAct =
static_cast<MetaBmpScalePartAction*
>(pAction);
1019 BitmapEx aBmpEx( pAct->GetBitmap() );
1043 MetaBmpExScalePartAction* pAct =
static_cast<MetaBmpExScalePartAction*
>(pAction);
1046 BitmapEx aBmpEx( pAct->GetBitmapEx() );
1077 if( pCommentAct->
GetComment() ==
"XGRAD_SEQ_BEGIN" )
1079 int nBeginComments( 1 );
1104 if( !nBeginComments )
1107 else if( pAct->
GetComment() ==
"XGRAD_SEQ_BEGIN" )
1120 bool bPathStroke = (pCommentAct->
GetComment() ==
"XPATHSTROKE_SEQ_BEGIN");
1121 if ( bPathStroke || pCommentAct->
GetComment() ==
"XPATHFILL_SEQ_BEGIN" )
1151 else if ( pCommentAct->
GetComment() ==
"XPATHSTROKE_SEQ_END"
1152 || pCommentAct->
GetComment() ==
"XPATHFILL_SEQ_END" )
1154 pAction->Execute( aMapVDev.
get() );
1187 aTransMtf.
Rotate( nAngle10 );
1200 aEPSMtf.
Rotate( nAngle10 );
1224 aRotOffset, fSin, fCos )) ) );
1268 OSL_FAIL(
"GDIMetaFile::Rotate(): unsupported action" );
1274 pAction->Execute( aMapVDev.
get() );
1299 const std::vector<tools::Rectangle>& i_rClipStack )
1302 if( ! i_rInBounds.
IsEmpty() && ! i_rClipStack.empty() && ! i_rClipStack.back().IsEmpty() )
1307 if( ! o_rOutBounds.
IsEmpty() )
1308 o_rOutBounds.
Union( aBounds );
1310 o_rOutBounds = aBounds;
1317 aMapVDev->EnableOutput(
false );
1321 std::vector<vcl::PushFlags> aPushFlagStack;
1331 switch( nActionType )
1444 aRect.
Move( aPt.X(), aPt.Y() );
1451 MetaTextArrayAction* pAct =
static_cast<MetaTextArrayAction*
>(pAction);
1454 aMapVDev->GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(),
1455 0, pAct->GetDXArray(), pAct->GetKashidaArray() );
1456 Point aPt( pAct->GetPoint() );
1457 aRect.
Move( aPt.X(), aPt.Y() );
1470 aRect.
Move( aPt.X(), aPt.Y() );
1479 static constexpr OUStringLiteral pStr =
u"\u00c4g";
1480 OUString
aStr( pStr );
1483 aMapVDev->GetTextBoundRect( aRect,
aStr, 0, 0,
aStr.getLength() );
1485 aRect.
Move( aPt.X(), aPt.Y() );
1501 MetaBmpScalePartAction* pAct =
static_cast<MetaBmpScalePartAction*
>(pAction);
1517 MetaBmpExScalePartAction* pAct =
static_cast<MetaBmpExScalePartAction*
>(pAction);
1593 if( aClipStack.back().IsEmpty() )
1594 aClipStack.back() = aRect;
1604 if( aClipStack.back().IsEmpty() )
1605 aClipStack.back() = aRect;
1653 MetaWallpaperAction* pAct =
static_cast<MetaWallpaperAction*
>(pAction);
1670 if( ! aClipStack.back().IsEmpty() )
1674 aClipStack.back().Move( aDelta.
Width(), aDelta.
Width() );
1686 aPushFlagStack.push_back( pAct->
GetFlags() );
1690 aClipStack.push_back( aRect );
1696 if( ! aPushFlagStack.empty() )
1700 if( aClipStack.size() > 1 )
1701 aClipStack.pop_back();
1703 aPushFlagStack.pop_back();
1716 static_cast<const ImplColAdjustParam*
>(pColParam)->pMapR[ rColor.
GetRed() ],
1717 static_cast<const ImplColAdjustParam*
>(pColParam)->pMapG[ rColor.
GetGreen() ],
1718 static_cast<const ImplColAdjustParam*
>(pColParam)->pMapB[ rColor.
GetBlue() ] );
1724 const ImplBmpAdjustParam*
p =
static_cast<const ImplBmpAdjustParam*
>(pBmpParam);
1727 aRet.
Adjust(
p->nLuminancePercent,
p->nContrastPercent,
1728 p->nChannelRPercent,
p->nChannelGPercent,
p->nChannelBPercent,
1729 p->fGamma,
p->bInvert );
1739 cLum = ( cLum < 128 ) ? 0 : 255;
1748 aRet.
Convert(
static_cast<const ImplBmpConvertParam*
>(pBmpParam)->eConversion );
1755 return static_cast<const ImplColMonoParam*
>(pColParam)->aColor;
1763 aPal[ 2 ] =
static_cast<const ImplBmpMonoParam*
>(pBmpParam)->aColor;
1766 aBmp.
Erase(
static_cast<const ImplBmpMonoParam*
>(pBmpParam)->aColor );
1778 for(
sal_uLong i = 0; i < static_cast<const ImplColReplaceParam*>(pColParam)->nCount;
i++ )
1780 if( (
static_cast<const ImplColReplaceParam*
>(pColParam)->pMinR[
i ] <= nR ) &&
1781 (
static_cast<const ImplColReplaceParam*
>(pColParam)->pMaxR[
i ] >= nR ) &&
1782 (
static_cast<const ImplColReplaceParam*
>(pColParam)->pMinG[
i ] <= nG ) &&
1783 (
static_cast<const ImplColReplaceParam*
>(pColParam)->pMaxG[
i ] >= nG ) &&
1784 (
static_cast<const ImplColReplaceParam*
>(pColParam)->pMinB[
i ] <= nB ) &&
1785 (
static_cast<const ImplColReplaceParam*
>(pColParam)->pMaxB[
i ] >= nB ) )
1787 return static_cast<const ImplColReplaceParam*
>(pColParam)->pDstCols[
i ];
1796 const ImplBmpReplaceParam*
p =
static_cast<const ImplBmpReplaceParam*
>(pBmpParam);
1799 aRet.
Replace(
p->pSrcCols,
p->pDstCols,
p->nCount );
1901 MetaWallpaperAction* pAct =
static_cast<MetaWallpaperAction*
>(pAction);
1902 Wallpaper aWall( pAct->GetWallpaper() );
1919 aMtf.
push_back(
new MetaWallpaperAction( rRect, std::move(aWall) ) );
1927 OSL_FAIL(
"Don't use bitmap actions of this type in metafiles!" );
1941 MetaBmpScalePartAction* pAct =
static_cast<MetaBmpScalePartAction*
>(pAction);
1942 aMtf.
push_back(
new MetaBmpScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
1943 pAct->GetSrcPoint(), pAct->GetSrcSize(),
1944 pFncBmp(
BitmapEx(pAct->GetBitmap()), pBmpParam ).GetBitmap() )
1960 MetaBmpExScalePartAction* pAct =
static_cast<MetaBmpExScalePartAction*
>(pAction);
1961 aMtf.
push_back(
new MetaBmpExScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
1962 pAct->GetSrcPoint(), pAct->GetSrcSize(),
1963 pFncBmp( pAct->GetBitmapEx(), pBmpParam ) )
1973 pFncCol( pAct->
GetColor(), pColParam ) )
1984 pFncCol( pAct->
GetColor(), pColParam ) )
2058 short nChannelRPercent,
short nChannelGPercent,
2059 short nChannelBPercent,
double fGamma,
bool bInvert,
bool msoBrightness )
2062 if( !(nLuminancePercent || nContrastPercent ||
2063 nChannelRPercent || nChannelGPercent || nChannelBPercent ||
2064 ( fGamma != 1.0 ) || bInvert) )
2067 double fM, fROff, fGOff, fBOff, fOff;
2068 ImplColAdjustParam aColParam;
2069 ImplBmpAdjustParam aBmpParam;
2071 aColParam.pMapR.reset(
new sal_uInt8[ 256 ]);
2072 aColParam.pMapG.reset(
new sal_uInt8[ 256 ]);
2073 aColParam.pMapB.reset(
new sal_uInt8[ 256 ]);
2076 if( nContrastPercent >= 0 )
2077 fM = 128.0 / ( 128.0 - 1.27 *
MinMax( nContrastPercent, 0, 100 ) );
2079 fM = ( 128.0 + 1.27 *
MinMax( nContrastPercent, -100, 0 ) ) / 128.0;
2083 fOff =
MinMax( nLuminancePercent, -100, 100 ) * 2.55 + 128.0 - fM * 128.0;
2085 fOff =
MinMax( nLuminancePercent, -100, 100 ) * 2.55;
2088 fROff = nChannelRPercent * 2.55 + fOff;
2089 fGOff = nChannelGPercent * 2.55 + fOff;
2090 fBOff = nChannelBPercent * 2.55 + fOff;
2093 fGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma );
2094 const bool bGamma = ( fGamma != 1.0 );
2107 aColParam.pMapR[ nX ] =
static_cast<sal_uInt8>(
MinMax(
FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0, 255 ));
2108 aColParam.pMapG[ nX ] =
static_cast<sal_uInt8>(
MinMax(
FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0, 255 ));
2109 aColParam.pMapB[ nX ] =
static_cast<sal_uInt8>(
MinMax(
FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0, 255 ));
2113 aColParam.pMapR[ nX ] =
GAMMA( aColParam.pMapR[ nX ], fGamma );
2114 aColParam.pMapG[ nX ] =
GAMMA( aColParam.pMapG[ nX ], fGamma );
2115 aColParam.pMapB[ nX ] =
GAMMA( aColParam.pMapB[ nX ], fGamma );
2120 aColParam.pMapR[ nX ] = ~aColParam.pMapR[ nX ];
2121 aColParam.pMapG[ nX ] = ~aColParam.pMapG[ nX ];
2122 aColParam.pMapB[ nX ] = ~aColParam.pMapB[ nX ];
2126 aBmpParam.nLuminancePercent = nLuminancePercent;
2127 aBmpParam.nContrastPercent = nContrastPercent;
2128 aBmpParam.nChannelRPercent = nChannelRPercent;
2129 aBmpParam.nChannelGPercent = nChannelGPercent;
2130 aBmpParam.nChannelBPercent = nChannelBPercent;
2131 aBmpParam.fGamma = fGamma;
2132 aBmpParam.bInvert = bInvert;
2140 ImplColConvertParam aColParam;
2141 ImplBmpConvertParam aBmpParam;
2143 aColParam.eConversion = eConversion;
2151 ImplColReplaceParam aColParam;
2152 ImplBmpReplaceParam aBmpParam;
2154 aColParam.pMinR.reset(
new sal_uLong[ nColorCount ]);
2155 aColParam.pMaxR.reset(
new sal_uLong[ nColorCount ]);
2156 aColParam.pMinG.reset(
new sal_uLong[ nColorCount ]);
2157 aColParam.pMaxG.reset(
new sal_uLong[ nColorCount ]);
2158 aColParam.pMinB.reset(
new sal_uLong[ nColorCount ]);
2159 aColParam.pMaxB.reset(
new sal_uLong[ nColorCount ]);
2165 nVal = pSearchColors[
i ].
GetRed();
2173 nVal = pSearchColors[
i ].
GetBlue();
2178 aColParam.pDstCols = pReplaceColors;
2179 aColParam.nCount = nColorCount;
2181 aBmpParam.pSrcCols = pSearchColors;
2182 aBmpParam.pDstCols = pReplaceColors;
2183 aBmpParam.nCount = nColorCount;
2192 ImplColMonoParam aColParam;
2193 ImplBmpMonoParam aBmpParam;
2195 aColParam.aColor = rColor;
2196 aBmpParam.aColor = rColor;
2235 for( sal_uInt16
n = 0;
n < rPolyPoly.
Count(); ++
n )
2236 nSizeBytes += ( rPolyPoly[
n ].GetSize() *
sizeof(
Point ) );
2245 MetaTextArrayAction* pTextArrayAction =
static_cast<MetaTextArrayAction*
>(pAction);
2247 nSizeBytes += ( pTextArrayAction->GetText().getLength() *
sizeof(
sal_Unicode ) );
2249 if( !pTextArrayAction->GetDXArray().empty() )
2250 nSizeBytes += ( pTextArrayAction->GetLen() << 2 );
2268 const Point aNullPt;
2272 Size aSizePix( std::abs( aBRPix.X() - aTLPix.X() ) + 1, std::abs( aBRPix.Y() - aTLPix.Y() ) + 1 );
2273 sal_uInt32 nMaximumExtent = 512;
2281 && ( sal::static_int_cast< tools::ULong >(aSizePix.
Width()) >
2283 sal::static_int_cast< tools::ULong >(aSizePix.
Height()) >
2286 const Size aOldSizePix( aSizePix );
2287 double fWH =
static_cast< double >( aSizePix.
Width() ) / aSizePix.
Height();
2296 aSizePix.
setWidth( nMaximumExtent );
2307 if (aVDev->SetOutputSizePixel(aAntialiasSize))
2317 BitmapEx aBitmap( aVDev->GetBitmapEx( aNullPt, aVDev->GetOutputSizePixel() ) );
2320 aBitmap.
Scale(aDrawSize, nScaleFlag);
2325 aBitmap.
Convert(eColorConversion);
2327 rBitmapEx = aBitmap;
2340 SvFileStream aStream(pFileName ? OUString::fromUtf8(pFileName) : OUString(
"file:///tmp/metafile.xml"),
2341 StreamMode::STD_READWRITE | StreamMode::TRUNC);
2342 assert(aStream.
good());
2344 aDumper.
dump(*
this, aStream);
bool TooLargeScaleForMapMode(const Fraction &rScale, int nDPI)
static vcl::Window * GetActiveTopWindow()
Get the "active" top window.
static vcl::Window * GetFirstTopLevelWindow()
Get the first top-level window of the application.
const AlphaMask & GetAlphaMask() const
sal_Int64 GetSizeBytes() const
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
Scale the bitmap.
bool Convert(BmpConversion eConversion)
Convert bitmap format.
bool Rotate(Degree10 nAngle10, const Color &rFillColor)
Rotate bitmap by the specified angle.
void Replace(const Color &rSearchColor, const Color &rReplaceColor)
Replace all pixel having the search color with the specified color.
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.
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.
const Size & GetSizePixel() const
Size GetSizePixel() const
bool Erase(const Color &rFillColor)
Fill the entire bitmap with the given color.
sal_uInt8 GetLuminance() const
sal_uInt8 GetBlue() const
sal_uInt8 GetAlpha() const
sal_uInt8 GetGreen() const
void ReduceInaccurate(unsigned nSignificantBits)
const Color & GetEndColor() const
const Color & GetStartColor() const
void SetStartColor(const Color &rColor)
void SetEndColor(const Color &rColor)
void SetAngle(Degree10 nAngle10)
Degree10 GetAngle() const
void SetColor(const Color &rColor)
const Color & GetColor() const
void SetOrigin(const Point &rOrigin)
void SetScaleY(const Fraction &rScaleY)
const Fraction & GetScaleX() const
MapUnit GetMapUnit() const
const Fraction & GetScaleY() const
void SetScaleX(const Fraction &rScaleX)
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
const Color & GetColor() const
const Color & GetColor() const
const Point & GetStartPoint() const
tools::Long GetWidth() const
FontLineStyle GetUnderline() const
FontLineStyle GetOverline() const
FontStrikeout GetStrikeout() const
const Color & GetColor() const
const tools::Rectangle & GetRect() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Size GetOutputSize() const
SAL_DLLPRIVATE sal_Int32 GetDPIX() const
Get the output device's DPI x-axis value.
GDIMetaFile * GetConnectMetaFile() const
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
SAL_WARN_UNUSED_RESULT Size GetPixelOffset() const
Get the offset in pixel.
virtual void SetMetafileMapMode(const MapMode &rNewMapMode, bool bIsRecord)
SAL_DLLPRIVATE sal_Int32 GetDPIY() const
Get the output device's DPI y-axis value.
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Size GetOutputSizePixel() const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
void SetPixelOffset(const Size &rOffset)
Set an offset in pixel.
void SetDigitLanguage(LanguageType)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
virtual size_t GetSyncCount() const
const MapMode & GetMapMode() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
css::uno::Reference< css::rendering::XCanvas > GetCanvas() const
request XCanvas render interface
void SetLayoutMode(vcl::text::ComplexTextLayoutFlags nTextLayoutMode)
virtual vcl::Window * GetOwnerWindow() const
Get the vcl::Window that this OutputDevice belongs to, if any.
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
Encapsulates geometry and associated attributes of a filled area.
void getPath(tools::PolyPolygon &) const
Query path to fill.
void setPath(const tools::PolyPolygon &rPath)
Set path to fill.
Encapsulates geometry and associated attributes of a graphical 'pen stroke'.
void getPath(tools::Polygon &) const
Query path to stroke.
void setPath(const tools::Polygon &)
Set path to stroke.
reference_type * get() const
Get the body.
const BitmapEx & GetBitmap() const
const Color & GetColor() const
void SetGradient(const Gradient &rGradient)
void SetBitmap(const BitmapEx &rBitmap)
Gradient GetGradient() const
void SetColor(const Color &rColor)
void SetOrientation(Degree10 nLineOrientation)
void SetFillColor(const Color &)
void SetColor(const Color &)
const Color & GetColor() const
Degree10 GetOrientation() const
const Color & GetFillColor() const
tools::PolyPolygon GetAsPolyPolygon() const
void Intersect(const tools::Rectangle &rRegion)
bool HasPolyPolygonOrB2DPolyPolygon() const
tools::Rectangle GetBoundRect() const
::OutputDevice const * GetOutDev() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define TOOLS_WARN_EXCEPTION(area, stream)
static void ImplActionBounds(tools::Rectangle &o_rOutBounds, const tools::Rectangle &i_rInBounds, const std::vector< tools::Rectangle > &i_rClipStack)
Color(* ColorExchangeFnc)(const Color &rColor, const void *pColParam)
BitmapEx(* BmpExchangeFnc)(const BitmapEx &rBmpEx, const void *pBmpParam)
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 GAMMA(_def_cVal, _def_InvGamma)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
Reference< XComponentContext > getProcessComponentContext()
BitmapEx GetBitmapEx(BitmapEx const &rBitmapEx, DrawModeFlags nDrawMode)
HashMap_OWString_Interface aMap