summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2015-08-16 16:45:12 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2015-08-17 02:07:43 +0000
commitef46917ff3163d3fdd5152bda5d16c4503b6ab69 (patch)
tree73271cd339b19964bc91157207565595774e98b5 /vcl/source/outdev
parent2ce903c7b2d67a46c2fe2755cfaa66d98f2eddf2 (diff)
Put Polygon from tools under tools:: namespace
Polygon is one of these names that Clash with some system objects A similar work has been done earlier with PolyPolygon. Change-Id: Icf2217cb2906292b7275760f1a16be0e150312f5 Reviewed-on: https://gerrit.libreoffice.org/17789 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'vcl/source/outdev')
-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
13 files changed, 77 insertions, 77 deletions
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 )