summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-28 07:51:19 +0200
committerNoel Grandin <noel@peralex.com>2014-09-30 11:47:41 +0200
commitc9d4a2887c13a5df244022276dd79a5bef8af0ea (patch)
treefb849270affd5fca01fa26094c89595d18c6f588 /canvas
parentd17d4d48b5dc3332fd03f6ef186ed2bda4665e7c (diff)
fdo#82577: Handle PolyPolygon
Put the TOOLS PolyPolygon class in the tools namespace. Avoids clash with the Windows PolyPolygon typedef. Change-Id: I811ecbb3d55ba4ce66e4555a8586f60fcd57fb66
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_canvashelper_text.cxx4
-rw-r--r--canvas/source/directx/dx_textlayout_drawhelper.cxx4
-rw-r--r--canvas/source/directx/dx_winstuff.hxx1
-rw-r--r--canvas/source/vcl/canvashelper.cxx10
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx6
-rw-r--r--canvas/source/vcl/impltools.cxx6
-rw-r--r--canvas/source/vcl/impltools.hxx4
-rw-r--r--canvas/source/vcl/spritehelper.cxx4
-rw-r--r--canvas/workben/canvasdemo.cxx2
9 files changed, 20 insertions, 21 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index 41f2f85d4538..e4117525e9ff 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -147,7 +147,7 @@ namespace cairocanvas
::basegfx::unotools::homMatrixFromAffineMatrix( aMatrix,
viewState.AffineTransform ) );
- aClipRegion = vcl::Region::GetRegionFromPolyPolygon( ::PolyPolygon( aClipPoly ) );
+ aClipRegion = vcl::Region::GetRegionFromPolyPolygon( tools::PolyPolygon( aClipPoly ) );
}
}
@@ -166,7 +166,7 @@ namespace cairocanvas
if( aClipPoly.count() )
{
// setup non-empty clipping
- vcl::Region aRegion = vcl::Region::GetRegionFromPolyPolygon( ::PolyPolygon( aClipPoly ) );
+ vcl::Region aRegion = vcl::Region::GetRegionFromPolyPolygon( tools::PolyPolygon( aClipPoly ) );
if( aClipRegion.IsEmpty() )
aClipRegion = aRegion;
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index b565d8c598a4..0a61a8422812 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -171,7 +171,7 @@ namespace dxcanvas
}
aClipPoly.transform(aMatrix);
- const vcl::Region& rClipRegion = vcl::Region(PolyPolygon(aClipPoly));
+ const vcl::Region& rClipRegion = vcl::Region(tools::PolyPolygon(aClipPoly));
aVirtualDevice.IntersectClipRegion(rClipRegion);
}
@@ -179,7 +179,7 @@ namespace dxcanvas
{
::basegfx::B2DPolyPolygon aClipPoly(dxcanvas::tools::polyPolygonFromXPolyPolygon2D(rRenderState.Clip));
aClipPoly.transform(aWorldTransform);
- const vcl::Region& rClipRegion = vcl::Region(PolyPolygon(aClipPoly));
+ const vcl::Region& rClipRegion = vcl::Region(tools::PolyPolygon(aClipPoly));
aVirtualDevice.IntersectClipRegion(rClipRegion);
}
diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx
index 30f616dda0ad..86ecacdce683 100644
--- a/canvas/source/directx/dx_winstuff.hxx
+++ b/canvas/source/directx/dx_winstuff.hxx
@@ -50,7 +50,6 @@
#define ULONG win32ULONG
#define GradientStyle_RECT win32GradientStyle_RECT
#define Polygon win32Polygon
-#define PolyPolygon win32PolyPolygon
#undef WB_LEFT
#undef WB_RIGHT
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 29e4dadb66d0..9510d7e57a3e 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -294,7 +294,7 @@ namespace vclcanvas
const ::basegfx::B2DPolyPolygon& rPolyPoly(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon) );
- const PolyPolygon aPolyPoly( tools::mapPolyPolygon( rPolyPoly, viewState, renderState ) );
+ const ::tools::PolyPolygon aPolyPoly( tools::mapPolyPolygon( rPolyPoly, viewState, renderState ) );
if( rPolyPoly.isClosed() )
{
@@ -419,7 +419,7 @@ namespace vclcanvas
// user coordinates.
aStrokedPolyPoly.transform( aMatrix );
- const PolyPolygon aVCLPolyPoly( aStrokedPolyPoly );
+ const ::tools::PolyPolygon aVCLPolyPoly( aStrokedPolyPoly );
// TODO(F2): When using alpha here, must handle that via
// temporary surface or somesuch.
@@ -504,7 +504,7 @@ namespace vclcanvas
::basegfx::B2DPolyPolygon aB2DPolyPoly(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon));
aB2DPolyPoly.setClosed(true); // ensure closed poly, otherwise VCL does not fill
- const PolyPolygon aPolyPoly( tools::mapPolyPolygon(
+ const ::tools::PolyPolygon aPolyPoly( tools::mapPolyPolygon(
aB2DPolyPoly,
viewState, renderState ) );
const bool bSourceAlpha( renderState.CompositeOperation == rendering::CompositeOperation::SOURCE );
@@ -1247,7 +1247,7 @@ namespace vclcanvas
::basegfx::unotools::homMatrixFromAffineMatrix( aMatrix,
viewState.AffineTransform ) );
- aClipRegion = vcl::Region::GetRegionFromPolyPolygon( ::PolyPolygon( aClipPoly ) );
+ aClipRegion = vcl::Region::GetRegionFromPolyPolygon( ::tools::PolyPolygon( aClipPoly ) );
}
else
{
@@ -1270,7 +1270,7 @@ namespace vclcanvas
if( aClipPoly.count() )
{
// setup non-empty clipping
- vcl::Region aRegion = vcl::Region::GetRegionFromPolyPolygon( ::PolyPolygon( aClipPoly ) );
+ vcl::Region aRegion = vcl::Region::GetRegionFromPolyPolygon( ::tools::PolyPolygon( aClipPoly ) );
aClipRegion.Intersect( aRegion );
}
else
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 103302593f6f..7f6ff6381779 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -417,7 +417,7 @@ namespace vclcanvas
// here, keep it all the way and only change the vertex values
// in the loop below (as ::Polygon is a pimpl class, creating
// one every loop turn would really stress the mem allocator)
- ::PolyPolygon aTempPolyPoly;
+ ::tools::PolyPolygon aTempPolyPoly;
::Polygon aTempPoly2( static_cast<sal_uInt16>(nNumPoints+1) );
aTempPoly2[0] = rBounds.TopLeft();
@@ -540,7 +540,7 @@ namespace vclcanvas
OutputDevice* p2ndOutDev,
const ::canvas::ParametricPolyPolygon::Values& rValues,
const std::vector< ::Color >& rColors,
- const PolyPolygon& rPoly,
+ const ::tools::PolyPolygon& rPoly,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState,
const rendering::Texture& texture,
@@ -675,7 +675,7 @@ namespace vclcanvas
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
const int nTransparency( setupOutDevState( viewState, renderState, IGNORE_COLOR ) );
- PolyPolygon aPolyPoly( tools::mapPolyPolygon(
+ ::tools::PolyPolygon aPolyPoly( tools::mapPolyPolygon(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon),
viewState, renderState ) );
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index 673407ba7294..4167d1f19eb6 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -150,7 +150,7 @@ namespace vclcanvas
return true;
}
- bool isRectangle( const PolyPolygon& rPolyPoly )
+ bool isRectangle( const ::tools::PolyPolygon& rPolyPoly )
{
// exclude some cheap cases first
if( rPolyPoly.Count() != 1 )
@@ -184,7 +184,7 @@ namespace vclcanvas
return ::vcl::unotools::pointFromB2DPoint( aPoint );
}
- ::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
+ ::tools::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
const rendering::ViewState& rViewState,
const rendering::RenderState& rRenderState )
{
@@ -197,7 +197,7 @@ namespace vclcanvas
aTemp.transform( aMatrix );
- return ::PolyPolygon( aTemp );
+ return ::tools::PolyPolygon( aTemp );
}
::BitmapEx transformBitmap( const BitmapEx& rBitmap,
diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx
index 3b7eac05b3c6..059495523db0 100644
--- a/canvas/source/vcl/impltools.hxx
+++ b/canvas/source/vcl/impltools.hxx
@@ -95,7 +95,7 @@ namespace vclcanvas
@return true, if the polygon is a rectangle.
*/
- bool isRectangle( const PolyPolygon& rPolyPoly );
+ bool isRectangle( const ::tools::PolyPolygon& rPolyPoly );
// Little helper to encapsulate locking into policy class
@@ -167,7 +167,7 @@ namespace vclcanvas
const ::com::sun::star::rendering::ViewState& rViewState,
const ::com::sun::star::rendering::RenderState& rRenderState );
- ::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
+ ::tools::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
const ::com::sun::star::rendering::ViewState& rViewState,
const ::com::sun::star::rendering::RenderState& rRenderState );
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index ebbd8142d75c..523e4aa37a68 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -259,7 +259,7 @@ namespace vclcanvas
rTargetSurface.SetLineColor( Color( 0,255,0 ) );
rTargetSurface.SetFillColor();
- rTargetSurface.DrawPolyPolygon(PolyPolygon(aClipPoly)); // #i76339#
+ rTargetSurface.DrawPolyPolygon(::tools::PolyPolygon(aClipPoly)); // #i76339#
}
vcl::Region aClipRegion( aClipPoly );
@@ -302,7 +302,7 @@ namespace vclcanvas
if( mbShowSpriteBounds )
{
- ::PolyPolygon aMarkerPoly(
+ ::tools::PolyPolygon aMarkerPoly(
::canvas::tools::getBoundMarksPolyPolygon(
::basegfx::B2DRectangle(aOutPos.X(),
aOutPos.Y(),
diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index ac8869abdb7d..b8ca6b4675c3 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -282,7 +282,7 @@ class DemoRenderer
aStrokeAttrs.StartCapType = rendering::PathCapType::BUTT;
aStrokeAttrs.EndCapType = rendering::PathCapType::BUTT;
aStrokeAttrs.JoinType = rendering::PathJoinType::MITER;
- //fprintf( stderr, "FIXME: stroking a PolyPolygon doesn't show up\n" );
+ //fprintf( stderr, "FIXME: stroking a tools::PolyPolygon doesn't show up\n" );
//yes it does
mxCanvas->strokePolyPolygon( xPP, maViewState, aRenderState, aStrokeAttrs );
// FIXME: do this instead: