summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx2
-rw-r--r--vcl/inc/openglgdiimpl.hxx2
-rw-r--r--vcl/opengl/gdiimpl.cxx6
-rw-r--r--vcl/source/control/button.cxx6
-rw-r--r--vcl/source/filter/sgvmain.cxx8
-rw-r--r--vcl/source/filter/sgvspln.cxx4
-rw-r--r--vcl/source/filter/sgvspln.hxx4
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx28
-rw-r--r--vcl/source/filter/wmf/emfwr.hxx4
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx14
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx42
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx34
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx6
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx20
-rw-r--r--vcl/source/filter/wmf/wmfwr.hxx4
-rw-r--r--vcl/source/gdi/bitmap.cxx2
-rw-r--r--vcl/source/gdi/cvtsvm.cxx30
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx38
-rw-r--r--vcl/source/gdi/gdimtf.cxx32
-rw-r--r--vcl/source/gdi/graphictools.cxx6
-rw-r--r--vcl/source/gdi/impvect.cxx39
-rw-r--r--vcl/source/gdi/metaact.cxx22
-rw-r--r--vcl/source/gdi/pdfwriter.cxx8
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx20
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx10
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx6
-rw-r--r--vcl/source/gdi/print2.cxx32
-rw-r--r--vcl/source/gdi/region.cxx16
-rw-r--r--vcl/source/outdev/curvedshapes.cxx8
-rw-r--r--vcl/source/outdev/font.cxx22
-rw-r--r--vcl/source/outdev/gradient.cxx22
-rw-r--r--vcl/source/outdev/hatch.cxx2
-rw-r--r--vcl/source/outdev/line.cxx4
-rw-r--r--vcl/source/outdev/map.cxx30
-rw-r--r--vcl/source/outdev/pixel.cxx4
-rw-r--r--vcl/source/outdev/polygon.cxx18
-rw-r--r--vcl/source/outdev/polyline.cxx20
-rw-r--r--vcl/source/outdev/rect.cxx6
-rw-r--r--vcl/source/outdev/text.cxx10
-rw-r--r--vcl/source/outdev/textline.cxx2
-rw-r--r--vcl/source/outdev/transparent.cxx6
-rw-r--r--vcl/source/window/cursor.cxx4
-rw-r--r--vcl/source/window/paint.cxx4
-rw-r--r--vcl/source/window/split.cxx2
-rw-r--r--vcl/source/window/splitwin.cxx2
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/source/window/window2.cxx4
-rw-r--r--vcl/win/source/gdi/gdiimpl.cxx14
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx2
-rw-r--r--vcl/win/source/gdi/wntgdi.cxx15
-rw-r--r--vcl/workben/outdevgrind.cxx24
-rw-r--r--vcl/workben/vcldemo.cxx12
52 files changed, 333 insertions, 353 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 1c9d17788837..c35ff9512e84 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -1435,7 +1435,7 @@ void PolyArgs::ClosePolygon()
DBG_ASSERT( (mpFlagAry[0]==POLY_NORMAL), "FTGlyphOutline: PolyFinishFE failed!" );
DBG_ASSERT( (mpFlagAry[mnPoints]==POLY_NORMAL), "FTGlyphOutline: PolyFinishFS failed!" );
- Polygon aPoly( mnPoints, mpPointAry, (bHasOffline ? mpFlagAry : NULL) );
+ tools::Polygon aPoly( mnPoints, mpPointAry, (bHasOffline ? mpFlagAry : NULL) );
// #i35928#
// This may be a invalid polygons, e.g. the last point is a control point.
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index f0338b7b1d46..912b91768176 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -95,7 +95,7 @@ public:
void DrawLinesAA( sal_uInt32 nPoints, const SalPoint* pPtAry, bool bClose );
void DrawEdgeAA( double nX1, double nY1, double nX2, double nY2 );
void DrawConvexPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, bool blockAA = false );
- void DrawConvexPolygon( const Polygon& rPolygon, bool blockAA = false );
+ void DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA = false );
void DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoid, bool blockAA = false );
void DrawRect( long nX, long nY, long nWidth, long nHeight );
void DrawRect( const Rectangle& rRect );
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 174563e98dec..02c69fa99e06 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -697,7 +697,7 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( sal_uInt32 nPoints, const SalPoin
CHECK_GL_ERROR();
}
-void OpenGLSalGraphicsImpl::DrawConvexPolygon( const Polygon& rPolygon, bool blockAA )
+void OpenGLSalGraphicsImpl::DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA )
{
sal_uInt16 nPoints = rPolygon.GetSize() - 1;
std::vector<GLfloat> aVertices(nPoints * 2);
@@ -1057,7 +1057,7 @@ void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const
Rectangle aBoundRect;
Point aCenter;
rGradient.GetBoundRect( rRect, aBoundRect, aCenter );
- Polygon aPoly( aBoundRect );
+ tools::Polygon aPoly( aBoundRect );
aPoly.Rotate( aCenter, rGradient.GetAngle() % 3600 );
GLfloat aTexCoord[8] = { 0, 1, 1, 1, 1, 0, 0, 0 };
@@ -1100,7 +1100,7 @@ void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const
Point aPt0( aRect.Left(), (aRect.Top() + aRect.Bottom() + 1) / 2 );
Point aPt3( aRect.Right(), (aRect.Top() + aRect.Bottom() + 1) / 2 );
- Polygon aPoly( 7 );
+ tools::Polygon aPoly( 7 );
aPoly.SetPoint( aPt0, 0 );
aPoly.SetPoint( aRect.TopLeft(), 1 );
aPoly.SetPoint( aRect.TopRight(), 2 );
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index dadb241fa25d..0157b7ddd589 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2500,11 +2500,11 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
pDev->SetLineColor();
pDev->SetFillColor( Color( COL_BLACK ) );
- pDev->DrawPolygon( Polygon( aCenterPos, nRadX, nRadY ) );
+ pDev->DrawPolygon( tools::Polygon( aCenterPos, nRadX, nRadY ) );
nRadX -= aBrd1Size.Width();
nRadY -= aBrd1Size.Height();
pDev->SetFillColor( Color( COL_WHITE ) );
- pDev->DrawPolygon( Polygon( aCenterPos, nRadX, nRadY ) );
+ pDev->DrawPolygon( tools::Polygon( aCenterPos, nRadX, nRadY ) );
if ( mbChecked )
{
nRadX -= aBrd1Size.Width();
@@ -2514,7 +2514,7 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
if ( !nRadY )
nRadY = 1;
pDev->SetFillColor( Color( COL_BLACK ) );
- pDev->DrawPolygon( Polygon( aCenterPos, nRadX, nRadY ) );
+ pDev->DrawPolygon( tools::Polygon( aCenterPos, nRadX, nRadY ) );
}
pDev->Pop();
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index ca754c28e4d9..fe318a0dc3c2 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -470,7 +470,7 @@ void RectType::Draw(OutputDevice& rOut)
RotatePoint(aPts[i],Pos1.x,Pos1.y,sn,cs);
}
SetLine(L,rOut);
- Polygon aPoly(4,aPts);
+ tools::Polygon aPoly(4,aPts);
rOut.DrawPolygon(aPoly);
}
}
@@ -479,7 +479,7 @@ void PolyType::Draw(OutputDevice& rOut)
{
if ((Flags & PolyClosBit) !=0) SetArea(F,rOut);
SetLine(L,rOut);
- Polygon aPoly(nPoints);
+ tools::Polygon aPoly(nPoints);
sal_uInt16 i;
for(i=0;i<nPoints;i++) aPoly.SetPoint(Point(EckP[i].x,EckP[i].y),i);
if ((Flags & PolyClosBit) !=0) {
@@ -493,8 +493,8 @@ void SplnType::Draw(OutputDevice& rOut)
{
if ((Flags & PolyClosBit) !=0) SetArea(F,rOut);
SetLine(L,rOut);
- Polygon aPoly(0);
- Polygon aSpln(nPoints);
+ tools::Polygon aPoly(0);
+ tools::Polygon aSpln(nPoints);
sal_uInt16 i;
for(i=0;i<nPoints;i++) aSpln.SetPoint(Point(EckP[i].x,EckP[i].y),i);
if ((Flags & PolyClosBit) !=0) {
diff --git a/vcl/source/filter/sgvspln.cxx b/vcl/source/filter/sgvspln.cxx
index 27ee2be09817..341ffa5bae1e 100644
--- a/vcl/source/filter/sgvspln.cxx
+++ b/vcl/source/filter/sgvspln.cxx
@@ -606,7 +606,7 @@ sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond,
return 0;
}
-bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n,
+bool CalcSpline(tools::Polygon& rPoly, bool Periodic, sal_uInt16& n,
double*& ax, double*& ay, double*& bx, double*& by,
double*& cx, double*& cy, double*& dx, double*& dy, double*& T)
{
@@ -675,7 +675,7 @@ bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n,
return bRet;
}
-bool Spline2Poly(Polygon& rSpln, bool Periodic, Polygon& rPoly)
+bool Spline2Poly(tools::Polygon& rSpln, bool Periodic, tools::Polygon& rPoly)
{
short MinKoord=-32000; // to prevent
short MaxKoord=32000; // overflows
diff --git a/vcl/source/filter/sgvspln.hxx b/vcl/source/filter/sgvspln.hxx
index 4eb822e854a4..906dbe2c6f47 100644
--- a/vcl/source/filter/sgvspln.hxx
+++ b/vcl/source/filter/sgvspln.hxx
@@ -28,7 +28,7 @@
* coefficient array has been allocated, which can be freed by the caller
* using a delete.
*/
-bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n,
+bool CalcSpline(tools::Polygon& rPoly, bool Periodic, sal_uInt16& n,
double*& ax, double*& ay, double*& bx, double*& by,
double*& cx, double*& cy, double*& dx, double*& dy, double*& T);
@@ -39,7 +39,7 @@ bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n,
* In the first case the polygon has 0, in the second case PolyMax points.
* To prevent coordinate overflows we limit them to +/-32000.
*/
-bool Spline2Poly(Polygon& rSpln, bool Periodic, Polygon& rPoly);
+bool Spline2Poly(tools::Polygon& rSpln, bool Periodic, tools::Polygon& rPoly);
#endif // INCLUDED_VCL_SOURCE_FILTER_SGVSPLN_HXX
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 16b3d60ff7a5..2d022b27f3b3 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -270,7 +270,7 @@ void EMFWriter::ImplWritePlusPoint( const Point& rPoint )
m_rStm.WriteUInt16( aPoint.X() ).WriteUInt16( aPoint.Y() );
}
-void EMFWriter::ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_uInt32& nTrans )
+void EMFWriter::ImplWritePlusFillPolygonRecord( const tools::Polygon& rPoly, const sal_uInt32& nTrans )
{
ImplBeginCommentRecord( WIN_EMR_COMMENT_EMFPLUS );
if( rPoly.GetSize() )
@@ -664,7 +664,7 @@ void EMFWriter::ImplWriteRect( const Rectangle& rRect )
.WriteInt32( aRect.Bottom() );
}
-void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, bool bClose )
+void EMFWriter::ImplWritePolygonRecord( const tools::Polygon& rPoly, bool bClose )
{
if( rPoly.GetSize() )
{
@@ -726,7 +726,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const tools::PolyPolygon& rPolyPoly
for( i = 0; i < nPolyCount; i++ )
{
- const Polygon& rPoly = rPolyPoly[ i ];
+ const tools::Polygon& rPoly = rPolyPoly[ i ];
for( n = 0; n < rPoly.GetSize(); n++ )
ImplWritePoint( rPoly[ n ] );
@@ -751,7 +751,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed
for ( i = 0; i < nPolyCount; i++ )
{
n = 0;
- const Polygon& rPoly = rPolyPoly[ i ];
+ const tools::Polygon& rPoly = rPolyPoly[ i ];
while ( n < rPoly.GetSize() )
{
if( n == 0 )
@@ -771,7 +771,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed
if ( nBezPoints )
{
ImplBeginRecord( WIN_EMR_POLYBEZIERTO );
- Polygon aNewPoly( nBezPoints + 1 );
+ tools::Polygon aNewPoly( nBezPoints + 1 );
aNewPoly[ 0 ] = rPoly[ n - 1 ];
for ( o = 0; o < nBezPoints; o++ )
aNewPoly[ o + 1 ] = rPoly[ n + o ];
@@ -791,7 +791,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed
if ( nPoints > 1 )
{
ImplBeginRecord( WIN_EMR_POLYLINETO );
- Polygon aNewPoly( nPoints + 1 );
+ tools::Polygon aNewPoly( nPoints + 1 );
aNewPoly[ 0 ] = rPoly[ n - 1];
for ( o = 1; o <= nPoints; o++ )
aNewPoly[ o ] = rPoly[ n - 1 + o ];
@@ -969,7 +969,7 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas
for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
{
const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a));
- ImplWritePolygonRecord( Polygon(aCandidate), false );
+ ImplWritePolygonRecord( tools::Polygon(aCandidate), false );
}
}
@@ -983,8 +983,8 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas
for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++)
{
- const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
- ImplWritePolyPolygonRecord(tools::PolyPolygon(Polygon(aPolygon)));
+ const tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
+ ImplWritePolyPolygonRecord(tools::PolyPolygon( tools::Polygon(aPolygon) ));
}
maVDev->SetLineColor(aOldLineColor);
@@ -1120,28 +1120,28 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if( maVDev->IsLineColor() || maVDev->IsFillColor() )
{
- Polygon aPoly;
+ tools::Polygon aPoly;
switch( nType )
{
case( MetaActionType::ARC ):
{
const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction);
- aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC );
+ aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC );
}
break;
case( MetaActionType::PIE ):
{
const MetaPieAction* pA = static_cast<const MetaPieAction*>(pAction);
- aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE );
+ aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE );
}
break;
case( MetaActionType::CHORD ):
{
const MetaChordAction* pA = static_cast<const MetaChordAction*>(pAction);
- aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD );
+ aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD );
}
break;
@@ -1161,7 +1161,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
if( maVDev->IsLineColor() )
{
const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pAction);
- const Polygon& rPoly = pA->GetPolygon();
+ const tools::Polygon& rPoly = pA->GetPolygon();
if( rPoly.GetSize() )
{
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index 80fc6e39ec89..35506c209b36 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -74,7 +74,7 @@ private:
void ImplWriteSize( const Size& rSize);
void ImplWriteRect( const Rectangle& rRect );
void ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClose );
- void ImplWritePolygonRecord( const Polygon& rPoly, bool bClose );
+ void ImplWritePolygonRecord( const tools::Polygon& rPoly, bool bClose );
void ImplWritePolyPolygonRecord( const tools::PolyPolygon& rPolyPoly );
void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, sal_uInt32 nROP );
void ImplWriteTextRecord( const Point& rPos, const OUString& rText, const long* pDXArray, sal_uInt32 nWidth );
@@ -83,7 +83,7 @@ private:
void ImplWrite( const GDIMetaFile& rMtf );
void WriteEMFPlusHeader( const Size &rMtfSizePix, const Size &rMtfSizeLog );
void ImplWritePlusEOF();
- void ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_uInt32& nTrans );
+ void ImplWritePlusFillPolygonRecord( const tools::Polygon& rPoly, const sal_uInt32& nTrans );
void ImplWritePlusColor( const Color& rColor, const sal_uInt32& nTrans );
void ImplWritePlusPoint( const Point& rPoint );
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 7f880d0ea8f9..96cbac64a4fc 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -381,7 +381,7 @@ static bool ImplReadRegion( tools::PolyPolygon& rPolyPoly, SvStream& rStream, sa
Rectangle aRectangle(Point(nx1, ny1), Point(nx2, ny2));
- Polygon aPolygon(aRectangle);
+ tools::Polygon aPolygon(aRectangle);
tools::PolyPolygon aPolyPolyOr1(aPolygon);
tools::PolyPolygon aPolyPolyOr2(rPolyPoly);
rPolyPoly.GetUnion(aPolyPolyOr1, aPolyPolyOr2);
@@ -485,7 +485,7 @@ void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const bool skipFirst)
nStartIndex ++;
}
- Polygon aPolygon = ReadPolygon<T>(nStartIndex, nPoints);
+ tools::Polygon aPolygon = ReadPolygon<T>(nStartIndex, nPoints);
drawer(pOut, aPolygon, skipFirst, bRecordPath);
}
@@ -497,14 +497,14 @@ void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const bool skipFirst)
* pWMF: the stream containings the polygons
* */
template <class T>
-Polygon EnhWMFReader::ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints)
+tools::Polygon EnhWMFReader::ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints)
{
bool bRecordOk = nPoints <= SAL_MAX_UINT16;
SAL_WARN_IF(!bRecordOk, "vcl.filter", "polygon record has more polygons than we can handle");
if (!bRecordOk)
- return Polygon();
+ return tools::Polygon();
- Polygon aPolygon(nPoints);
+ tools::Polygon aPolygon(nPoints);
for (sal_uInt16 i = nStartIndex ; i < nPoints && pWMF->good(); i++ )
{
T nX, nY;
@@ -545,7 +545,7 @@ void EnhWMFReader::ReadAndDrawPolyLine()
// Get polygon points:
for ( i = 0; ( i < nPoly ) && pWMF->good(); i++ )
{
- Polygon aPolygon = ReadPolygon<T>(0, pnPoints[i]);
+ tools::Polygon aPolygon = ReadPolygon<T>(0, pnPoints[i]);
pOut->DrawPolyLine( aPolygon, false, bRecordPath );
}
}
@@ -603,7 +603,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
++nReadPoints;
}
- aPolyPoly.Insert(Polygon(nPointCount, pPtAry.get()));
+ aPolyPoly.Insert( tools::Polygon(nPointCount, pPtAry.get()) );
}
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index d4bdaa86cb8b..74a0774a458a 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -97,22 +97,22 @@ basegfx::B2DPolyPolygon WinMtfClipPath::getClipPath() const
void WinMtfPathObj::AddPoint( const Point& rPoint )
{
if ( bClosed )
- Insert( Polygon() );
- Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
+ Insert( tools::Polygon() );
+ tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
rPoly.Insert( rPoly.GetSize(), rPoint );
bClosed = false;
}
-void WinMtfPathObj::AddPolyLine( const Polygon& rPolyLine )
+void WinMtfPathObj::AddPolyLine( const tools::Polygon& rPolyLine )
{
if ( bClosed )
- Insert( Polygon() );
- Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
+ Insert( tools::Polygon() );
+ tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
rPoly.Insert( rPoly.GetSize(), rPolyLine );
bClosed = false;
}
-void WinMtfPathObj::AddPolygon( const Polygon& rPoly )
+void WinMtfPathObj::AddPolygon( const tools::Polygon& rPoly )
{
Insert( rPoly );
bClosed = true;
@@ -130,7 +130,7 @@ void WinMtfPathObj::ClosePath()
{
if ( Count() )
{
- Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
+ tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
if ( rPoly.GetSize() > 2 )
{
Point aFirst( rPoly[ 0 ] );
@@ -483,7 +483,7 @@ void WinMtfOutput::ImplMap( vcl::Font& rFont )
rFont.SetOrientation( 3600 - rFont.GetOrientation() );
}
-Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
+tools::Polygon& WinMtfOutput::ImplMap( tools::Polygon& rPolygon )
{
sal_uInt16 nPoints = rPolygon.GetSize();
for ( sal_uInt16 i = 0; i < nPoints; i++ )
@@ -493,7 +493,7 @@ Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
return rPolygon;
}
-Polygon& WinMtfOutput::ImplScale( Polygon& rPolygon )
+tools::Polygon& WinMtfOutput::ImplScale( tools::Polygon& rPolygon )
{
sal_uInt16 nPoints = rPolygon.GetSize();
for ( sal_uInt16 i = 0; i < nPoints; i++ )
@@ -653,7 +653,7 @@ void WinMtfOutput::ImplDrawClippedPolyPolygon( const tools::PolyPolygon& rPolyPo
mpGDIMetaFile->AddAction( new MetaRectAction( rPolyPoly.GetBoundRect() ) );
else
{
- Polygon aPoly( rPolyPoly[ 0 ] );
+ tools::Polygon aPoly( rPolyPoly[ 0 ] );
sal_uInt16 nCount = aPoly.GetSize();
if ( nCount )
{
@@ -1022,7 +1022,7 @@ void WinMtfOutput::MoveTo( const Point& rPoint, bool bRecordPath )
// fdo#57353 create new subpath for subsequent moves
if ( aPathObj.Count() )
if ( aPathObj[ aPathObj.Count() - 1 ].GetSize() )
- aPathObj.Insert( Polygon() );
+ aPathObj.Insert( tools::Polygon() );
aPathObj.AddPoint( aDest );
}
maActPos = aDest;
@@ -1049,7 +1049,7 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge )
if ( mbComplexClip )
{
- Polygon aPoly( ImplMap( rRect ) );
+ tools::Polygon aPoly( ImplMap( rRect ) );
tools::PolyPolygon aPolyPolyRect( aPoly );
tools::PolyPolygon aDest;
tools::PolyPolygon(aClipPath.getClipPath()).GetIntersection( aPolyPolyRect, aDest );
@@ -1064,7 +1064,7 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge )
ImplSetNonPersistentLineColorTransparenz();
mpGDIMetaFile->AddAction( new MetaRectAction( ImplMap( rRect ) ) );
UpdateLineStyle();
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( ImplMap( rRect ) ),maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( ImplMap( rRect ) ),maLineStyle.aLineInfo ) );
}
else
{
@@ -1101,7 +1101,7 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
ImplSetNonPersistentLineColorTransparenz();
mpGDIMetaFile->AddAction( new MetaEllipseAction( ImplMap( rRect ) ) );
UpdateLineStyle();
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) );
}
else
{
@@ -1127,10 +1127,10 @@ void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const P
Point aCenter( aRect.Center() );
Size aRad( aRect.GetWidth() / 2, aRect.GetHeight() / 2 );
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) );
}
else
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_ARC ), maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_ARC ), maLineStyle.aLineInfo ) );
}
else
mpGDIMetaFile->AddAction( new MetaArcAction( aRect, aStart, aEnd ) );
@@ -1153,7 +1153,7 @@ void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const P
ImplSetNonPersistentLineColorTransparenz();
mpGDIMetaFile->AddAction( new MetaPieAction( aRect, aStart, aEnd ) );
UpdateLineStyle();
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_PIE ), maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_PIE ), maLineStyle.aLineInfo ) );
}
else
{
@@ -1176,7 +1176,7 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const
ImplSetNonPersistentLineColorTransparenz();
mpGDIMetaFile->AddAction( new MetaChordAction( aRect, aStart, aEnd ) );
UpdateLineStyle();
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_CHORD ), maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_CHORD ), maLineStyle.aLineInfo ) );
}
else
{
@@ -1185,7 +1185,7 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const
}
}
-void WinMtfOutput::DrawPolygon( Polygon& rPolygon, bool bRecordPath )
+void WinMtfOutput::DrawPolygon( tools::Polygon& rPolygon, bool bRecordPath )
{
UpdateClipRegion();
ImplMap( rPolygon );
@@ -1290,7 +1290,7 @@ void WinMtfOutput::DrawPolyPolygon( tools::PolyPolygon& rPolyPolygon, bool bReco
}
}
-void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, bool bTo, bool bRecordPath )
+void WinMtfOutput::DrawPolyLine( tools::Polygon& rPolygon, bool bTo, bool bRecordPath )
{
UpdateClipRegion();
@@ -1313,7 +1313,7 @@ void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, bool bTo, bool bRecordPath )
}
}
-void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, bool bTo, bool bRecordPath )
+void WinMtfOutput::DrawPolyBezier( tools::Polygon& rPolygon, bool bTo, bool bRecordPath )
{
UpdateClipRegion();
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index b68b9acfb30d..bf933632f008 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -278,8 +278,8 @@ public:
void ClosePath();
void AddPoint( const Point& rPoint );
- void AddPolygon( const Polygon& rPoly );
- void AddPolyLine( const Polygon& rPoly );
+ void AddPolygon( const tools::Polygon& rPoly );
+ void AddPolyLine( const tools::Polygon& rPoly );
void AddPolyPolygon( const tools::PolyPolygon& rPolyPolygon );
};
@@ -598,10 +598,10 @@ class WinMtfOutput
Size ImplMap( const Size& rSize, bool bDoWorldTransform = true);
Rectangle ImplMap( const Rectangle& rRectangle );
void ImplMap( vcl::Font& rFont );
- Polygon& ImplMap( Polygon& rPolygon );
- tools::PolyPolygon& ImplMap( tools::PolyPolygon& rPolyPolygon );
- Polygon& ImplScale( Polygon& rPolygon );
- tools::PolyPolygon& ImplScale( tools::PolyPolygon& rPolyPolygon );
+ tools::Polygon& ImplMap( tools::Polygon& rPolygon );
+ tools::PolyPolygon& ImplMap( tools::PolyPolygon& rPolyPolygon );
+ tools::Polygon& ImplScale( tools::Polygon& rPolygon );
+ tools::PolyPolygon& ImplScale( tools::PolyPolygon& rPolyPolygon );
void ImplResizeObjectArry( sal_uInt32 nNewEntry );
void ImplSetNonPersistentLineColorTransparenz();
void ImplDrawClippedPolyPolygon( const tools::PolyPolygon& rPolyPoly );
@@ -654,7 +654,7 @@ public:
void ClearPath(){ aPathObj.Init(); };
void ClosePath(){ aPathObj.ClosePath(); };
- const tools::PolyPolygon& GetPathObj(){ return aPathObj; };
+ const tools::PolyPolygon& GetPathObj(){ return aPathObj; };
void MoveTo( const Point& rPoint, bool bRecordPath = false );
void LineTo( const Point& rPoint, bool bRecordPath = false );
@@ -678,22 +678,20 @@ public:
const Point& rStartAngle,
const Point& rEndAngle
);
- void DrawPolygon( Polygon& rPolygon, bool bRecordPath = false );
- void DrawPolygon( Polygon& rPolygon, bool /*bDrawTo*/, bool bRecordPath)
+ void DrawPolygon( tools::Polygon& rPolygon, bool bRecordPath = false );
+ void DrawPolygon( tools::Polygon& rPolygon, bool /*bDrawTo*/, bool bRecordPath)
{
//For ReadAndDrawPolygon template compatibility
DrawPolygon(rPolygon, bRecordPath);
}
void DrawPolyPolygon( tools::PolyPolygon& rPolyPolygon, bool bRecordPath = false );
- void DrawPolyLine(
- Polygon& rPolygon,
- bool bDrawTo = false,
- bool bRecordPath = false
+ void DrawPolyLine( tools::Polygon& rPolygon,
+ bool bDrawTo = false,
+ bool bRecordPath = false
);
- void DrawPolyBezier(
- Polygon& rPolygin,
- bool bDrawTo = false,
- bool bRecordPath = false
+ void DrawPolyBezier( tools::Polygon& rPolygin,
+ bool bDrawTo = false,
+ bool bRecordPath = false
);
void DrawText( Point& rPosition,
OUString& rString,
@@ -768,7 +766,7 @@ public:
private:
template <class T> void ReadAndDrawPolyPolygon();
template <class T> void ReadAndDrawPolyLine();
- template <class T> Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints);
+ template <class T> tools::Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints);
template <class T, class Drawer> void ReadAndDrawPolygon(Drawer drawer, const bool skipFirst);
Rectangle ReadRectangle();
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 52f228ef1c99..a379d8bd9bc4 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -350,7 +350,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
}
else
{
- Polygon aPoly(nPoints);
+ tools::Polygon aPoly(nPoints);
for (sal_uInt16 i(0); i < nPoints && pWMF->good(); ++i)
aPoly[ i ] = ReadPoint();
pOut->DrawPolygon(aPoly);
@@ -429,7 +429,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pPtAry[b] = ReadPoint();
}
- aPolyPoly.Insert(Polygon(nPointCount, pPtAry));
+ aPolyPoly.Insert( tools::Polygon(nPointCount, pPtAry) );
}
bRecordOk &= pWMF->good();
@@ -458,7 +458,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
}
else
{
- Polygon aPoly(nPoints);
+ tools::Polygon aPoly(nPoints);
for (sal_uInt16 i(0); i < nPoints && pWMF->good(); ++i)
aPoly[ i ] = ReadPoint();
pOut->DrawPolyLine( aPoly );
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 623f0cd2d8d9..bdcf8701445e 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -611,9 +611,9 @@ void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, c
WriteRectangle(rRect);
}
-void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly)
+void WMFWriter::WMFRecord_Polygon(const tools::Polygon & rPoly)
{
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
if ( rPoly.HasFlags() )
rPoly.AdaptiveSubdivide( aSimplePoly );
else
@@ -625,9 +625,9 @@ void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly)
WritePointXY(aSimplePoly.GetPoint(i));
}
-void WMFWriter::WMFRecord_PolyLine(const Polygon & rPoly)
+void WMFWriter::WMFRecord_PolyLine(const tools::Polygon & rPoly)
{
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
if ( rPoly.HasFlags() )
rPoly.AdaptiveSubdivide( aSimplePoly );
else
@@ -641,7 +641,7 @@ void WMFWriter::WMFRecord_PolyLine(const Polygon & rPoly)
void WMFWriter::WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly)
{
- const Polygon * pPoly;
+ const tools::Polygon * pPoly;
sal_uInt16 nCount,nSize,i,j;
nCount=rPolyPoly.Count();
@@ -650,7 +650,7 @@ void WMFWriter::WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly)
{
if ( aSimplePolyPoly[ i ].HasFlags() )
{
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
aSimplePolyPoly[ i ].AdaptiveSubdivide( aSimplePoly );
aSimplePolyPoly[ i ] = aSimplePoly;
}
@@ -981,7 +981,7 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx:
for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
{
const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a));
- WMFRecord_PolyLine(Polygon(aCandidate));
+ WMFRecord_PolyLine( tools::Polygon(aCandidate) );
}
}
@@ -996,8 +996,8 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx:
for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++)
{
- const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
- WMFRecord_Polygon(Polygon(aPolygon));
+ const tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
+ WMFRecord_Polygon( tools::Polygon(aPolygon) );
}
aSrcLineColor = aOldLineColor;
@@ -1119,7 +1119,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case MetaActionType::POLYLINE:
{
const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pMA);
- const Polygon& rPoly = pA->GetPolygon();
+ const tools::Polygon& rPoly = pA->GetPolygon();
if( rPoly.GetSize() )
{
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index 1acbc4e4f4e0..d26cac01ecc7 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -152,8 +152,8 @@ private:
void WMFRecord_LineTo(const Point & rPoint);
void WMFRecord_MoveTo(const Point & rPoint);
void WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
- void WMFRecord_Polygon(const Polygon & rPoly);
- void WMFRecord_PolyLine(const Polygon & rPoly);
+ void WMFRecord_Polygon(const tools::Polygon & rPoly);
+ void WMFRecord_PolyLine(const tools::Polygon & rPoly);
void WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly);
void WMFRecord_Rectangle(const Rectangle & rRect);
void WMFRecord_RestoreDC();
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 69a5860a0188..16e300c19de5 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -711,7 +711,7 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
{
Point aTmpPoint;
Rectangle aTmpRectangle( aTmpPoint, aSizePix );
- Polygon aPoly( aTmpRectangle );
+ tools::Polygon aPoly( aTmpRectangle );
aPoly.Rotate( aTmpPoint, (sal_uInt16) nAngle10 );
Rectangle aNewBound( aPoly.GetBoundRect() );
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index a7821224fdf7..2d939bb5f66e 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -51,12 +51,12 @@ void ImplWriteRect( SvStream& rOStm, const Rectangle& rRect )
WritePair( rOStm, rRect.BottomRight() );
}
-void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
+void ImplReadPoly( SvStream& rIStm, tools::Polygon& rPoly )
{
sal_Int32 nSize;
rIStm.ReadInt32( nSize );
- rPoly = Polygon( (sal_uInt16) nSize );
+ rPoly = tools::Polygon( (sal_uInt16) nSize );
for( sal_uInt16 i = 0; i < (sal_uInt16) nSize; i++ )
ReadPair( rIStm, rPoly[ i ] );
@@ -64,7 +64,7 @@ void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
void ImplReadPolyPoly( SvStream& rIStm, tools::PolyPolygon& rPolyPoly )
{
- Polygon aPoly;
+ tools::Polygon aPoly;
sal_Int32 nPolyCount;
rIStm.ReadInt32( nPolyCount );
@@ -94,7 +94,7 @@ void ImplWritePolyPolyAction( SvStream& rOStm, const tools::PolyPolygon& rPolyPo
// #i102224# Here the possible curved nature of Polygon was
// ignored (for all those years). Adapted to at least write
// a polygon representing the curve as good as possible
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
rPolyPoly[n].AdaptiveSubdivide(aSimplePoly);
const sal_uInt16 nSize(aSimplePoly.GetSize());
@@ -325,7 +325,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const tools::PolyPolygo
for(a = 0; a < nPolygonCount; a++)
{
- const Polygon& rCandidate = rPolyPolygon.GetObject(a);
+ const tools::Polygon& rCandidate = rPolyPolygon.GetObject(a);
const sal_uInt16 nPointCount(rCandidate.GetSize());
if(nPointCount)
@@ -357,7 +357,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const tools::PolyPolygo
for(a = 0; a < nPolygonCount; a++)
{
- const Polygon& rCandidate = rPolyPolygon.GetObject(a);
+ const tools::Polygon& rCandidate = rPolyPolygon.GetObject(a);
const sal_uInt16 nPointCount(rCandidate.GetSize());
if(nPointCount)
@@ -424,7 +424,7 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, tools::PolyPolygon& rPol
nPointCount = nMaxPolygons;
}
- Polygon aCandidate(nPointCount);
+ tools::Polygon aCandidate(nPointCount);
if (nPointCount)
{
@@ -504,7 +504,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
// TODO: fix reindentation below if you can accept being blamed by the SCM
MapMode aMapMode;
- Polygon aActionPoly;
+ tools::Polygon aActionPoly;
Rectangle aRect;
Point aPt, aPt1;
Size aSz;
@@ -683,7 +683,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
- const Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
+ const tools::Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
@@ -704,7 +704,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
- const Polygon aPoly( aRect, aPt, aPt1, POLY_ARC );
+ const tools::Polygon aPoly( aRect, aPt, aPt1, POLY_ARC );
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
@@ -725,7 +725,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
- const Polygon aPoly( aRect, aPt, aPt1, POLY_PIE );
+ const tools::Polygon aPoly( aRect, aPt, aPt1, POLY_PIE );
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
@@ -1578,8 +1578,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( MetaActionType::CHORD ):
{
const MetaChordAction* pAct = static_cast<const MetaChordAction*>(pAction);
- Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
- pAct->GetEndPoint(), POLY_CHORD );
+ tools::Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
+ pAct->GetEndPoint(), POLY_CHORD );
const sal_uInt16 nPoints = aChordPoly.GetSize();
rOStm.WriteInt16( GDI_POLYGON_ACTION );
@@ -1599,7 +1599,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// #i102224# Here the possible curved nature of Polygon was
// ignored (for all those years). Adapted to at least write
// a polygon representing the curve as good as possible
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly);
const LineInfo& rInfo = pAct->GetLineInfo();
const sal_uInt16 nPoints(aSimplePoly.GetSize());
@@ -1685,7 +1685,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// #i102224# Here the possible curved nature of Polygon was
// ignored (for all those years). Adapted to at least write
// a polygon representing the curve as good as possible
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly);
const sal_uInt16 nPoints(aSimplePoly.GetSize());
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index b0d99c54405a..745c9d6146f1 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -62,7 +62,7 @@ namespace
{
rTarget.AddAction(
new MetaPolyLineAction(
- Polygon(aResult.getB2DPolygon(a))));
+ tools::Polygon(aResult.getB2DPolygon(a))));
}
}
else
@@ -599,11 +599,11 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
}
else
{
- const Polygon aToolsPoly(
- rRect,
- pA->GetStartPoint(),
- pA->GetEndPoint(),
- POLY_ARC);
+ const tools::Polygon aToolsPoly(
+ rRect,
+ pA->GetStartPoint(),
+ pA->GetEndPoint(),
+ POLY_ARC);
bDone = handleGeometricContent(
aClips.back(),
@@ -625,11 +625,11 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
}
else
{
- const Polygon aToolsPoly(
- rRect,
- pA->GetStartPoint(),
- pA->GetEndPoint(),
- POLY_PIE);
+ const tools::Polygon aToolsPoly(
+ rRect,
+ pA->GetStartPoint(),
+ pA->GetEndPoint(),
+ POLY_PIE);
bDone = handleGeometricContent(
aClips.back(),
@@ -651,11 +651,11 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
}
else
{
- const Polygon aToolsPoly(
- rRect,
- pA->GetStartPoint(),
- pA->GetEndPoint(),
- POLY_CHORD);
+ const tools::Polygon aToolsPoly(
+ rRect,
+ pA->GetStartPoint(),
+ pA->GetEndPoint(),
+ POLY_CHORD);
bDone = handleGeometricContent(
aClips.back(),
@@ -913,7 +913,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
else if(rComment.equalsIgnoreAsciiCase("XPATHSTROKE_SEQ_BEGIN"))
{
SvtGraphicStroke aStroke;
- Polygon aPath;
+ tools::Polygon aPath;
{ // read SvtGraphicFill
SvMemoryStream aMemStm(const_cast<sal_uInt8 *>(pA->GetData()), pA->GetDataSize(),StreamMode::READ);
@@ -939,7 +939,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
// add clipped geometry
for(sal_uInt32 a(0); a < aResult.count(); a++)
{
- aStroke.setPath(Polygon(aResult.getB2DPolygon(a)));
+ aStroke.setPath(tools::Polygon(aResult.getB2DPolygon(a)));
addSvtGraphicStroke(aStroke, aTarget);
}
@@ -949,7 +949,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
else
{
// exchange with empty polygon
- aStroke.setPath(Polygon());
+ aStroke.setPath(tools::Polygon());
addSvtGraphicStroke(aStroke, aTarget);
bDone = true;
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index fcb661159c2e..55cb26bf05f7 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -864,10 +864,10 @@ Point GDIMetaFile::ImplGetRotatedPoint( const Point& rPt, const Point& rRotatePt
-FRound( fSin * nX - fCos * nY ) + rRotatePt.Y() + rOffset.Height() );
}
-Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt,
- const Size& rOffset, double fSin, double fCos )
+tools::Polygon GDIMetaFile::ImplGetRotatedPolygon( const tools::Polygon& rPoly, const Point& rRotatePt,
+ const Size& rOffset, double fSin, double fCos )
{
- Polygon aRet( rPoly );
+ tools::Polygon aRet( rPoly );
aRet.Rotate( rRotatePt, fSin, fCos );
aRet.Move( rOffset.Width(), rOffset.Height() );
@@ -922,7 +922,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
const double fSin = sin( fAngle );
const double fCos = cos( fAngle );
Rectangle aRect=Rectangle( Point(), GetPrefSize() );
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
aPoly.Rotate( Point(), fSin, fCos );
@@ -977,7 +977,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::ROUNDRECT ):
{
MetaRoundRectAction* pAct = static_cast<MetaRoundRectAction*>(pAction);
- const Polygon aRoundRectPoly( pAct->GetRect(), pAct->GetHorzRound(), pAct->GetVertRound() );
+ const tools::Polygon aRoundRectPoly( pAct->GetRect(), pAct->GetHorzRound(), pAct->GetVertRound() );
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aRoundRectPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
@@ -986,7 +986,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::ELLIPSE ):
{
MetaEllipseAction* pAct = static_cast<MetaEllipseAction*>(pAction);
- const Polygon aEllipsePoly( pAct->GetRect().Center(), pAct->GetRect().GetWidth() >> 1, pAct->GetRect().GetHeight() >> 1 );
+ const tools::Polygon aEllipsePoly( pAct->GetRect().Center(), pAct->GetRect().GetWidth() >> 1, pAct->GetRect().GetHeight() >> 1 );
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aEllipsePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
@@ -995,7 +995,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::ARC ):
{
MetaArcAction* pAct = static_cast<MetaArcAction*>(pAction);
- const Polygon aArcPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_ARC );
+ const tools::Polygon aArcPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_ARC );
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aArcPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
@@ -1004,7 +1004,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::PIE ):
{
MetaPieAction* pAct = static_cast<MetaPieAction*>(pAction);
- const Polygon aPiePoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_PIE );
+ const tools::Polygon aPiePoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_PIE );
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aPiePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
@@ -1013,7 +1013,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::CHORD ):
{
MetaChordAction* pAct = static_cast<MetaChordAction*>(pAction);
- const Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_CHORD );
+ const tools::Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_CHORD );
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aChordPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
@@ -1075,7 +1075,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPSCALE ):
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
- Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmap() );
@@ -1088,7 +1088,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPSCALEPART ):
{
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
- Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmap() );
@@ -1102,7 +1102,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPEXSCALE ):
{
MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction);
- Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmapEx() );
@@ -1115,7 +1115,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPEXSCALEPART ):
{
MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction);
- Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmapEx() );
@@ -1202,7 +1202,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
SvtGraphicStroke aStroke;
ReadSvtGraphicStroke( aMemStm, aStroke );
- Polygon aPath;
+ tools::Polygon aPath;
aStroke.getPath( aPath );
aStroke.setPath( ImplGetRotatedPolygon( aPath, aRotAnchor, aRotOffset, fSin, fCos ) );
WriteSvtGraphicStroke( aDest, aStroke );
@@ -1256,7 +1256,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
MetaFloatTransparentAction* pAct = static_cast<MetaFloatTransparentAction*>(pAction);
GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
- Polygon aMtfPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aMtfPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aMtfRect( aMtfPoly.GetBoundRect() );
aTransMtf.Rotate( nAngle10 );
@@ -1269,7 +1269,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction);
GDIMetaFile aEPSMtf( pAct->GetSubstitute() );
- Polygon aEPSPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aEPSPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aEPSRect( aEPSPoly.GetBoundRect() );
aEPSMtf.Rotate( nAngle10 );
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index 8dfc8f3e2a5f..bc60fa093bf8 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -40,7 +40,7 @@ SvtGraphicStroke::SvtGraphicStroke() :
{
}
-SvtGraphicStroke::SvtGraphicStroke( const Polygon& rPath,
+SvtGraphicStroke::SvtGraphicStroke( const tools::Polygon& rPath,
const tools::PolyPolygon& rStartArrow,
const tools::PolyPolygon& rEndArrow,
double fTransparency,
@@ -61,7 +61,7 @@ SvtGraphicStroke::SvtGraphicStroke( const Polygon& rPath,
{
}
-void SvtGraphicStroke::getPath( Polygon& rPath ) const
+void SvtGraphicStroke::getPath( tools::Polygon& rPath ) const
{
rPath = maPath;
}
@@ -86,7 +86,7 @@ void SvtGraphicStroke::getDashArray( DashArray& rDashArray ) const
rDashArray = maDashArray;
}
-void SvtGraphicStroke::setPath( const Polygon& rPoly )
+void SvtGraphicStroke::setPath( const tools::Polygon& rPoly )
{
maPath = rPoly;
}
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 4db6d4939e99..0b3b70dee1a6 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -123,24 +123,23 @@ extern "C" int SAL_CALL ImplColorSetCmpFnc( const void* p1, const void* p2 )
class ImplPointArray
{
- Point* mpArray;
- sal_uLong mnSize;
- sal_uLong mnRealSize;
+ Point* mpArray;
+ sal_uLong mnSize;
+ sal_uLong mnRealSize;
public:
- ImplPointArray();
- ~ImplPointArray();
+ ImplPointArray();
+ ~ImplPointArray();
- void ImplSetSize( sal_uLong nSize );
+ void ImplSetSize( sal_uLong nSize );
+ sal_uLong ImplGetRealSize() const { return mnRealSize; }
+ void ImplSetRealSize( sal_uLong nRealSize ) { mnRealSize = nRealSize; }
+ void ImplCreatePoly( tools::Polygon& rPoly ) const;
- sal_uLong ImplGetRealSize() const { return mnRealSize; }
- void ImplSetRealSize( sal_uLong nRealSize ) { mnRealSize = nRealSize; }
-
- inline Point& operator[]( sal_uLong nPos );
+ inline Point& operator[]( sal_uLong nPos );
inline const Point& operator[]( sal_uLong nPos ) const;
- void ImplCreatePoly( Polygon& rPoly ) const;
};
ImplPointArray::ImplPointArray() :
@@ -183,9 +182,9 @@ inline const Point& ImplPointArray::operator[]( sal_uLong nPos ) const
return mpArray[ nPos ];
}
-void ImplPointArray::ImplCreatePoly( Polygon& rPoly ) const
+void ImplPointArray::ImplCreatePoly( tools::Polygon& rPoly ) const
{
- rPoly = Polygon( sal::static_int_cast<sal_uInt16>(mnRealSize), mpArray );
+ rPoly = tools::Polygon( sal::static_int_cast<sal_uInt16>(mnRealSize), mpArray );
}
class ImplVectMap
@@ -265,7 +264,7 @@ class ImplChain
{
private:
- Polygon maPoly;
+ tools::Polygon maPoly;
Point maStartPt;
sal_uLong mnArraySize;
sal_uLong mnCount;
@@ -285,7 +284,7 @@ public:
inline void ImplAdd( sal_uInt8 nCode );
void ImplEndAdd( sal_uLong nTypeFlag );
- const Polygon& ImplGetPoly() const { return maPoly; }
+ const tools::Polygon& ImplGetPoly() const { return maPoly; }
};
ImplChain::ImplChain( sal_uLong nInitCount, long nResize ) :
@@ -316,7 +315,7 @@ void ImplChain::ImplGetSpace()
void ImplChain::ImplBeginAdd( const Point& rStartPt )
{
- maPoly = Polygon();
+ maPoly = tools::Polygon();
maStartPt = rStartPt;
mnCount = 0UL;
}
@@ -776,7 +775,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp,
for( ; nCurPoly < nCount; ++nCurPoly )
{
- const Polygon& rPoly = rPolyPoly.GetObject( nCurPoly );
+ const tools::Polygon& rPoly = rPolyPoly.GetObject( nCurPoly );
const sal_uInt16 nSize( rPoly.GetSize() );
sal_uInt16 nDepth( 0 ), i( 0 );
const bool bRight( rPoly.IsRightOrientated() );
@@ -789,7 +788,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp,
if( nSize && ( ( !bRight && !bHole ) || ( bRight && bHole ) ) )
{
- Polygon aNewPoly( nSize );
+ tools::Polygon aNewPoly( nSize );
sal_uInt16 nPrim( 0 ), nSec( nSize - 1 );
if( rPoly.HasFlags() )
@@ -814,7 +813,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp,
// put outmost polygon to the front
if( nFirstPoly > 0 )
{
- const Polygon aFirst( rPolyPoly.GetObject( static_cast< sal_uInt16 >( nFirstPoly ) ) );
+ const tools::Polygon aFirst( rPolyPoly.GetObject( static_cast< sal_uInt16 >( nFirstPoly ) ) );
rPolyPoly.Remove( static_cast< sal_uInt16 >( nFirstPoly ) );
rPolyPoly.Insert( aFirst, 0 );
@@ -980,7 +979,7 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8
else
aChain.ImplEndAdd( bInner ? VECT_POLY_OUTLINE_INNER : VECT_POLY_OUTLINE_OUTER );
- const Polygon& rPoly = aChain.ImplGetPoly();
+ const tools::Polygon& rPoly = aChain.ImplGetPoly();
if( rPoly.GetSize() > 2 )
{
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 0888653bfd85..0d1bb1ba831c 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -125,7 +125,7 @@ inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY )
rRect.Justify();
}
-inline void ImplScalePoly( Polygon& rPoly, double fScaleX, double fScaleY )
+inline void ImplScalePoly( tools::Polygon& rPoly, double fScaleX, double fScaleY )
{
for( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
ImplScalePoint( rPoly[ i ], fScaleX, fScaleY );
@@ -769,12 +769,12 @@ MetaPolyLineAction::MetaPolyLineAction() :
MetaPolyLineAction::~MetaPolyLineAction()
{}
-MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly ) :
+MetaPolyLineAction::MetaPolyLineAction( const tools::Polygon& rPoly ) :
MetaAction ( MetaActionType::POLYLINE ),
maPoly ( rPoly )
{}
-MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly, const LineInfo& rLineInfo ) :
+MetaPolyLineAction::MetaPolyLineAction( const tools::Polygon& rPoly, const LineInfo& rLineInfo ) :
MetaAction ( MetaActionType::POLYLINE ),
maLineInfo ( rLineInfo ),
maPoly ( rPoly )
@@ -811,7 +811,7 @@ void MetaPolyLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
MetaAction::Write(rOStm, pData);
VersionCompat aCompat(rOStm, StreamMode::WRITE, 3);
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
maPoly.AdaptiveSubdivide( aSimplePoly );
WritePolygon( rOStm, aSimplePoly ); // Version 1
@@ -849,7 +849,7 @@ MetaPolygonAction::MetaPolygonAction() :
MetaPolygonAction::~MetaPolygonAction()
{}
-MetaPolygonAction::MetaPolygonAction( const Polygon& rPoly ) :
+MetaPolygonAction::MetaPolygonAction( const tools::Polygon& rPoly ) :
MetaAction ( MetaActionType::POLYGON ),
maPoly ( rPoly )
{}
@@ -881,7 +881,7 @@ void MetaPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
MetaAction::Write(rOStm, pData);
VersionCompat aCompat(rOStm, StreamMode::WRITE, 2);
- Polygon aSimplePoly; // Version 1
+ tools::Polygon aSimplePoly; // Version 1
maPoly.AdaptiveSubdivide( aSimplePoly );
WritePolygon( rOStm, aSimplePoly );
@@ -949,11 +949,11 @@ void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
sal_uInt16 nNumberOfComplexPolygons = 0;
sal_uInt16 i, nPolyCount = maPolyPoly.Count();
- Polygon aSimplePoly; // Version 1
+ tools::Polygon aSimplePoly; // Version 1
rOStm.WriteUInt16( nPolyCount );
for ( i = 0; i < nPolyCount; i++ )
{
- const Polygon& rPoly = maPolyPoly.GetObject( i );
+ const tools::Polygon& rPoly = maPolyPoly.GetObject( i );
if ( rPoly.HasFlags() )
nNumberOfComplexPolygons++;
rPoly.AdaptiveSubdivide( aSimplePoly );
@@ -963,7 +963,7 @@ void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
rOStm.WriteUInt16( nNumberOfComplexPolygons ); // Version 2
for ( i = 0; nNumberOfComplexPolygons && ( i < nPolyCount ); i++ )
{
- const Polygon& rPoly = maPolyPoly.GetObject( i );
+ const tools::Polygon& rPoly = maPolyPoly.GetObject( i );
if ( rPoly.HasFlags() )
{
rOStm.WriteUInt16( i );
@@ -995,7 +995,7 @@ void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
sal_uInt16 nIndex(0);
rIStm.ReadUInt16( nIndex );
- Polygon aPoly;
+ tools::Polygon aPoly;
aPoly.Read( rIStm );
if (nIndex >= maPolyPoly.Count())
{
@@ -3238,7 +3238,7 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
SvtGraphicStroke aStroke;
ReadSvtGraphicStroke( aMemStm, aStroke );
- Polygon aPath;
+ tools::Polygon aPath;
aStroke.getPath( aPath );
aPath.Move( nXMove, nYMove );
aStroke.setPath( aPath );
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 85fae2d4b181..885bf7160acd 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -116,12 +116,12 @@ void PDFWriter::DrawLine( const Point& rStart, const Point& rStop, const LineInf
xImplementation->drawLine( rStart, rStop, rInfo );
}
-void PDFWriter::DrawPolygon( const Polygon& rPoly )
+void PDFWriter::DrawPolygon( const tools::Polygon& rPoly )
{
xImplementation->drawPolygon( rPoly );
}
-void PDFWriter::DrawPolyLine( const Polygon& rPoly )
+void PDFWriter::DrawPolyLine( const tools::Polygon& rPoly )
{
xImplementation->drawPolyLine( rPoly );
}
@@ -156,12 +156,12 @@ void PDFWriter::DrawChord( const Rectangle& rRect, const Point& rStart, const Po
xImplementation->drawArc( rRect, rStart, rStop, false, true );
}
-void PDFWriter::DrawPolyLine( const Polygon& rPoly, const LineInfo& rInfo )
+void PDFWriter::DrawPolyLine( const tools::Polygon& rPoly, const LineInfo& rInfo )
{
xImplementation->drawPolyLine( rPoly, rInfo );
}
-void PDFWriter::DrawPolyLine( const Polygon& rPoly, const ExtLineInfo& rInfo )
+void PDFWriter::DrawPolyLine( const tools::Polygon& rPoly, const ExtLineInfo& rInfo )
{
xImplementation->drawPolyLine( rPoly, rInfo );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index d8fb926be439..36d96e9e3741 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -337,7 +337,7 @@ void doTestCode()
Point aLIPoints[] = { Point( 4000, 10000 ),
Point( 8000, 12000 ),
Point( 3000, 19000 ) };
- Polygon aLIPoly( 3, aLIPoints );
+ tools::Polygon aLIPoly( 3, aLIPoints );
aWriter.SetLineColor( Color( COL_BLUE ) );
aWriter.SetFillColor();
aWriter.DrawPolyLine( aLIPoly, aLI );
@@ -1458,7 +1458,7 @@ void PDFWriterImpl::PDFPage::convertRect( Rectangle& rRect ) const
rRect.Bottom() = rRect.Top() + aSize.Height();
}
-void PDFWriterImpl::PDFPage::appendPolygon( const Polygon& rPoly, OStringBuffer& rBuffer, bool bClose ) const
+void PDFWriterImpl::PDFPage::appendPolygon( const tools::Polygon& rPoly, OStringBuffer& rBuffer, bool bClose ) const
{
sal_uInt16 nPoints = rPoly.GetSize();
/*
@@ -9241,7 +9241,7 @@ void PDFWriterImpl::drawEmphasisMark( long nX, long nY,
{
if ( bPolyLine )
{
- Polygon aPoly = rPolyPoly.GetObject( 0 );
+ tools::Polygon aPoly = rPolyPoly.GetObject( 0 );
aPoly.Move( nX, nY );
drawPolyLine( aPoly );
}
@@ -9498,7 +9498,7 @@ void PDFWriterImpl::drawLine( const Point& rStart, const Point& rStop, const Lin
PDFWriter::ExtLineInfo aInfo;
convertLineInfoToExtLineInfo( rInfo, aInfo );
Point aPolyPoints[2] = { rStart, rStop };
- Polygon aPoly( 2, aPolyPoints );
+ tools::Polygon aPoly( 2, aPolyPoints );
drawPolyLine( aPoly, aInfo );
}
}
@@ -9847,7 +9847,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
if (pFontEntry->mnOrientation)
{
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
aPoly.Rotate( rPos, pFontEntry->mnOrientation);
aRect = aPoly.GetBoundRect();
}
@@ -9952,7 +9952,7 @@ void PDFWriterImpl::drawTextLine( const Point& rPos, long nWidth, FontStrikeout
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-void PDFWriterImpl::drawPolygon( const Polygon& rPoly )
+void PDFWriterImpl::drawPolygon( const tools::Polygon& rPoly )
{
MARK( "drawPolygon" );
@@ -10480,7 +10480,7 @@ void PDFWriterImpl::drawArc( const Rectangle& rRect, const Point& rStart, const
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-void PDFWriterImpl::drawPolyLine( const Polygon& rPoly )
+void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly )
{
MARK( "drawPolyLine" );
@@ -10500,7 +10500,7 @@ void PDFWriterImpl::drawPolyLine( const Polygon& rPoly )
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-void PDFWriterImpl::drawPolyLine( const Polygon& rPoly, const LineInfo& rInfo )
+void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const LineInfo& rInfo )
{
MARK( "drawPolyLine with LineInfo" );
@@ -10598,7 +10598,7 @@ void PDFWriterImpl::convertLineInfoToExtLineInfo( const LineInfo& rIn, PDFWriter
}
}
-void PDFWriterImpl::drawPolyLine( const Polygon& rPoly, const PDFWriter::ExtLineInfo& rInfo )
+void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const PDFWriter::ExtLineInfo& rInfo )
{
MARK( "drawPolyLine with ExtLineInfo" );
@@ -11079,7 +11079,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
{
aLine.append("/Domain[ 0 1 ]\n"
"/Coords[ " );
- Polygon aPoly( 2 );
+ tools::Polygon aPoly( 2 );
aPoly[0] = aBoundRect.BottomCenter();
aPoly[1] = aBoundRect.TopCenter();
aPoly.Rotate( aCenter, 3600 - nAngle );
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index ccd8ada7ce18..aa941d9eb369 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -145,7 +145,7 @@ public:
// converts a rectangle to 10th points page space
void convertRect( Rectangle& rRect ) const;
// appends a polygon optionally closing it
- void appendPolygon( const Polygon& rPoly, OStringBuffer& rBuffer, bool bClose = true ) const;
+ void appendPolygon( const tools::Polygon& rPoly, OStringBuffer& rBuffer, bool bClose = true ) const;
// appends a polygon optionally closing it
void appendPolygon( const basegfx::B2DPolygon& rPoly, OStringBuffer& rBuffer, bool bClose = true ) const;
// appends a polypolygon optionally closing the subpaths
@@ -1215,11 +1215,11 @@ public:
void drawLine( const Point& rStart, const Point& rStop );
void drawLine( const Point& rStart, const Point& rStop, const LineInfo& rInfo );
- void drawPolygon( const Polygon& rPoly );
+ void drawPolygon( const tools::Polygon& rPoly );
void drawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
- void drawPolyLine( const Polygon& rPoly );
- void drawPolyLine( const Polygon& rPoly, const LineInfo& rInfo );
- void drawPolyLine( const Polygon& rPoly, const PDFWriter::ExtLineInfo& rInfo );
+ void drawPolyLine( const tools::Polygon& rPoly );
+ void drawPolyLine( const tools::Polygon& rPoly, const LineInfo& rInfo );
+ void drawPolyLine( const tools::Polygon& rPoly, const PDFWriter::ExtLineInfo& rInfo );
void drawPixel( const Point& rPt, const Color& rColor );
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index cf734cc95a07..95f07fa94855 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -560,7 +560,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
SvtGraphicStroke aStroke;
ReadSvtGraphicStroke( aMemStm, aStroke );
- Polygon aPath;
+ tools::Polygon aPath;
aStroke.getPath( aPath );
tools::PolyPolygon aStartArrow;
@@ -619,7 +619,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
&& POLY_NORMAL != aPath.GetFlags(a + 2)
&& a + 3 < nPoints)
{
- const Polygon aSnippet(4,
+ const tools::Polygon aSnippet(4,
aPath.GetConstPointAry() + a,
aPath.GetConstFlagAry() + a);
m_rOuterFace.DrawPolyLine( aSnippet, aInfo );
@@ -627,7 +627,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
else
{
- const Polygon aSnippet(2,
+ const tools::Polygon aSnippet(2,
aPath.GetConstPointAry() + a);
m_rOuterFace.DrawPolyLine( aSnippet, aInfo );
}
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index c07d3ebb857c..1bb93c90e353 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -429,36 +429,36 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
break;
case MetaActionType::ROUNDRECT:
- aActionBounds = Polygon( static_cast<const MetaRoundRectAction&>(rAct).GetRect(),
- static_cast<const MetaRoundRectAction&>(rAct).GetHorzRound(),
- static_cast<const MetaRoundRectAction&>(rAct).GetVertRound() ).GetBoundRect();
+ aActionBounds = tools::Polygon( static_cast<const MetaRoundRectAction&>(rAct).GetRect(),
+ static_cast<const MetaRoundRectAction&>(rAct).GetHorzRound(),
+ static_cast<const MetaRoundRectAction&>(rAct).GetVertRound() ).GetBoundRect();
break;
case MetaActionType::ELLIPSE:
{
const Rectangle& rRect = static_cast<const MetaEllipseAction&>(rAct).GetRect();
- aActionBounds = Polygon( rRect.Center(),
- rRect.GetWidth() >> 1,
- rRect.GetHeight() >> 1 ).GetBoundRect();
+ aActionBounds = tools::Polygon( rRect.Center(),
+ rRect.GetWidth() >> 1,
+ rRect.GetHeight() >> 1 ).GetBoundRect();
break;
}
case MetaActionType::ARC:
- aActionBounds = Polygon( static_cast<const MetaArcAction&>(rAct).GetRect(),
- static_cast<const MetaArcAction&>(rAct).GetStartPoint(),
- static_cast<const MetaArcAction&>(rAct).GetEndPoint(), POLY_ARC ).GetBoundRect();
+ aActionBounds = tools::Polygon( static_cast<const MetaArcAction&>(rAct).GetRect(),
+ static_cast<const MetaArcAction&>(rAct).GetStartPoint(),
+ static_cast<const MetaArcAction&>(rAct).GetEndPoint(), POLY_ARC ).GetBoundRect();
break;
case MetaActionType::PIE:
- aActionBounds = Polygon( static_cast<const MetaPieAction&>(rAct).GetRect(),
- static_cast<const MetaPieAction&>(rAct).GetStartPoint(),
- static_cast<const MetaPieAction&>(rAct).GetEndPoint(), POLY_PIE ).GetBoundRect();
+ aActionBounds = tools::Polygon( static_cast<const MetaPieAction&>(rAct).GetRect(),
+ static_cast<const MetaPieAction&>(rAct).GetStartPoint(),
+ static_cast<const MetaPieAction&>(rAct).GetEndPoint(), POLY_PIE ).GetBoundRect();
break;
case MetaActionType::CHORD:
- aActionBounds = Polygon( static_cast<const MetaChordAction&>(rAct).GetRect(),
- static_cast<const MetaChordAction&>(rAct).GetStartPoint(),
- static_cast<const MetaChordAction&>(rAct).GetEndPoint(), POLY_CHORD ).GetBoundRect();
+ aActionBounds = tools::Polygon( static_cast<const MetaChordAction&>(rAct).GetRect(),
+ static_cast<const MetaChordAction&>(rAct).GetStartPoint(),
+ static_cast<const MetaChordAction&>(rAct).GetEndPoint(), POLY_CHORD ).GetBoundRect();
break;
case MetaActionType::POLYLINE:
@@ -774,7 +774,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
}
case MetaActionType::POLYGON:
{
- const Polygon aPoly(
+ const tools::Polygon aPoly(
static_cast<const MetaPolygonAction*>(pCurrAct)->GetPolygon());
if( !basegfx::tools::isRectangle(
aPoly.getB2DPolygon()) ||
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 493a02204255..0991ac46b34b 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -44,7 +44,7 @@ namespace
const sal_uInt16 nPolyCount = rPolyPoly.Count();
for (sal_uInt16 nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
- const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
+ const tools::Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
const sal_uInt16 nSize = aPoly.GetSize();
@@ -95,7 +95,7 @@ namespace
const sal_uInt16 nPolyCount = rPolyPoly.Count();
for (sal_uInt16 nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
- const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
+ const tools::Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
const sal_uInt16 nSize = aPoly.GetSize();
@@ -195,7 +195,7 @@ namespace
for ( sal_uInt16 nPoly = 0; nPoly < nPolyCount; nPoly++ )
{
// get reference to current polygon
- const Polygon& aPoly = rPolyPoly.GetObject( nPoly );
+ const tools::Polygon& aPoly = rPolyPoly.GetObject( nPoly );
const sal_uInt16 nSize = aPoly.GetSize();
// not enough points ( <= 2 )? -> nothing to do!
@@ -289,7 +289,7 @@ tools::PolyPolygon vcl::Region::ImplCreatePolyPolygonFromRegionBand() const
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
{
- aRetval.Insert(Polygon(*aRectIter));
+ aRetval.Insert( tools::Polygon(*aRectIter) );
}
}
else
@@ -324,7 +324,7 @@ Region::Region(const Rectangle& rRect)
mpRegionBand.reset(rRect.IsEmpty() ? 0 : new RegionBand(rRect));
}
-Region::Region(const Polygon& rPolygon)
+Region::Region(const tools::Polygon& rPolygon)
: mpB2DPolyPolygon(),
mpPolyPolygon(),
mpRegionBand(),
@@ -1682,7 +1682,7 @@ void vcl::Region::GetRegionRectangles(RectangleVector& rTarget) const
}
}
-static inline bool ImplPolygonRectTest( const Polygon& rPoly, Rectangle* pRectOut = NULL )
+static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, Rectangle* pRectOut = NULL )
{
bool bIsRect = false;
const Point* pPoints = rPoly.GetConstPointAry();
@@ -1748,7 +1748,7 @@ vcl::Region vcl::Region::GetRegionFromPolyPolygon( const tools::PolyPolygon& rPo
for( int i = 0; i < nPolygons; i++ )
{
- const Polygon& rPoly = rPolyPoly[i];
+ const tools::Polygon& rPoly = rPolyPoly[i];
if( ImplPolygonRectTest( rPoly ) )
{
@@ -1770,7 +1770,7 @@ vcl::Region vcl::Region::GetRegionFromPolyPolygon( const tools::PolyPolygon& rPo
for( int i = 0; i < nPolygons; i++ )
{
- const Polygon& rPoly = rPolyPoly[i];
+ const tools::Polygon& rPoly = rPolyPoly[i];
if( ImplPolygonRectTest( rPoly, &aRect ) )
{
diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx
index 342d5e8ba8b8..a086a81f76f6 100644
--- a/vcl/source/outdev/curvedshapes.cxx
+++ b/vcl/source/outdev/curvedshapes.cxx
@@ -54,7 +54,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect )
if ( mbInitLineColor )
InitLineColor();
- Polygon aRectPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
+ tools::Polygon aRectPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
if ( aRectPoly.GetSize() >= 2 )
{
const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(aRectPoly.GetConstPointAry());
@@ -104,7 +104,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect,
const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aArcPoly( aRect, aStart, aEnd, POLY_ARC );
+ tools::Polygon aArcPoly( aRect, aStart, aEnd, POLY_ARC );
if ( aArcPoly.GetSize() >= 2 )
{
@@ -148,7 +148,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect,
const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aPiePoly( aRect, aStart, aEnd, POLY_PIE );
+ tools::Polygon aPiePoly( aRect, aStart, aEnd, POLY_PIE );
if ( aPiePoly.GetSize() >= 2 )
{
@@ -199,7 +199,7 @@ void OutputDevice::DrawChord( const Rectangle& rRect,
const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aChordPoly( aRect, aStart, aEnd, POLY_CHORD );
+ tools::Polygon aChordPoly( aRect, aStart, aEnd, POLY_CHORD );
if ( aChordPoly.GetSize() >= 2 )
{
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 9f2884cebdf9..a28ff0668530 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -358,7 +358,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
else
{
long nRad = nDotSize/2;
- Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
+ tools::Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
rPolyPoly.Insert( aPoly );
}
rYOff = ((nHeight*250)/1000)/2; // Center to the another EmphasisMarks
@@ -375,7 +375,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
else
{
long nRad = nDotSize/2;
- Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
+ tools::Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
rPolyPoly.Insert( aPoly );
// BorderWidth is 15%
long nBorder = (nDotSize*150)/1000;
@@ -383,8 +383,8 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
rPolyLine = true;
else
{
- Polygon aPoly2( Point( nRad, nRad ),
- nRad-nBorder, nRad-nBorder );
+ tools::Polygon aPoly2( Point( nRad, nRad ),
+ nRad-nBorder, nRad-nBorder );
rPolyPoly.Insert( aPoly2 );
}
}
@@ -401,7 +401,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
else
{
long nRad = nDotSize/2;
- Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
+ tools::Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
rPolyPoly.Insert( aPoly );
}
rWidth = nDotSize;
@@ -427,12 +427,12 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
}
else
{
- Polygon aPoly( sizeof( aAccentPos ) / sizeof( long ) / 2,
- reinterpret_cast<const Point*>(aAccentPos),
- aAccentPolyFlags );
+ tools::Polygon aPoly( sizeof( aAccentPos ) / sizeof( long ) / 2,
+ reinterpret_cast<const Point*>(aAccentPos),
+ aAccentPolyFlags );
double dScale = ((double)nDotSize)/1000.0;
aPoly.Scale( dScale, dScale );
- Polygon aTemp;
+ tools::Polygon aTemp;
aPoly.AdaptiveSubdivide( aTemp );
Rectangle aBoundRect = aTemp.GetBoundRect();
rWidth = aBoundRect.GetWidth();
@@ -1918,7 +1918,7 @@ void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY,
{
if ( bPolyLine )
{
- Polygon aPoly = rPolyPoly.GetObject( 0 );
+ tools::Polygon aPoly = rPolyPoly.GetObject( 0 );
aPoly.Move( nX, nY );
DrawPolyLine( aPoly );
}
@@ -1956,7 +1956,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
EnableMapMode( false );
FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont );
- tools::PolyPolygon aPolyPoly;
+ tools::PolyPolygon aPolyPoly;
Rectangle aRect1;
Rectangle aRect2;
long nEmphasisYOff;
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 75520bee5111..5222c1e60dca 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -37,7 +37,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
assert(!is_double_buffered_window());
// Convert rectangle to a tools::PolyPolygon by first converting to a Polygon
- Polygon aPolygon ( rRect );
+ tools::Polygon aPolygon ( rRect );
tools::PolyPolygon aPolyPoly ( aPolygon );
DrawGradient ( aPolyPoly, rGradient );
@@ -323,7 +323,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
// Create border
Rectangle aBorderRect = aRect;
- Polygon aPoly( 4 );
+ tools::Polygon aPoly( 4 );
if (fBorder > 0.0)
{
nRed = (sal_uInt8)nStartRed;
@@ -498,7 +498,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
nSteps = 1;
// determine output limits and stepsizes for all directions
- Polygon aPoly;
+ tools::Polygon aPoly;
double fScanLeft = aRect.Left();
double fScanTop = aRect.Top();
double fScanRight = aRect.Right();
@@ -550,9 +550,9 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
break;
if( rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL )
- aPoly = Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
+ aPoly = tools::Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
else
- aPoly = Polygon( aRect );
+ aPoly = tools::Polygon( aRect );
aPoly.Rotate( aCenter, nAngle );
@@ -593,7 +593,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
// we should draw last inner Polygon if we output PolyPolygon
if( xPolyPoly )
{
- const Polygon& rPoly = xPolyPoly->GetObject( 1 );
+ const tools::Polygon& rPoly = xPolyPoly->GetObject( 1 );
if( !rPoly.GetBoundRect().IsEmpty() )
{
@@ -677,7 +677,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect,
// Create border
Rectangle aBorderRect = aRect;
- Polygon aPoly( 4 );
+ tools::Polygon aPoly( 4 );
if (fBorder > 0.0)
{
nRed = (sal_uInt8)nStartRed;
@@ -842,7 +842,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
nSteps = 1;
// determine output limits and stepsizes for all directions
- Polygon aPoly;
+ tools::Polygon aPoly;
double fScanLeft = aRect.Left();
double fScanTop = aRect.Top();
double fScanRight = aRect.Right();
@@ -879,9 +879,9 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
break;
if( rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL )
- aPoly = Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
+ aPoly = tools::Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
else
- aPoly = Polygon( aRect );
+ aPoly = tools::Polygon( aRect );
aPoly.Rotate( aCenter, nAngle );
@@ -908,7 +908,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) );
}
- const Polygon& rPoly = xPolyPoly->GetObject( 1 );
+ const tools::Polygon& rPoly = xPolyPoly->GetObject( 1 );
if( !rPoly.GetBoundRect().IsEmpty() )
{
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 4c992b6f476e..076ff8b46742 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -331,7 +331,7 @@ void OutputDevice::DrawHatchLine( const Line& rLine, const tools::PolyPolygon& r
for( long nPoly = 0, nPolyCount = rPolyPoly.Count(); nPoly < nPolyCount; nPoly++ )
{
- const Polygon& rPoly = rPolyPoly[ (sal_uInt16) nPoly ];
+ const tools::Polygon& rPoly = rPolyPoly[ (sal_uInt16) nPoly ];
if( rPoly.GetSize() > 1 )
{
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index 1a8a3f5536e8..2e76acf2ef7d 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -241,7 +241,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
if(!bDone)
{
- const Polygon aPolygon(aCandidate);
+ const tools::Polygon aPolygon(aCandidate);
mpGraphics->DrawPolyLine(aPolygon.GetSize(), reinterpret_cast<const SalPoint*>(aPolygon.GetConstPointAry()), this);
}
}
@@ -268,7 +268,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
{
for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++)
{
- Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
+ tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
// need to subdivide, mpGraphics->DrawPolygon ignores curves
aPolygon.AdaptiveSubdivide(aPolygon);
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index b90f7e75bb15..96d96e43ec02 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -540,14 +540,14 @@ Rectangle OutputDevice::ImplLogicToDevicePixel( const Rectangle& rLogicRect ) co
maThresRes.mnThresLogToPixY )+mnOutOffY+mnOutOffOrigY );
}
-Polygon OutputDevice::ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const
+tools::Polygon OutputDevice::ImplLogicToDevicePixel( const tools::Polygon& rLogicPoly ) const
{
if ( !mbMap && !mnOutOffX && !mnOutOffY )
return rLogicPoly;
sal_uInt16 i;
sal_uInt16 nPoints = rLogicPoly.GetSize();
- Polygon aPoly( rLogicPoly );
+ tools::Polygon aPoly( rLogicPoly );
// get pointer to Point-array (copy data)
const Point* pPointAry = aPoly.GetConstPointAry();
@@ -590,7 +590,7 @@ tools::PolyPolygon OutputDevice::ImplLogicToDevicePixel( const tools::PolyPolygo
sal_uInt16 nPoly = aPolyPoly.Count();
for( sal_uInt16 i = 0; i < nPoly; i++ )
{
- Polygon& rPoly = aPolyPoly[i];
+ tools::Polygon& rPoly = aPolyPoly[i];
rPoly = ImplLogicToDevicePixel( rPoly );
}
return aPolyPoly;
@@ -1009,7 +1009,7 @@ Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect ) const
maThresRes.mnThresLogToPixY )+mnOutOffOrigY );
}
-Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly ) const
+tools::Polygon OutputDevice::LogicToPixel( const tools::Polygon& rLogicPoly ) const
{
if ( !mbMap )
@@ -1017,7 +1017,7 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly ) const
sal_uInt16 i;
sal_uInt16 nPoints = rLogicPoly.GetSize();
- Polygon aPoly( rLogicPoly );
+ tools::Polygon aPoly( rLogicPoly );
// get pointer to Point-array (copy data)
const Point* pPointAry = aPoly.GetConstPointAry();
@@ -1048,7 +1048,7 @@ tools::PolyPolygon OutputDevice::LogicToPixel( const tools::PolyPolygon& rLogicP
sal_uInt16 nPoly = aPolyPoly.Count();
for( sal_uInt16 i = 0; i < nPoly; i++ )
{
- Polygon& rPoly = aPolyPoly[i];
+ tools::Polygon& rPoly = aPolyPoly[i];
rPoly = LogicToPixel( rPoly );
}
return aPolyPoly;
@@ -1162,8 +1162,8 @@ Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect,
aThresRes.mnThresLogToPixY )+mnOutOffOrigY );
}
-Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly,
- const MapMode& rMapMode ) const
+tools::Polygon OutputDevice::LogicToPixel( const tools::Polygon& rLogicPoly,
+ const MapMode& rMapMode ) const
{
if ( rMapMode.IsDefault() )
@@ -1176,7 +1176,7 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly,
sal_uInt16 i;
sal_uInt16 nPoints = rLogicPoly.GetSize();
- Polygon aPoly( rLogicPoly );
+ tools::Polygon aPoly( rLogicPoly );
// get pointer to Point-array (copy data)
const Point* pPointAry = aPoly.GetConstPointAry();
@@ -1254,7 +1254,7 @@ Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect ) const
maThresRes.mnThresPixToLogY ) - maMapRes.mnMapOfsY - mnOutOffLogicY );
}
-Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly ) const
+tools::Polygon OutputDevice::PixelToLogic( const tools::Polygon& rDevicePoly ) const
{
if ( !mbMap )
@@ -1262,7 +1262,7 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly ) const
sal_uInt16 i;
sal_uInt16 nPoints = rDevicePoly.GetSize();
- Polygon aPoly( rDevicePoly );
+ tools::Polygon aPoly( rDevicePoly );
// get pointer to Point-array (copy data)
const Point* pPointAry = aPoly.GetConstPointAry();
@@ -1293,7 +1293,7 @@ tools::PolyPolygon OutputDevice::PixelToLogic( const tools::PolyPolygon& rDevice
sal_uInt16 nPoly = aPolyPoly.Count();
for( sal_uInt16 i = 0; i < nPoly; i++ )
{
- Polygon& rPoly = aPolyPoly[i];
+ tools::Polygon& rPoly = aPolyPoly[i];
rPoly = PixelToLogic( rPoly );
}
return aPolyPoly;
@@ -1410,8 +1410,8 @@ Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect,
aThresRes.mnThresPixToLogY ) - aMapRes.mnMapOfsY - mnOutOffLogicY );
}
-Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly,
- const MapMode& rMapMode ) const
+tools::Polygon OutputDevice::PixelToLogic( const tools::Polygon& rDevicePoly,
+ const MapMode& rMapMode ) const
{
// calculate nothing if default-MapMode
@@ -1425,7 +1425,7 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly,
sal_uInt16 i;
sal_uInt16 nPoints = rDevicePoly.GetSize();
- Polygon aPoly( rDevicePoly );
+ tools::Polygon aPoly( rDevicePoly );
// get pointer to Point-array (copy data)
const Point* pPointAry = aPoly.GetConstPointAry();
diff --git a/vcl/source/outdev/pixel.cxx b/vcl/source/outdev/pixel.cxx
index bfa838430c70..ff9772aff3e3 100644
--- a/vcl/source/outdev/pixel.cxx
+++ b/vcl/source/outdev/pixel.cxx
@@ -111,7 +111,7 @@ void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor )
mpAlphaVDev->DrawPixel( rPt );
}
-void OutputDevice::DrawPixel( const Polygon& rPts, const Color* pColors )
+void OutputDevice::DrawPixel( const tools::Polygon& rPts, const Color* pColors )
{
assert(!is_double_buffered_window());
@@ -158,7 +158,7 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color* pColors )
mpAlphaVDev->DrawPixel( rPts, pColors );
}
-void OutputDevice::DrawPixel( const Polygon& rPts, const Color& rColor )
+void OutputDevice::DrawPixel( const tools::Polygon& rPts, const Color& rColor )
{
assert(!is_double_buffered_window());
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index b5b790fe1c5d..dca527b004ee 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -110,7 +110,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
if ( nPoly == 1 )
{
// #100127# Map to DrawPolygon
- Polygon aPoly = rPolyPoly.GetObject( 0 );
+ tools::Polygon aPoly = rPolyPoly.GetObject( 0 );
if( aPoly.GetSize() >= 2 )
{
GDIMetaFile* pOldMF = mpMetaFile;
@@ -144,7 +144,7 @@ void OutputDevice::DrawPolygon( const basegfx::B2DPolygon& rB2DPolygon)
}
}
-void OutputDevice::DrawPolygon( const Polygon& rPoly )
+void OutputDevice::DrawPolygon( const tools::Polygon& rPoly )
{
assert(!is_double_buffered_window());
@@ -214,7 +214,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
}
}
- Polygon aPoly = ImplLogicToDevicePixel( rPoly );
+ tools::Polygon aPoly = ImplLogicToDevicePixel( rPoly );
const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
// #100127# Forward beziers to sal, if any
@@ -223,7 +223,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry();
if( !mpGraphics->DrawPolygonBezier( nPoints, pPtAry, pFlgAry, this ) )
{
- aPoly = Polygon::SubdivideBezier(aPoly);
+ aPoly = tools::Polygon::SubdivideBezier(aPoly);
pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
mpGraphics->DrawPolygon( aPoly.GetSize(), pPtAry, this );
}
@@ -355,7 +355,7 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg
do
{
- const Polygon& rPoly = rPolyPoly.GetObject( i );
+ const tools::Polygon& rPoly = rPolyPoly.GetObject( i );
sal_uInt16 nSize = rPoly.GetSize();
if ( nSize )
{
@@ -380,7 +380,7 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg
{
if( !mpGraphics->DrawPolygonBezier( *pPointAry, *pPointAryAry, *pFlagAryAry, this ) )
{
- Polygon aPoly = Polygon::SubdivideBezier( rPolyPoly.GetObject( last ) );
+ tools::Polygon aPoly = tools::Polygon::SubdivideBezier( rPolyPoly.GetObject( last ) );
mpGraphics->DrawPolygon( aPoly.GetSize(), reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry()), this );
}
}
@@ -414,7 +414,7 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg
}
}
-void OutputDevice::ImplDrawPolygon( const Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly )
+void OutputDevice::ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly )
{
if( pClipPolyPoly )
{
@@ -447,7 +447,7 @@ void OutputDevice::ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, con
}
if( pPolyPoly->Count() == 1 )
{
- const Polygon rPoly = pPolyPoly->GetObject( 0 );
+ const tools::Polygon rPoly = pPolyPoly->GetObject( 0 );
sal_uInt16 nSize = rPoly.GetSize();
if( nSize >= 2 )
@@ -464,7 +464,7 @@ void OutputDevice::ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, con
sal_uInt16 i = 0;
do
{
- const Polygon& rPoly = pPolyPoly->GetObject( i );
+ const tools::Polygon& rPoly = pPolyPoly->GetObject( i );
sal_uInt16 nSize = rPoly.GetSize();
if ( nSize )
{
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index 72af39df2d37..18f5d625a6b0 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -32,7 +32,7 @@
#include "salgdi.hxx"
-void OutputDevice::DrawPolyLine( const Polygon& rPoly )
+void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly )
{
assert(!is_double_buffered_window());
@@ -79,7 +79,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
}
}
- Polygon aPoly = ImplLogicToDevicePixel( rPoly );
+ tools::Polygon aPoly = ImplLogicToDevicePixel( rPoly );
const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
// #100127# Forward beziers to sal, if any
@@ -88,7 +88,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry();
if( !mpGraphics->DrawPolyLineBezier( nPoints, pPtAry, pFlgAry, this ) )
{
- aPoly = Polygon::SubdivideBezier(aPoly);
+ aPoly = tools::Polygon::SubdivideBezier(aPoly);
pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
mpGraphics->DrawPolyLine( aPoly.GetSize(), pPtAry, this );
}
@@ -102,7 +102,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
mpAlphaVDev->DrawPolyLine( rPoly );
}
-void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo )
+void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly, const LineInfo& rLineInfo )
{
assert(!is_double_buffered_window());
@@ -140,7 +140,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
if( fLineWidth != 0.0 )
aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
- const Polygon aToolsPolygon( rB2DPolygon );
+ const tools::Polygon aToolsPolygon( rB2DPolygon );
mpMetaFile->AddAction( new MetaPolyLineAction( aToolsPolygon, aLineInfo ) );
}
@@ -214,7 +214,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
else
{
// fallback to old polygon drawing if needed
- const Polygon aToolsPolygon( rB2DPolygon );
+ const tools::Polygon aToolsPolygon( rB2DPolygon );
LineInfo aLineInfo;
if( fLineWidth != 0.0 )
aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
@@ -223,14 +223,14 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
}
}
-void OutputDevice::drawPolyLine(const Polygon& rPoly, const LineInfo& rLineInfo)
+void OutputDevice::drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLineInfo)
{
sal_uInt16 nPoints(rPoly.GetSize());
if ( !IsDeviceOutputNecessary() || !mbLineColor || ( nPoints < 2 ) || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() )
return;
- Polygon aPoly = ImplLogicToDevicePixel( rPoly );
+ tools::Polygon aPoly = ImplLogicToDevicePixel( rPoly );
// we need a graphics
if ( !mpGraphics && !AcquireGraphics() )
@@ -260,7 +260,7 @@ void OutputDevice::drawPolyLine(const Polygon& rPoly, const LineInfo& rLineInfo)
// NO way to find out there that it's a curve.
if( aPoly.HasFlags() )
{
- aPoly = Polygon::SubdivideBezier( aPoly );
+ aPoly = tools::Polygon::SubdivideBezier( aPoly );
nPoints = aPoly.GetSize();
}
@@ -345,7 +345,7 @@ bool OutputDevice::DrawPolyLineDirect( const basegfx::B2DPolygon& rB2DPolygon,
if( fLineWidth != 0.0 )
aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
- const Polygon aToolsPolygon( rB2DPolygon );
+ const tools::Polygon aToolsPolygon( rB2DPolygon );
mpMetaFile->AddAction( new MetaPolyLineAction( aToolsPolygon, aLineInfo ) );
}
return true;
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index e8ecf440de50..1dc728a64cdc 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -112,7 +112,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
}
else
{
- const Polygon aRoundRectPoly( aRect, nHorzRound, nVertRound );
+ const tools::Polygon aRoundRectPoly( aRect, nHorzRound, nVertRound );
if ( aRoundRectPoly.GetSize() >= 2 )
{
@@ -162,7 +162,7 @@ void OutputDevice::Invert( const Rectangle& rRect, InvertFlags nFlags )
mpGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), nSalFlags, this );
}
-void OutputDevice::Invert( const Polygon& rPoly, InvertFlags nFlags )
+void OutputDevice::Invert( const tools::Polygon& rPoly, InvertFlags nFlags )
{
assert(!is_double_buffered_window());
if ( !IsDeviceOutputNecessary() )
@@ -173,7 +173,7 @@ void OutputDevice::Invert( const Polygon& rPoly, InvertFlags nFlags )
if ( nPoints < 2 )
return;
- Polygon aPoly( ImplLogicToDevicePixel( rPoly ) );
+ tools::Polygon aPoly( ImplLogicToDevicePixel( rPoly ) );
// we need a graphics
if ( !mpGraphics )
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 51ca684bba20..ceffc84fbbe9 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -147,7 +147,7 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
nY += nBaseY;
// inflate because polygons are drawn smaller
Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontEntry->mnOrientation );
ImplDrawPolygon( aPoly );
return;
@@ -209,7 +209,7 @@ Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout )
{
// inflate by +1+1 because polygons are drawn smaller
Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontEntry->mnOrientation );
return aPoly.GetBoundRect();
}
@@ -263,7 +263,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
return false;
// calculate rotation offset
- Polygon aPoly( aBoundRect );
+ tools::Polygon aPoly( aBoundRect );
aPoly.Rotate( Point(), mpFontEntry->mnOwnOrientation );
Point aPoint = aPoly.GetBoundRect().TopLeft();
aPoint += Point( nX, nY );
@@ -2818,7 +2818,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
// convert units to logical width
for (sal_uInt16 j = 0; j < aPolyPoly.Count(); ++j)
{
- Polygon& rPoly = aPolyPoly[j];
+ tools::Polygon& rPoly = aPolyPoly[j];
for (sal_uInt16 k = 0; k < rPoly.GetSize(); ++k)
{
Point& rPt = rPoly[k];
@@ -2903,7 +2903,7 @@ bool OutputDevice::GetTextOutline( tools::PolyPolygon& rPolyPoly, const OUString
::basegfx::B2DPolyPolygonVector::const_iterator aIt = aB2DPolyPolyVector.begin();
for(; aIt != aB2DPolyPolyVector.end(); ++aIt )
for( unsigned int i = 0; i < aIt->count(); ++i )
- rPolyPoly.Insert(Polygon((*aIt).getB2DPolygon( i ))); // #i76339#
+ rPolyPoly.Insert(tools::Polygon((*aIt).getB2DPolygon( i ))); // #i76339#
return true;
}
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 52be910dcefe..f83e28375b1d 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -659,7 +659,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
if (mpFontEntry->mnOrientation)
{
- Polygon aPoly( aPixelRect );
+ tools::Polygon aPoly( aPixelRect );
aPoly.Rotate( Point(nBaseX+mnTextOffX, nBaseY+mnTextOffY), mpFontEntry->mnOrientation);
aPixelRect = aPoly.GetBoundRect();
}
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index a47b93cece47..910b7c530d38 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -40,7 +40,7 @@ namespace
* coordinates to integer coordinates, to ensure that it has at least 2
* pixels in both X and Y directions.
*/
- Polygon toPolygon( const basegfx::B2DPolygon& rPoly )
+ tools::Polygon toPolygon( const basegfx::B2DPolygon& rPoly )
{
basegfx::B2DRange aRange = rPoly.getB2DRange();
double fW = aRange.getWidth(), fH = aRange.getHeight();
@@ -52,7 +52,7 @@ namespace
double nW = std::max<double>(1.0, rtl::math::round(fW));
double nH = std::max<double>(1.0, rtl::math::round(fH));
- Polygon aTarget;
+ tools::Polygon aTarget;
aTarget.Insert(0, Point(nX, nY));
aTarget.Insert(1, Point(nX+nW, nY));
aTarget.Insert(2, Point(nX+nW, nY+nH));
@@ -60,7 +60,7 @@ namespace
aTarget.Insert(4, Point(nX, nY));
return aTarget;
}
- return Polygon(rPoly);
+ return tools::Polygon(rPoly);
}
tools::PolyPolygon toPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly )
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index d022aaa87093..3b75897903c7 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -58,7 +58,7 @@ static void ImplCursorInvert( ImplCursorData* pData )
Rectangle aRect( pData->maPixPos, pData->maPixSize );
if ( pData->mnDirection != CursorDirection::NONE || pData->mnOrientation || pData->mnPixSlant )
{
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
if( aPoly.GetSize() == 5 )
{
aPoly[1].X() += 1; // include the right border
@@ -105,7 +105,7 @@ static void ImplCursorInvert( ImplCursorData* pData )
pAry[5].X() -= delta;
pAry[6] = aPoly.GetPoint( 4 );
}
- aPoly = Polygon( 7, pAry);
+ aPoly = tools::Polygon( 7, pAry);
}
if ( pData->mnOrientation )
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index a11e318b6200..2edcd09e12da 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -445,13 +445,13 @@ void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vc
{
if (bRoundEdges)
{
- Polygon aPoly(aRect, nCornerRadius, nCornerRadius);
+ tools::Polygon aPoly(aRect, nCornerRadius, nCornerRadius);
tools::PolyPolygon aPolyPoly(aPoly);
rRenderContext.DrawTransparent(aPolyPoly, nPercent);
}
else
{
- Polygon aPoly(aRect);
+ tools::Polygon aPoly(aRect);
tools::PolyPolygon aPolyPoly(aPoly);
rRenderContext.DrawTransparent(aPolyPoly, nPercent);
}
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 002a0e06a9e0..af33e4f5d98c 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -701,7 +701,7 @@ void Splitter::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaint
{
rRenderContext.DrawRect(rPaintRect);
- Polygon aPoly(rPaintRect);
+ tools::Polygon aPoly(rPaintRect);
tools::PolyPolygon aPolyPoly(aPoly);
rRenderContext.DrawTransparent(aPolyPoly, 85);
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index fc5cc4730dd3..830a449c0561 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1925,7 +1925,7 @@ void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const Rectang
rRenderContext.SetLineColor(aColor);
rRenderContext.SetFillColor(aColor);
- Polygon aPoly(3);
+ tools::Polygon aPoly(3);
if (bHorizontal)
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index f3caef5e2c37..7dce25b0f525 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3594,13 +3594,13 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
{
if( bRoundEdges )
{
- Polygon aPoly( aRect, nCornerRadius, nCornerRadius );
+ tools::Polygon aPoly( aRect, nCornerRadius, nCornerRadius );
tools::PolyPolygon aPolyPoly( aPoly );
DrawTransparent( aPolyPoly, nPercent );
}
else
{
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
tools::PolyPolygon aPolyPoly( aPoly );
DrawTransparent( aPolyPoly, nPercent );
}
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index bba4ecd42a39..e90569b2163a 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -226,7 +226,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
}
}
-void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags )
+void Window::InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags )
{
sal_uInt16 nPoints = rPoly.GetSize();
@@ -235,7 +235,7 @@ void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags )
OutputDevice *pOutDev = GetOutDev();
- Polygon aPoly( pOutDev->ImplLogicToDevicePixel( rPoly ) );
+ tools::Polygon aPoly( pOutDev->ImplLogicToDevicePixel( rPoly ) );
SalGraphics* pGraphics;
diff --git a/vcl/win/source/gdi/gdiimpl.cxx b/vcl/win/source/gdi/gdiimpl.cxx
index fbe386cf63ad..ec55573ac0a6 100644
--- a/vcl/win/source/gdi/gdiimpl.cxx
+++ b/vcl/win/source/gdi/gdiimpl.cxx
@@ -997,8 +997,8 @@ void WinSalGraphicsImpl::invert( sal_uInt32 nPoints, const SalPoint* pPtAry, Sal
}
else
{
- if ( !WIN_Polygon( mrParent.getHDC(), pWinPtAry, (int)nPoints ) && (nPoints > MAX_64KSALPOINTS) )
- WIN_Polygon( mrParent.getHDC(), pWinPtAry, MAX_64KSALPOINTS );
+ if ( !Polygon( mrParent.getHDC(), pWinPtAry, (int)nPoints ) && (nPoints > MAX_64KSALPOINTS) )
+ Polygon( mrParent.getHDC(), pWinPtAry, MAX_64KSALPOINTS );
}
SetROP2( mrParent.getHDC(), nOldROP );
@@ -1653,8 +1653,8 @@ void WinSalGraphicsImpl::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry
POINT* pWinPtAry = (POINT*)pPtAry;
// for Windows 95 and its maximum number of points
- if ( !WIN_Polygon( mrParent.getHDC(), pWinPtAry, (int)nPoints ) && (nPoints > MAX_64KSALPOINTS) )
- WIN_Polygon( mrParent.getHDC(), pWinPtAry, MAX_64KSALPOINTS );
+ if ( !Polygon( mrParent.getHDC(), pWinPtAry, (int)nPoints ) && (nPoints > MAX_64KSALPOINTS) )
+ Polygon( mrParent.getHDC(), pWinPtAry, MAX_64KSALPOINTS );
}
void WinSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
@@ -1697,7 +1697,7 @@ void WinSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pP
n += nPoints;
}
- if ( !WIN_PolyPolygon( mrParent.getHDC(), pWinPointAryAry, (int*)pWinPointAry, (UINT)nPoly ) &&
+ if ( !PolyPolygon( mrParent.getHDC(), pWinPointAryAry, (int*)pWinPointAry, (UINT)nPoly ) &&
(nPolyPolyPoints > MAX_64KSALPOINTS) )
{
nPolyPolyPoints = 0;
@@ -1712,9 +1712,9 @@ void WinSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pP
if ( pWinPointAry[(UINT)nPoly] > MAX_64KSALPOINTS )
pWinPointAry[(UINT)nPoly] = MAX_64KSALPOINTS;
if ( nPoly == 1 )
- WIN_Polygon( mrParent.getHDC(), pWinPointAryAry, *pWinPointAry );
+ Polygon( mrParent.getHDC(), pWinPointAryAry, *pWinPointAry );
else
- WIN_PolyPolygon( mrParent.getHDC(), pWinPointAryAry, (int*)pWinPointAry, nPoly );
+ PolyPolygon( mrParent.getHDC(), pWinPointAryAry, (int*)pWinPointAry, nPoly );
}
if ( pWinPointAry != aWinPointAry )
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 78f105579287..f61d878f8323 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -2316,7 +2316,7 @@ bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId,
pPoints[i].Y() = -pPoints[i].Y();
// insert into polypolygon
- Polygon aPoly( nPnt, pPoints, (bHasOfflinePoints ? pFlags : NULL) );
+ tools::Polygon aPoly( nPnt, pPoints, (bHasOfflinePoints ? pFlags : NULL) );
// convert to B2DPolyPolygon
// TODO: get rid of the intermediate PolyPolygon
rB2DPolyPoly.append( aPoly.getB2DPolygon() );
diff --git a/vcl/win/source/gdi/wntgdi.cxx b/vcl/win/source/gdi/wntgdi.cxx
index 7beb176814bd..bf0ad25fe860 100644
--- a/vcl/win/source/gdi/wntgdi.cxx
+++ b/vcl/win/source/gdi/wntgdi.cxx
@@ -33,20 +33,5 @@ BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 )
}
}
-extern "C"
-{
-BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt )
-{
- return Polygon( hDC, ppt, ncnt );
-}
-}
-
-extern "C"
-{
-BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt )
-{
- return PolyPolygon( hDC, ppt, npcnt, ncnt );
-}
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 91dc1165b44b..451c4c550ce8 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -97,16 +97,14 @@ void setupMethodStubs( functor_vector_type& res )
const Point aPt3(0,0);
const Point aPt4(450,450);
- const Rectangle aRect(aPt1,aPt2);
+ const Rectangle aRect(aPt1,aPt2);
const Rectangle aRect2(aPt3,aPt4);
- const Polygon aPoly(aRect);
- const Polygon aPoly2(aRect2);
- tools::PolyPolygon aPolyPoly(aPoly);
+ const tools::Polygon aPoly(aRect);
+ const tools::Polygon aPoly2(aRect2);
+ tools::PolyPolygon aPolyPoly(aPoly);
aPolyPoly.Insert( aPoly2 );
- Polygon aPoly3(aPoly2);
- aPoly3.Rotate( aPoly3.GetBoundRect().Center(),
- 900 );
-
+ tools::Polygon aPoly3(aPoly2);
+ aPoly3.Rotate( aPoly3.GetBoundRect().Center(), 900 );
const LineInfo aLineInfo(LINE_SOLID,5);
#ifdef FIXME_VDEV
@@ -193,7 +191,7 @@ void setupMethodStubs( functor_vector_type& res )
add(res,
"DrawPolyLine",
boost::bind(
- (void (OutputDevice::*)( const Polygon& ))(
+ (void (OutputDevice::*)( const tools::Polygon& ))(
&OutputDevice::DrawPolyLine),
_1,
aPoly ));
@@ -204,7 +202,7 @@ void setupMethodStubs( functor_vector_type& res )
add(res,
"DrawPolyLine(LineInfo)",
boost::bind(
- (void (OutputDevice::*)( const Polygon&, const LineInfo& ))(
+ (void (OutputDevice::*)( const tools::Polygon&, const LineInfo& ))(
&OutputDevice::DrawPolyLine),
_1,
aPoly, aLineInfo ));
@@ -213,7 +211,7 @@ void setupMethodStubs( functor_vector_type& res )
add(res,
"DrawPolygon",
boost::bind(
- (void (OutputDevice::*)( const Polygon& ))
+ (void (OutputDevice::*)( const tools::Polygon& ))
&OutputDevice::DrawPolygon,
_1,
aPoly ));
@@ -830,8 +828,8 @@ void outDevGrind(vcl::RenderContext& rTarget, sal_Int32 nTurns = 100)
setupMethodStubs( aMethods );
const Rectangle aClipRect(10,10,1000,1000);
- const Polygon aPoly1( aClipRect );
- Polygon aPoly2( aClipRect );
+ const tools::Polygon aPoly1( aClipRect );
+ tools::Polygon aPoly2( aClipRect );
aPoly2.Rotate(aClipRect.Center(),450);
tools::PolyPolygon aClipPoly(aPoly1);
aClipPoly.Insert(aPoly2);
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 33cb4f430d8e..c58ae4e9309e 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -492,7 +492,7 @@ public:
break;
case 2:
{
- Polygon aPoly(aSub);
+ tools::Polygon aPoly(aSub);
aPoly.Rotate(aSub.Center(), 450);
aPoly.Clip(aSmaller);
aRegion = vcl::Region(aPoly);
@@ -504,11 +504,11 @@ public:
sal_Int32 nTW = aSub.GetWidth()/6;
sal_Int32 nTH = aSub.GetHeight()/6;
Rectangle aTiny(Point(4, 4), Size(nTW*2, nTH*2));
- aPolyPoly.Insert(Polygon(aTiny));
+ aPolyPoly.Insert( tools::Polygon(aTiny));
aTiny.Move(nTW*3, nTH*3);
- aPolyPoly.Insert(Polygon(aTiny));
+ aPolyPoly.Insert( tools::Polygon(aTiny));
aTiny.Move(nTW, nTH);
- aPolyPoly.Insert(Polygon(aTiny));
+ aPolyPoly.Insert( tools::Polygon(aTiny));
aRegion = vcl::Region(aPolyPoly);
break;
@@ -541,7 +541,7 @@ public:
aShrunk.Move(nDx, nDy);
aShrunk.SetSize(Size(r.GetWidth()-nDx*2,
r.GetHeight()-nDy*2));
- Polygon aPoly(aShrunk);
+ tools::Polygon aPoly(aShrunk);
tools::PolyPolygon aPPoly(aPoly);
rDev.SetLineColor(Color(COL_RED));
rDev.SetFillColor(Color(COL_RED));
@@ -737,7 +737,7 @@ public:
Rectangle aSubRect(r);
aSubRect.Move(x * r.GetWidth()/3, y * r.GetHeight()/3);
aSubRect.SetSize(Size(r.GetWidth()/2, r.GetHeight()/4));
- Polygon aPoly(SAL_N_ELEMENTS(aPoints));
+ tools::Polygon aPoly(SAL_N_ELEMENTS(aPoints));
for (size_t v = 0; v < SAL_N_ELEMENTS(aPoints); v++)
{
aPoly.SetPoint(Point(aSubRect.Left() +