22#include <osl/thread.h>
41void ImplScalePoint(
Point& rPt,
double fScaleX,
double fScaleY )
52 ImplScalePoint( aTL, fScaleX, fScaleY );
53 ImplScalePoint( aBR, fScaleX, fScaleY );
59void ImplScalePoly(
tools::Polygon& rPoly,
double fScaleX,
double fScaleY )
61 for( sal_uInt16 i = 0, nCount = rPoly.
GetSize(); i < nCount; i++ )
62 ImplScalePoint( rPoly[ i ], fScaleX, fScaleY );
65void ImplScaleLineInfo(
LineInfo& rLineInfo,
double fScaleX,
double fScaleY )
67 if( !rLineInfo.IsDefault() )
69 const double fScale = ( fabs(fScaleX) + fabs(fScaleY) ) * 0.5;
71 rLineInfo.SetWidth(
FRound( fScale * rLineInfo.GetWidth() ) );
72 rLineInfo.SetDashLen(
FRound( fScale * rLineInfo.GetDashLen() ) );
73 rLineInfo.SetDotLen(
FRound( fScale * rLineInfo.GetDotLen() ) );
74 rLineInfo.SetDistance(
FRound( fScale * rLineInfo.GetDistance() ) );
146 ImplScalePoint(
maPt, fScaleX, fScaleY );
178 ImplScalePoint(
maPt, fScaleX, fScaleY );
190 maStartPt ( rStart ),
197 maLineInfo (
std::move( aLineInfo )),
198 maStartPt ( rStart ),
223 ImplScalePoint(
maStartPt, fScaleX, fScaleY );
224 ImplScalePoint(
maEndPt, fScaleX, fScaleY );
225 ImplScaleLineInfo(
maLineInfo, fScaleX, fScaleY );
257 ImplScaleRect(
maRect, fScaleX, fScaleY );
270 sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) :
273 mnHorzRound ( nHorzRound ),
274 mnVertRound ( nVertRound )
294 ImplScaleRect(
maRect, fScaleX, fScaleY );
328 ImplScaleRect(
maRect, fScaleX, fScaleY );
342 maStartPt ( rStart ),
365 ImplScaleRect(
maRect, fScaleX, fScaleY );
366 ImplScalePoint(
maStartPt, fScaleX, fScaleY );
367 ImplScalePoint(
maEndPt, fScaleX, fScaleY );
381 maStartPt ( rStart ),
404 ImplScaleRect(
maRect, fScaleX, fScaleY );
405 ImplScalePoint(
maStartPt, fScaleX, fScaleY );
406 ImplScalePoint(
maEndPt, fScaleX, fScaleY );
420 maStartPt ( rStart ),
443 ImplScaleRect(
maRect, fScaleX, fScaleY );
444 ImplScalePoint(
maStartPt, fScaleX, fScaleY );
445 ImplScalePoint(
maEndPt, fScaleX, fScaleY );
457 maPoly (
std::move( aPoly ))
462 maLineInfo (
std::move( aLineInfo )),
463 maPoly (
std::move( aPoly ))
471 if (nDim > 0x20000000 || nDim < -0x20000000)
473 SAL_WARN(
"vcl",
"skipping huge dimension: " << nDim);
513 ImplScalePoly(
maPoly, fScaleX, fScaleY );
514 ImplScaleLineInfo(
maLineInfo, fScaleX, fScaleY );
526 maPoly (
std::move( aPoly ))
546 ImplScalePoly(
maPoly, fScaleX, fScaleY );
558 maPolyPoly (
std::move( aPolyPoly ))
579 ImplScalePoly(
maPolyPoly[
i ], fScaleX, fScaleY );
592 sal_Int32 nIndex, sal_Int32 nLen ) :
620 ImplScalePoint(
maPt, fScaleX, fScaleY );
631 maStartPt ( rAction.maStartPt ),
632 maStr ( rAction.maStr ),
633 maDXAry ( rAction.maDXAry ),
634 maKashidaAry( rAction.maKashidaAry ),
636 mnLen ( rAction.mnLen )
643 std::vector<sal_Bool> aKashidaAry,
647 maStartPt ( rStartPt ),
649 maDXAry (
std::move( aDXAry )),
650 maKashidaAry(
std::move( aKashidaAry )),
663 maStartPt ( rStartPt ),
665 maKashidaAry( pKashidaAry.
begin(), pKashidaAry.
end() ),
693 ImplScalePoint(
maStartPt, fScaleX, fScaleY );
724 sal_Int32 nIndex, sal_Int32 nLen ) :
753 ImplScalePoint(
maPt, fScaleX, fScaleY );
792 ImplScaleRect(
maRect, fScaleX, fScaleY );
813 meStrikeout ( eStrikeout ),
814 meUnderline ( eUnderline ),
815 meOverline ( eOverline )
835 ImplScalePoint(
maPos, fScaleX, fScaleY );
869 ImplScalePoint(
maPt, fScaleX, fScaleY );
892 constexpr int nMaxScaleWhenFuzzing = 128;
894 auto nSourceHeight = rSource.
Height();
895 auto nDestHeight = rDest.
Height();
896 if (nSourceHeight && std::abs(nDestHeight / nSourceHeight) > nMaxScaleWhenFuzzing)
898 SAL_WARN(
"vcl",
"skipping large vertical scaling: " << nSourceHeight <<
" to " << nDestHeight);
902 if (nDestHeight && std::abs(nSourceHeight / nDestHeight) > nMaxScaleWhenFuzzing)
904 SAL_WARN(
"vcl",
"skipping large vertical scaling: " << nSourceHeight <<
" to " << nDestHeight);
908 auto nSourceWidth = rSource.
Width();
909 auto nDestWidth = rDest.
Width();
910 if (nSourceWidth && std::abs(nDestWidth / nSourceWidth) > nMaxScaleWhenFuzzing)
912 SAL_WARN(
"vcl",
"skipping large horizontal scaling: " << nSourceWidth <<
" to " << nDestWidth);
916 if (nDestWidth && std::abs(nSourceWidth / nDestWidth) > nMaxScaleWhenFuzzing)
918 SAL_WARN(
"vcl",
"skipping large horizontal scaling: " << nSourceWidth <<
" to " << nDestWidth);
951 ImplScaleRect( aRectangle, fScaleX, fScaleY );
995 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1030 ImplScalePoint(
maPt, fScaleX, fScaleY );
1071 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1084 const Point& rSrcPt,
const Size& rSrcSz,
1112 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1126 const Color& rColor ) :
1150 ImplScalePoint(
maPt, fScaleX, fScaleY );
1162 const Color& rColor ) :
1190 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1203 const Point& rSrcPt,
const Size& rSrcSz,
1205 const Color& rColor ) :
1236 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1251 maGradient (
std::move( aGradient ))
1271 ImplScaleRect(
maRect, fScaleX, fScaleY );
1280 maPolyPoly (
std::move( aPolyPoly )),
1281 maGradient (
std::move( aGradient ))
1289 if(
pOut->GetConnectMetaFile() )
1291 pOut->GetConnectMetaFile()->AddAction(
this );
1308 ImplScalePoly(
maPolyPoly[
i ], fScaleX, fScaleY );
1320 maPolyPoly (
std::move( aPolyPoly )),
1347 ImplScalePoly(
maPolyPoly[
i ], fScaleX, fScaleY );
1361 maWallpaper ( rPaper )
1381 ImplScaleRect(
maRect, fScaleX, fScaleY );
1394 maRegion (
std::move( aRegion )),
1403 pOut->SetClipRegion();
1450 ImplScaleRect(
maRect, fScaleX, fScaleY );
1462 maRegion (
std::move( aRegion ))
1500 mnHorzMove ( nHorzMove ),
1501 mnVertMove ( nVertMove )
1541 pOut->SetLineColor();
1568 pOut->SetFillColor();
1617 pOut->SetTextFillColor();
1644 pOut->SetTextLineColor();
1671 pOut->SetOverlineColor();
1711 maMapMode ( rMapMode )
1728 ImplScalePoint( aPoint, fScaleX, fScaleY );
1741 maFont (
std::move( aFont ))
1750 SAL_WARN_IF(
maFont.
GetCharSet() == RTL_TEXTENCODING_SYMBOL,
"vcl",
"OpenSymbol should not have charset of RTL_TEXTENCODING_SYMBOL in new documents");
1823 meRasterOp ( eRasterOp )
1839 mnTransPercent ( 0 )
1847 maPolyPoly (
std::move( aPolyPoly )),
1848 mnTransPercent ( nTransPercent )
1869 ImplScalePoly(
maPolyPoly[
i ], fScaleX, fScaleY );
1885 maGradient (
std::move( aGradient ))
1906 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1926 maGfxLink (
std::move( aGfxLink )),
1950 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1965 maRefPoint ( rRefPoint ),
1974 pOut->SetRefPoint();
2011 if ( nDataSize &&
pData )
2026 if (
pOut->GetConnectMetaFile() )
2028 pOut->GetConnectMetaFile()->AddAction(
this );
2039 if ( !(nXMove || nYMove) )
2045 bool bPathStroke = (
maComment ==
"XPATHSTROKE_SEQ_BEGIN");
2046 if ( !(bPathStroke ||
maComment ==
"XPATHFILL_SEQ_BEGIN") )
2058 aPath.
Move( nXMove, nYMove );
2063 aStartArrow.
Move(nXMove, nYMove);
2068 aEndArrow.
Move(nXMove, nYMove);
2080 aPath.
Move( nXMove, nYMove );
2095 if (( fXScale == 1.0 ) && ( fYScale == 1.0 ))
2101 bool bPathStroke = (
maComment ==
"XPATHSTROKE_SEQ_BEGIN");
2102 if ( bPathStroke ||
maComment ==
"XPATHFILL_SEQ_BEGIN" )
2110 aStroke.
scale( fXScale, fYScale );
2119 aPath.
Scale( fXScale, fYScale );
2125 }
else if(
maComment ==
"EMF_PLUS_HEADER_INFO" ){
2129 sal_Int32 nLeft(0), nRight(0), nTop(0), nBottom(0);
2130 sal_Int32 nPixX(0), nPixY(0), nMillX(0), nMillY(0);
2131 float m11(0), m12(0), m21(0), m22(0), mdx(0), mdy(0);
2164 mnLayoutMode( nLayoutMode )
2187 meTextLanguage( eTextLanguage )
geometry::RealSize2D maSize
const Size & GetSizePixel() const
Size GetSizePixel() const
tools::Long GetDistance() const
void assign(KernArraySpan other)
void set(size_t nIndex, sal_Int32 nValue)
void SetOrigin(const Point &rOrigin)
const Point & GetOrigin() const
virtual ~MetaStretchTextAction() override
virtual rtl::Reference< MetaAction > Clone() const override
virtual void Scale(double fScaleX, double fScaleY) override
virtual void Execute(OutputDevice *pOut) override
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
virtual void Scale(double fScaleX, double fScaleY) override
virtual rtl::Reference< MetaAction > Clone() const override
virtual ~MetaTextAction() override
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
virtual void Execute(OutputDevice *pOut) override
virtual ~MetaTextAlignAction() override
virtual void Execute(OutputDevice *pOut) override
virtual rtl::Reference< MetaAction > Clone() const override
virtual ~MetaTextArrayAction() override
virtual rtl::Reference< MetaAction > Clone() const override
void SetKashidaArray(std::vector< sal_Bool > aArray)
void SetDXArray(KernArray aArray)
virtual void Execute(OutputDevice *pOut) override
virtual void Scale(double fScaleX, double fScaleY) override
std::vector< sal_Bool > maKashidaAry
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
virtual rtl::Reference< MetaAction > Clone() const override
virtual ~MetaTextColorAction() override
virtual void Execute(OutputDevice *pOut) override
MetaTextFillColorAction()
virtual rtl::Reference< MetaAction > Clone() const override
virtual ~MetaTextFillColorAction() override
virtual void Execute(OutputDevice *pOut) override
virtual ~MetaTextLanguageAction() override
LanguageType meTextLanguage
virtual void Execute(OutputDevice *pOut) override
virtual rtl::Reference< MetaAction > Clone() const override
virtual ~MetaTextLineAction() override
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
virtual void Execute(OutputDevice *pOut) override
virtual void Scale(double fScaleX, double fScaleY) override
FontStrikeout meStrikeout
FontLineStyle meUnderline
virtual rtl::Reference< MetaAction > Clone() const override
virtual ~MetaTextLineColorAction() override
MetaTextLineColorAction()
virtual void Execute(OutputDevice *pOut) override
virtual rtl::Reference< MetaAction > Clone() const override
virtual ~MetaTextRectAction() override
virtual rtl::Reference< MetaAction > Clone() const override
virtual void Execute(OutputDevice *pOut) override
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
virtual void Scale(double fScaleX, double fScaleY) override
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
constexpr tools::Long Y() const
void setX(tools::Long nX)
void Move(tools::Long nHorzMove, tools::Long nVertMove)
void setY(tools::Long nY)
constexpr tools::Long X() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
SvStream & WriteInt32(sal_Int32 nInt32)
SvStream & ReadFloat(float &rFloat)
SvStream & WriteFloat(float nFloat)
SvStream & ReadInt32(sal_Int32 &rInt32)
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 getStartArrow(tools::PolyPolygon &) const
Get the polygon that is put at the start of the line.
void getEndArrow(tools::PolyPolygon &) const
Get the polygon that is put at the end of the line.
void setEndArrow(const tools::PolyPolygon &)
Set the polygon that is put at the end of the line.
void setPath(const tools::Polygon &)
Set path to stroke.
void scale(double fScaleX, double fScaleY)
Affine scaling in both X and Y dimensions.
void setStartArrow(const tools::PolyPolygon &)
Set the polygon that is put at the start of the line.
void SetFontSize(const Size &)
const OUString & GetFamilyName() const
void SetCharSet(rtl_TextEncoding)
const Size & GetFontSize() const
rtl_TextEncoding GetCharSet() const
void Move(tools::Long nHorzMove, tools::Long nVertMove)
void Scale(double fScaleX, double fScaleY)
tools::Rectangle GetBoundRect() const
UNOTOOLS_DLLPUBLIC bool IsOpenSymbol(std::u16string_view rFontName)
tools::Long FRound(double fVal)
#define LANGUAGE_DONTKNOW
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
std::unique_ptr< sal_Int32[]> pData
const sal_uInt16 TEXTCOLOR
enumrange< T >::Iterator begin(enumrange< T >)