From 6656bdaf82d41661150f4d12168fa0aa0169df00 Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Wed, 18 Jul 2007 10:07:38 +0000 Subject: INTEGRATION: CWS aw051 (1.7.34); FILE MERGED 2007/06/07 09:32:50 aw 1.7.34.2: #i77162# changes to B2DPolygon bezier handling 2007/06/06 15:49:41 aw 1.7.34.1: #i77162# B2DPolygin control point interface changes --- basegfx/source/tools/canvastools.cxx | 102 +++++++++++++---------------------- 1 file changed, 38 insertions(+), 64 deletions(-) (limited to 'basegfx') diff --git a/basegfx/source/tools/canvastools.cxx b/basegfx/source/tools/canvastools.cxx index b56d3321c0d4..3235897bed9a 100755 --- a/basegfx/source/tools/canvastools.cxx +++ b/basegfx/source/tools/canvastools.cxx @@ -4,9 +4,9 @@ * * $RCSfile: canvastools.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: obo $ $Date: 2006-09-17 08:05:36 $ + * last change: $Author: obo $ $Date: 2007-07-18 11:07:38 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -101,44 +101,23 @@ namespace basegfx { namespace { - uno::Sequence< geometry::RealBezierSegment2D > bezierSequenceFromB2DPolygon( const ::basegfx::B2DPolygon& rPoly ) + uno::Sequence< geometry::RealBezierSegment2D > bezierSequenceFromB2DPolygon(const ::basegfx::B2DPolygon& rPoly) { - const sal_uInt32 nNumPoints( rPoly.count() ); - - uno::Sequence< geometry::RealBezierSegment2D > outputSequence( nNumPoints ); + const sal_uInt32 nPointCount(rPoly.count()); + uno::Sequence< geometry::RealBezierSegment2D > outputSequence(nPointCount); geometry::RealBezierSegment2D* pOutput = outputSequence.getArray(); - // fill sequence from polygon - sal_uInt32 i; - for( i=0; isetClosed( i, sal_True ); + xRes->setClosed( i, rPolyPoly.getB2DPolygon(i).isClosed() ); } return xRes; @@ -301,38 +279,34 @@ namespace basegfx ::basegfx::B2DPolygon polygonFromBezier2DSequence( const uno::Sequence< geometry::RealBezierSegment2D >& curves ) { - const sal_Int32 nSize( curves.getLength() ); - - ::basegfx::B2DPolygon aPoly; + const sal_Int32 nSize(curves.getLength()); + basegfx::B2DPolygon aRetval; - for( sal_Int32 nCurrPoint=0; nCurrPoint