diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-08-02 15:32:02 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-08-02 15:32:02 +0000 |
commit | db91067a05978fb117283e597e5578d93556f2ca (patch) | |
tree | 0af216fc56002e466b54d6e2590c9ebd7db89a92 /canvas | |
parent | 3c10fe0d2a5487b8590c15c45eba6d649d8f80fd (diff) |
INTEGRATION: CWS kendy18 (1.8.8); FILE MERGED
2007/07/26 12:48:15 kendy 1.8.8.1: #i80039#
Fix cairo canvas according to the basegfx API change.
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index 4d638ec546d7..68293550a63f 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -4,9 +4,9 @@ * * $RCSfile: cairo_canvashelper.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: obo $ $Date: 2007-07-17 14:20:31 $ + * last change: $Author: hr $ $Date: 2007-08-02 16:32:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -845,9 +845,10 @@ namespace cairocanvas cairo_set_matrix( pCairo, &aIdentityMatrix ); for( sal_uInt32 nPolygonIndex = 0; nPolygonIndex < aPolyPolygon.count(); nPolygonIndex++ ) { - ::basegfx::B2DPolygon aPolygon = aPolyPolygon.getB2DPolygon( nPolygonIndex ); + ::basegfx::B2DPolygon aPolygon( aPolyPolygon.getB2DPolygon( nPolygonIndex ) ); + const sal_uInt32 nPointCount( aPolygon.count() ); - if( aPolygon.count() > 1) { + if( nPointCount > 1) { bool bIsBezier = aPolygon.areControlPointsUsed(); ::basegfx::B2DPoint aA, aB, aP; @@ -871,11 +872,11 @@ namespace cairocanvas OSL_TRACE( "move to %f,%f\n", nX, nY ); if( bIsBezier ) { - aA = aPolygon.getControlPointA( 0 ); - aB = aPolygon.getControlPointB( 0 ); + aA = aPolygon.getNextControlPoint( 0 ); + aB = aPolygon.getPrevControlPoint( 1 ); } - for( sal_uInt32 j = 1; j < aPolygon.count(); j++ ) { + for( sal_uInt32 j = 1; j < nPointCount; j++ ) { aP = aPolygon.getB2DPoint( j ); nX = aP.getX(); @@ -908,8 +909,8 @@ namespace cairocanvas cairo_matrix_transform_point( &aOrigMatrix, &nBX, &nBY ); cairo_curve_to( pCairo, nAX, nAY, nBX, nBY, nX, nY ); - aA = aPolygon.getControlPointA( j ); - aB = aPolygon.getControlPointB( j ); + aA = aPolygon.getNextControlPoint( j ); + aB = aPolygon.getPrevControlPoint( ( j + 1 ) % nPointCount ); } else { cairo_line_to( pCairo, nX, nY ); OSL_TRACE( "line to %f,%f\n", nX, nY ); |