summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2007-12-03 12:54:35 +0000
committerArmin Weiss <aw@openoffice.org>2007-12-03 12:54:35 +0000
commit9b3e3b2bed61ca05f8ad58128374daca2c7294e3 (patch)
tree12207c55603cb2577deba0b970a444e3414a1e7d /drawinglayer
parent8bc80a9fa6df75200e4486287c2445a16465d5d5 (diff)
#i39532# checkin for resync
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx44
1 files changed, 42 insertions, 2 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 328bf8d1eaa1..9fe2c84aebab 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vclprocessor2d.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: aw $ $Date: 2007-11-20 10:20:18 $
+ * last change: $Author: aw $ $Date: 2007-12-03 13:54:35 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -169,6 +169,13 @@
#endif
//////////////////////////////////////////////////////////////////////////////
+// for test, can be removed again
+
+#ifndef _BGFX_POLYPOLYGON_B2DPOLYGONCLIPPER_HXX
+#include <basegfx/polygon/b2dpolygonclipper.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
{
@@ -625,6 +632,39 @@ namespace drawinglayer
basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolygonCandidate.getB2DPolyPolygon());
aLocalPolyPolygon.transform(maCurrentTransformation);
mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon);
+
+ static bool bTestPolygonClipping(false);
+ if(bTestPolygonClipping)
+ {
+ static bool bInside(true);
+ static bool bFilled(false);
+ static bool bLine(false);
+
+ basegfx::B2DRange aRange(aLocalPolyPolygon.getB2DRange());
+ aRange.grow(aRange.getWidth() * -0.1);
+
+ if(bFilled)
+ {
+ basegfx::B2DPolyPolygon aFilledClipped(basegfx::tools::clipPolyPolygonOnRange(aLocalPolyPolygon, aRange, bInside, false));
+ basegfx::BColor aRand(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0);
+ mpOutputDevice->SetFillColor(Color(aRand));
+ mpOutputDevice->SetLineColor();
+ mpOutputDevice->DrawPolyPolygon(aFilledClipped);
+ }
+
+ if(bLine)
+ {
+ basegfx::B2DPolyPolygon aLineClipped(basegfx::tools::clipPolyPolygonOnRange(aLocalPolyPolygon, aRange, bInside, true));
+ basegfx::BColor aRand(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0);
+ mpOutputDevice->SetFillColor();
+ mpOutputDevice->SetLineColor(Color(aRand));
+
+ for(sal_uInt32 a(0); a < aLineClipped.count(); a++)
+ {
+ mpOutputDevice->DrawPolyLine(aLineClipped.getB2DPolygon(a));
+ }
+ }
+ }
}
// direct draw of MetaFile