logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS update [cws_src680_thbpp6]: /gsl/cppcanvas/source/inc/, /gsl/cppcanvas/: msg#00307

Subject: CVS update [cws_src680_thbpp6]: /gsl/cppcanvas/source/inc/, /gsl/cppcanvas/source/mtfrenderer/
Tag: cws_src680_thbpp6
User: thb     
Date: 2006/12/21 09:20:57

Modified:
   gsl/cppcanvas/source/inc/implrenderer.hxx
   gsl/cppcanvas/source/mtfrenderer/bitmapaction.cxx
   gsl/cppcanvas/source/mtfrenderer/bitmapaction.hxx
   gsl/cppcanvas/source/mtfrenderer/implrenderer.cxx
   gsl/cppcanvas/source/mtfrenderer/lineaction.cxx
   gsl/cppcanvas/source/mtfrenderer/lineaction.hxx
   gsl/cppcanvas/source/mtfrenderer/mtftools.cxx
   gsl/cppcanvas/source/mtfrenderer/mtftools.hxx
   gsl/cppcanvas/source/mtfrenderer/outdevstate.hxx
   gsl/cppcanvas/source/mtfrenderer/pointaction.cxx
   gsl/cppcanvas/source/mtfrenderer/pointaction.hxx
   gsl/cppcanvas/source/mtfrenderer/polypolyaction.cxx
   gsl/cppcanvas/source/mtfrenderer/polypolyaction.hxx
   gsl/cppcanvas/source/mtfrenderer/textaction.cxx
   gsl/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
   gsl/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx

Log:
 #121806# Now keeping full precision of the mtf logic coordinates across 
mtf->XCanvas conversion

File Changes:

Directory: /gsl/cppcanvas/source/inc/
=====================================

File [changed]: implrenderer.hxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/inc/implrenderer.hxx?r1=1.10&r2=1.10.40.1
Delta lines:  +79 -64
---------------------
--- implrenderer.hxx    2 Nov 2005 13:39:25 -0000       1.10
+++ implrenderer.hxx    21 Dec 2006 17:20:52 -0000      1.10.40.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: implrenderer.hxx,v $
  *
- *  $Revision: 1.10 $
+ *  $Revision: 1.10.40.1 $
  *
- *  last change: $Author: kz $ $Date: 2005/11/02 13:39:25 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:52 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -57,9 +57,16 @@
 #include <vector>
 
 class GDIMetaFile;
-class BitmapEx;
 class VirtualDevice;
 class Gradient;
+class BitmapEx;
+class MapMode;
+class Size;
+
+namespace basegfx {
+    class B2DPolyPolygon;
+    class B2DPolygon;
+}
 
 namespace cppcanvas
 {
@@ -67,6 +74,7 @@
     namespace internal
     {
         struct OutDevState;
+        struct ActionFactoryParameters;
 
         // state stack of OutputDevice, to correctly handle
         // push/pop actions
@@ -116,33 +124,25 @@
             ImplRenderer(const ImplRenderer&);
             ImplRenderer& operator=( const ImplRenderer& );
 
-            void updateClipping( VectorOfOutDevStates&                         
        rStates,
-                                 const ::basegfx::B2DPolyPolygon&      
rClipPoly,
-                                 const CanvasSharedPtr&                        
        rCanvas,
+            void updateClipping( const ::basegfx::B2DPolyPolygon&   rClipPoly,
+                                 const ActionFactoryParameters&     rParms,
                                  bool                                          
                bIntersect );
 
-            void updateClipping( VectorOfOutDevStates&         rStates,
-                                 const ::Rectangle&            rClipRect,
-                                 const CanvasSharedPtr&        rCanvas,
+            void updateClipping( const ::Rectangle&                 rClipRect,
+                                 const ActionFactoryParameters&     rParms,
                                  bool                                  
bIntersect );
 
             ::com::sun::star::uno::Reference< 
                 ::com::sun::star::rendering::XCanvasFont > createFont( double& 
                                        o_rFontRotation,
                                                                        const 
::Font&                   rFont,
-                                                                       const 
CanvasSharedPtr&  rCanvas,
-                                                                       const 
::VirtualDevice&  rVDev,
-                                                                       const 
Parameters&               rParms ) const;
-            bool                       createActions( const CanvasSharedPtr&   
rCanvas,
-                                           VirtualDevice&                      
rVDev,
-                                           GDIMetaFile&                        
        rMtf,
-                                           VectorOfOutDevStates&       rStates,
-                                           const Parameters&           rParms,
-                                           bool                                
                bSubsettableActions,
-                                           sal_Int32&                          
io_rCurrActionIndex );
-            bool                       createFillAndStroke( const 
::PolyPolygon&                       rPolyPoly,
-                                                 const CanvasSharedPtr&        
                rCanvas,
-                                                 sal_Int32&                    
                        rActionIndex,
-                                                 const VectorOfOutDevStates&   
rStates );
+                                                                       const 
ActionFactoryParameters&  rParms ) const;
+            bool createActions( GDIMetaFile&                    rMtf,
+                                const ActionFactoryParameters&  rParms,
+                                bool                            
bSubsettableActions );
+            bool createFillAndStroke( const ::basegfx::B2DPolyPolygon& 
rPolyPoly,
+                                      const ActionFactoryParameters&   rParms 
);
+            bool createFillAndStroke( const ::basegfx::B2DPolygon&   rPoly,
+                                      const ActionFactoryParameters& rParms );
             void                       skipContent( GDIMetaFile& rMtf,
                                          const char*  pCommentString,
                                          sal_Int32&      io_rCurrActionIndex ) 
const;
@@ -153,11 +153,7 @@
 
             void                       createGradientAction( const 
::PolyPolygon&              rPoly,
                                                   const ::Gradient&            
        rGradient,
-                                                  ::VirtualDevice&             
        rVDev,
-                                                  const CanvasSharedPtr&       
rCanvas,
-                                                  VectorOfOutDevStates&        
        rStates,
-                                                  const Parameters&            
rParms,
-                                                  sal_Int32&                   
        io_rCurrActionIndex,
+                                       const ActionFactoryParameters& rParms,
                                                   bool                         
                bIsPolygonRectangle,
                                                   bool                         
                bSubsettableActions );
 
@@ -166,12 +162,8 @@
                                               int                              
                        nIndex,
                                               int                              
                        nLength,
                                               const sal_Int32*                 
        pCharWidths,
-                                              ::VirtualDevice&                 
        rVDev,
-                                              const CanvasSharedPtr&           
rCanvas,
-                                              VectorOfOutDevStates&         
rStates,
-                                              const Parameters&                
        rParms,
-                                              bool                             
                        bSubsettable,
-                                              sal_Int32&                       
                io_rCurrActionIndex );
+                                   const ActionFactoryParameters& rParms,
+                                   bool                           bSubsettable 
);
 
             bool                       getSubsetIndices( sal_Int32&            
                                io_rStartIndex,
                                               sal_Int32&                       
                        io_rEndIndex,
@@ -180,6 +172,29 @@
 
 
             ActionVector                                                       
maActions;
+        };
+
+
+        /// Common parameters when creating actions
+        struct ActionFactoryParameters
+        {
+            ActionFactoryParameters( VectorOfOutDevStates&       rStates,
+                                     const CanvasSharedPtr&      rCanvas,
+                                     ::VirtualDevice&            rVDev,
+                                     const Renderer::Parameters& rParms,
+                                     sal_Int32&                  
io_rCurrActionIndex ) :
+                mrStates(rStates),
+                mrCanvas(rCanvas),
+                mrVDev(rVDev),
+                mrParms(rParms),
+                mrCurrActionIndex(io_rCurrActionIndex)
+            {}
+
+            VectorOfOutDevStates&       mrStates;
+            const CanvasSharedPtr&      mrCanvas;
+            ::VirtualDevice&            mrVDev;
+            const Renderer::Parameters& mrParms;
+            sal_Int32&                  mrCurrActionIndex;
         };
     }
 }

Directory: /gsl/cppcanvas/source/mtfrenderer/
=============================================

File [changed]: bitmapaction.cxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/bitmapaction.cxx?r1=1.10&r2=1.10.10.1
Delta lines:  +31 -30
---------------------
--- bitmapaction.cxx    12 Oct 2006 14:59:02 -0000      1.10
+++ bitmapaction.cxx    21 Dec 2006 17:20:52 -0000      1.10.10.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: bitmapaction.cxx,v $
  *
- *  $Revision: 1.10 $
+ *  $Revision: 1.10.10.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/10/12 14:59:02 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:52 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -49,6 +49,7 @@
 
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/vector/b2dsize.hxx>
+#include <basegfx/point/b2dpoint.hxx>
 #include <basegfx/range/b2drange.hxx>
 #include <basegfx/tools/canvastools.hxx>
 
@@ -73,12 +74,12 @@
             { 
             public: 
                 BitmapAction( const ::BitmapEx&,  
-                              const ::Point&   rDstPoint,  
+                              const ::basegfx::B2DPoint& rDstPoint,  
                               const CanvasSharedPtr&, 
                               const OutDevState& ); 
                 BitmapAction( const ::BitmapEx&,
-                              const ::Point&   rDstPoint,  
-                              const ::Size&    rDstSize,
+                              const ::basegfx::B2DPoint&  rDstPoint,  
+                              const ::basegfx::B2DVector& rDstSize,
                               const CanvasSharedPtr&, 
                               const OutDevState& ); 
 
@@ -103,7 +104,7 @@
 
 
             BitmapAction::BitmapAction( const ::BitmapEx&              rBmpEx, 
 
-                                        const ::Point&                         
rDstPoint,  
+                                        const ::basegfx::B2DPoint& rDstPoint,  
                                         const CanvasSharedPtr& rCanvas, 
                                         const OutDevState&             rState 
) :
                 CachedPrimitiveBase( rCanvas, true ),
@@ -117,8 +118,8 @@
                 // Setup transformation such that the next render call is
                 // moved rPoint away.
                 ::basegfx::B2DHomMatrix        aLocalTransformation;
-                aLocalTransformation.translate( rDstPoint.X(), 
-                                                rDstPoint.Y() );
+                aLocalTransformation.translate( rDstPoint.getX(), 
+                                                rDstPoint.getY() );
                 ::canvas::tools::appendToRenderState( maState, 
                                                       aLocalTransformation );
 
@@ -132,8 +133,8 @@
             }
 
             BitmapAction::BitmapAction( const ::BitmapEx&              rBmpEx,
-                                        const ::Point&                         
rDstPoint,  
-                                        const ::Size&                  
rDstSize,
+                                        const ::basegfx::B2DPoint&  rDstPoint, 
 
+                                        const ::basegfx::B2DVector& rDstSize,
                                         const CanvasSharedPtr& rCanvas, 
                                         const OutDevState&     rState          
) :
                 CachedPrimitiveBase( rCanvas, true ),
@@ -150,11 +151,11 @@
                 const ::Size aBmpSize( rBmpEx.GetSizePixel() );
                 ::basegfx::B2DHomMatrix        aLocalTransformation;
                 
-                const ::basegfx::B2DSize aScale( 
static_cast<double>(rDstSize.Width()) / aBmpSize.Width(), 
-                                                 
static_cast<double>(rDstSize.Height()) / aBmpSize.Height() );
+                const ::basegfx::B2DVector aScale( rDstSize.getX() / 
aBmpSize.Width(), 
+                                                   rDstSize.getY() / 
aBmpSize.Height() );
                 aLocalTransformation.scale( aScale.getX(), aScale.getY() );
-                aLocalTransformation.translate( rDstPoint.X(), 
-                                                rDstPoint.Y() );
+                aLocalTransformation.translate( rDstPoint.getX(), 
+                                                rDstPoint.getY() );
                 ::canvas::tools::appendToRenderState( maState,
                                                       aLocalTransformation );
             
@@ -228,7 +229,7 @@
         } 
         
         ActionSharedPtr BitmapActionFactory::createBitmapAction( const 
::BitmapEx&             rBmpEx,  
-                                                                 const 
::Point&                rDstPoint,  
+                                                                 const 
::basegfx::B2DPoint& rDstPoint,  
                                                                  const 
CanvasSharedPtr&        rCanvas, 
                                                                  const 
OutDevState&            rState )
         {
@@ -239,8 +240,8 @@
         }
         
         ActionSharedPtr BitmapActionFactory::createBitmapAction( const 
::BitmapEx&             rBmpEx,
-                                                                 const 
::Point&                rDstPoint,  
-                                                                 const ::Size& 
                        rDstSize,
+                                                                 const 
::basegfx::B2DPoint&  rDstPoint,  
+                                                                 const 
::basegfx::B2DVector& rDstSize,
                                                                  const 
CanvasSharedPtr&        rCanvas, 
                                                                  const 
OutDevState&    rState )
         {

File [changed]: bitmapaction.hxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/bitmapaction.hxx?r1=1.6&r2=1.6.44.1
Delta lines:  +10 -8
--------------------
--- bitmapaction.hxx    8 Sep 2005 08:18:02 -0000       1.6
+++ bitmapaction.hxx    21 Dec 2006 17:20:52 -0000      1.6.44.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: bitmapaction.hxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.6.44.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 08:18:02 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:52 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -39,8 +39,10 @@
 #include <cppcanvas/canvas.hxx>
 #include <action.hxx>
 
-class Point;
-class Size;
+namespace basegfx {
+    class B2DPoint;
+    class B2DVector;
+}
 class BitmapEx;
 
 /* Definition of internal::BitmapActionFactory class */
@@ -63,14 +65,14 @@
         public:
             /// Unscaled bitmap action, only references destination point
             static ActionSharedPtr createBitmapAction( const ::BitmapEx&,  
-                                                       const ::Point&  
rDstPoint,  
+                                                       const 
::basegfx::B2DPoint& rDstPoint,  
                                                        const CanvasSharedPtr&, 
                                                        const OutDevState& ); 
             
             /// Scaled bitmap action, dest point and dest size
             static ActionSharedPtr createBitmapAction( const ::BitmapEx&,
-                                                       const ::Point&  
rDstPoint,  
-                                                       const ::Size&   
rDstSize,
+                                                       const 
::basegfx::B2DPoint&  rDstPoint,  
+                                                       const 
::basegfx::B2DVector& rDstSize,
                                                        const CanvasSharedPtr&, 
                                                        const OutDevState& );
 

File [changed]: implrenderer.cxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/implrenderer.cxx?r1=1.20.10.1&r2=1.20.10.2
Delta lines:  +445 -442
-----------------------
--- implrenderer.cxx    23 Nov 2006 10:06:33 -0000      1.20.10.1
+++ implrenderer.cxx    21 Dec 2006 17:20:53 -0000      1.20.10.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: implrenderer.cxx,v $
  *
- *  $Revision: 1.20.10.1 $
+ *  $Revision: 1.20.10.2 $
  *
- *  last change: $Author: thb $ $Date: 2006/11/23 10:06:33 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:53 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -39,55 +39,50 @@
 #include <canvas/debug.hxx>
 #include <canvas/verbosetrace.hxx>
 
-#ifndef _OSL_MUTEX_HXX_
 #include <osl/mutex.hxx>
-#endif
-#ifndef _VOS_MUTEX_HXX_
 #include <vos/mutex.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
 #include <vcl/svapp.hxx>
-#endif
 
-#ifndef _RTL_LOGFILE_HXX_
 #include <rtl/logfile.hxx>
-#endif
 
-#ifndef _COMPHELPER_SEQUENCE_HXX_
 #include <comphelper/sequence.hxx>
-#endif
 
 #include <cppcanvas/canvas.hxx>
 
-#ifndef _COM_SUN_STAR_RENDERING_XGRAPHICDEVICE_HPP_
 #include <com/sun/star/rendering/XGraphicDevice.hpp>
-#endif
-#ifndef _COM_SUN_STAR_RENDERING_TEXTURINGMODE_HPP_
 #include <com/sun/star/rendering/TexturingMode.hpp>
-#endif
-#ifndef _COM_SUN_STAR_RENDERING_XPARAMETRICPOLYPOLYGON2DFACTORY_HPP_
 #include <com/sun/star/rendering/XParametricPolyPolygon2DFactory.hpp>
-#endif
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/geometry/RealPoint2D.hpp>
+#include <com/sun/star/rendering/ViewState.hpp>
+#include <com/sun/star/rendering/RenderState.hpp>
+#include <com/sun/star/rendering/XCanvasFont.hpp>
+#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
+#include <com/sun/star/rendering/XCanvas.hpp>
+#include <com/sun/star/rendering/PathCapType.hpp>
+#include <com/sun/star/rendering/PathJoinType.hpp>
 
-#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
 #include <basegfx/tools/canvastools.hxx>
-#endif
-#ifndef _BGFX_NUMERIC_FTOOLS_HXX
 #include <basegfx/numeric/ftools.hxx>
-#endif
-#ifndef _BGFX_POLYGON_B2DPOLYPOLYGONTOOLS_HXX
 #include <basegfx/polygon/b2dpolypolygontools.hxx>
-#endif
-#ifndef _BGFX_POLYGON_B2DPOLYGONTOOLS_HXX
 #include <basegfx/polygon/b2dpolygontools.hxx>
-#endif
-#ifndef _CANVAS_CANVASTOOLS_HXX
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/vector/b2dsize.hxx>
+#include <basegfx/range/b2drectangle.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
+
 #include <canvas/canvastools.hxx>
-#endif
-#ifndef _VCL_CANVASTOOLS_HXX
 #include <vcl/canvastools.hxx>
-#endif
 #include <vcl/salbtype.hxx>
+#include <vcl/gdimtf.hxx>
+#include <vcl/metaact.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/metric.hxx>
+#include <vcl/graphictools.hxx>
+#include <tools/poly.hxx>
 
 #include <implrenderer.hxx>
 #include <tools.hxx>
@@ -107,66 +102,6 @@
 
 #include <boost/scoped_array.hpp>
 
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
-#include <com/sun/star/uno/Sequence.hxx>
-#endif
-
-#ifndef _COM_SUN_STAR_GEOMETRY_REALPOINT2D_HPP__
-#include <com/sun/star/geometry/RealPoint2D.hpp>
-#endif
-#ifndef _COM_SUN_STAR_RENDERING_VIEWSTATE_HPP__
-#include <com/sun/star/rendering/ViewState.hpp>
-#endif
-#ifndef _COM_SUN_STAR_RENDERING_RENDERSTATE_HPP__
-#include <com/sun/star/rendering/RenderState.hpp>
-#endif
-#ifndef _COM_SUN_STAR_RENDERING_XCANVASFONT_HPP__
-#include <com/sun/star/rendering/XCanvasFont.hpp>
-#endif
-#ifndef _COM_SUN_STAR_RENDERING_XPOLYPOLYGON2D_HPP__
-#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
-#endif
-#ifndef _COM_SUN_STAR_RENDERING_XCANVAS_HPP__
-#include <com/sun/star/rendering/XCanvas.hpp>
-#endif
-#ifndef _COM_SUN_STAR_RENDERING_PATHCAPTYPE_HPP__
-#include <com/sun/star/rendering/PathCapType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_RENDERING_PATHJOINTYPE_HPP__
-#include <com/sun/star/rendering/PathJoinType.hpp>
-#endif
-
-#ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#endif
-#ifndef _BGFX_TUPLE_B2DTUPLE_HXX
-#include <basegfx/tuple/b2dtuple.hxx>
-#endif
-
-#ifndef _SV_GDIMTF_HXX
-#include <vcl/gdimtf.hxx>
-#endif
-
-#ifndef _SV_METAACT_HXX
-#include <vcl/metaact.hxx>
-#endif
-
-#ifndef _SV_VIRDEV_HXX
-#include <vcl/virdev.hxx>
-#endif
-
-#ifndef _SV_METRIC_HXX
-#include <vcl/metric.hxx>
-#endif
-
-#ifndef _TL_POLY_HXX
-#include <tools/poly.hxx>
-#endif
-
-#ifndef _VCL_GRAPHICTOOLS_HXX_
-#include <vcl/graphictools.hxx>
-#endif
-
 #include "mtftools.hxx"
 #include "outdevstate.hxx"
 
@@ -199,59 +134,6 @@
         }
     }
 
-    void setupStrokeAttributes( rendering::StrokeAttributes& 
o_rStrokeAttributes,
-                                const VirtualDevice&            rVDev,
-                                const LineInfo&                                
 rLineInfo                              )
-    {
-        const Size aWidth( rLineInfo.GetWidth(), 0 );
-        o_rStrokeAttributes.StrokeWidth = 
-            rVDev.LogicToPixel( aWidth ).Width();
-
-        // setup reasonable defaults
-        o_rStrokeAttributes.MiterLimit          = 1.0;
-        o_rStrokeAttributes.StartCapType = rendering::PathCapType::BUTT;
-        o_rStrokeAttributes.EndCapType   = rendering::PathCapType::BUTT;
-        o_rStrokeAttributes.JoinType     = rendering::PathJoinType::MITER;
-
-        if( LINE_DASH == rLineInfo.GetStyle() )
-        {
-            // interpret dash info only if explicitely enabled as
-            // style
-            const Size aDistance( rLineInfo.GetDistance(), 0 );
-            const sal_Int32 nDistance( rVDev.LogicToPixel( aDistance ).Width() 
);
-
-            const Size aDashLen( rLineInfo.GetDashLen(), 0 );
-            const sal_Int32 nDashLen( rVDev.LogicToPixel( aDashLen ).Width() );
-
-            const Size aDotLen( rLineInfo.GetDotLen(), 0 );
-            const sal_Int32 nDotLen( rVDev.LogicToPixel( aDotLen ).Width() );
-
-            const sal_Int32 nNumArryEntries( 2*rLineInfo.GetDashCount() +
-                                             2*rLineInfo.GetDotCount() );
-                        
-            o_rStrokeAttributes.DashArray.realloc( nNumArryEntries );
-            double* pDashArray = o_rStrokeAttributes.DashArray.getArray();
-
-
-            // iteratively fill dash array, first with dashs, then
-            // with dots.
-            // ===================================================
-
-            sal_Int32 nCurrEntry=0;
-
-            for( sal_Int32 i=0; i<rLineInfo.GetDashCount(); ++i )
-            {
-                pDashArray[nCurrEntry++] = nDashLen;
-                pDashArray[nCurrEntry++] = nDistance;
-            }
-            for( sal_Int32 i=0; i<rLineInfo.GetDotCount(); ++i )
-            {
-                pDashArray[nCurrEntry++] = nDotLen;
-                pDashArray[nCurrEntry++] = nDistance;
-            }            
-        }
-    }
-
 
     // state stack manipulators
     // ------------------------
@@ -330,10 +212,10 @@
                 aCalculatedNewState.textColor = rNewState.textColor;
             }
 
-            // is handled by state tracking VDev
-            // if( (aCalculatedNewState.pushFlags & PUSH_MAPMODE) )
-            // {
-            // }
+            if( (aCalculatedNewState.pushFlags & PUSH_MAPMODE) )
+            {
+                aCalculatedNewState.mapModeTransform = 
rNewState.mapModeTransform;
+            }
 
             if( (aCalculatedNewState.pushFlags & PUSH_CLIPREGION) )
             {
@@ -392,6 +274,62 @@
         }
     }
 
+    void setupStrokeAttributes( rendering::StrokeAttributes&                   
       o_rStrokeAttributes,
+                                const 
::cppcanvas::internal::ActionFactoryParameters& rParms,
+                                const LineInfo&                                
       rLineInfo                                )
+    {
+        const ::basegfx::B2DSize aWidth( rLineInfo.GetWidth(), 0 );
+        o_rStrokeAttributes.StrokeWidth = 
+            (getState( rParms.mrStates ).mapModeTransform * aWidth).getX();
+
+        // setup reasonable defaults
+        o_rStrokeAttributes.MiterLimit          = 1.0;
+        o_rStrokeAttributes.StartCapType = rendering::PathCapType::BUTT;
+        o_rStrokeAttributes.EndCapType   = rendering::PathCapType::BUTT;
+        o_rStrokeAttributes.JoinType     = rendering::PathJoinType::MITER;
+
+        if( LINE_DASH == rLineInfo.GetStyle() )
+        {
+            const ::cppcanvas::internal::OutDevState& rState( getState( 
rParms.mrStates ) );
+
+            // interpret dash info only if explicitely enabled as
+            // style
+            const ::basegfx::B2DSize aDistance( rLineInfo.GetDistance(), 0 );
+            const double nDistance( (rState.mapModeTransform * 
aDistance).getX() );
+
+            const ::basegfx::B2DSize aDashLen( rLineInfo.GetDashLen(), 0 );
+            const double nDashLen( (rState.mapModeTransform * aDashLen).getX() 
);
+
+            const ::basegfx::B2DSize aDotLen( rLineInfo.GetDotLen(), 0 );
+            const double nDotLen( (rState.mapModeTransform * aDotLen).getX() );
+
+            const sal_Int32 nNumArryEntries( 2*rLineInfo.GetDashCount() +
+                                             2*rLineInfo.GetDotCount() );
+                        
+            o_rStrokeAttributes.DashArray.realloc( nNumArryEntries );
+            double* pDashArray = o_rStrokeAttributes.DashArray.getArray();
+
+
+            // iteratively fill dash array, first with dashs, then
+            // with dots.
+            // ===================================================
+
+            sal_Int32 nCurrEntry=0;
+
+            for( sal_Int32 i=0; i<rLineInfo.GetDashCount(); ++i )
+            {
+                pDashArray[nCurrEntry++] = nDashLen;
+                pDashArray[nCurrEntry++] = nDistance;
+            }
+            for( sal_Int32 i=0; i<rLineInfo.GetDotCount(); ++i )
+            {
+                pDashArray[nCurrEntry++] = nDotLen;
+                pDashArray[nCurrEntry++] = nDistance;
+            }            
+        }
+    }
+
+
     /** Create masked BitmapEx, where the white areas of rBitmap are
         transparent, and the other appear in rMaskColor.
      */
@@ -418,12 +356,10 @@
 {
     namespace internal
     {
-        bool ImplRenderer::createFillAndStroke( const ::PolyPolygon&           
rPolyPoly,
-                                                const CanvasSharedPtr&         
rCanvas,
-                                                sal_Int32&                     
                rActionIndex,
-                                                const VectorOfOutDevStates&    
rStates )
+        bool ImplRenderer::createFillAndStroke( const 
::basegfx::B2DPolyPolygon& rPolyPoly,
+                                                const ActionFactoryParameters& 
  rParms )
         {
-            const OutDevState& rState( getState( rStates ) );
+            const OutDevState& rState( getState( rParms.mrStates ) );
             if( (!rState.isLineColorSet &&
                  !rState.isFillColorSet) ||
                 (rState.lineColor.getLength() == 0 &&
@@ -434,21 +370,28 @@
 
             ActionSharedPtr pPolyAction( 
                 internal::PolyPolyActionFactory::createPolyPolyAction(
-                    rPolyPoly, rCanvas, rState ) );
+                    rPolyPoly, rParms.mrCanvas, rState ) );
 
             if( pPolyAction )
             {
                 maActions.push_back(
                     MtfAction(
                         pPolyAction,
-                        rActionIndex ) );
+                        rParms.mrCurrActionIndex ) );
                 
-                rActionIndex += pPolyAction->getActionCount()-1;
+                rParms.mrCurrActionIndex += pPolyAction->getActionCount()-1;
             }
 
             return true;
         }
 
+        bool ImplRenderer::createFillAndStroke( const ::basegfx::B2DPolygon&   
rPoly,
+                                                const ActionFactoryParameters& 
rParms )
+        {
+            return createFillAndStroke( ::basegfx::B2DPolyPolygon( rPoly ),
+                                        rParms );
+        }
+
         void ImplRenderer::skipContent( GDIMetaFile& rMtf,
                                         const char*  pCommentString,
                                         sal_Int32&      io_rCurrActionIndex ) 
const
@@ -525,17 +468,14 @@
 
         void ImplRenderer::createGradientAction( const ::PolyPolygon&          
        rPoly,
                                                  const ::Gradient&             
                rGradient,
-                                                 ::VirtualDevice&              
                rVDev,
-                                                 const CanvasSharedPtr&        
                rCanvas,
-                                                 VectorOfOutDevStates&         
        rStates,
-                                                 const Parameters&             
                rParms,
-                                                 sal_Int32&                    
                        io_rCurrActionIndex,
+                                                 const 
ActionFactoryParameters& rParms,
                                                  bool                          
                        bIsPolygonRectangle,
                                                  bool                          
                        bSubsettableActions )
         {
             DBG_TESTSOLARMUTEX();
 
-            ::PolyPolygon aDevicePoly( rVDev.LogicToPixel( rPoly ) );
+            ::basegfx::B2DPolyPolygon aDevicePoly( rPoly.getB2DPolyPolygon() );
+            aDevicePoly.transform( getState( rParms.mrStates 
).mapModeTransform );
 
             // decide, whether this gradient can be rendered natively
             // by the canvas, or must be emulated via VCL gradient
@@ -550,7 +490,7 @@
                 nSteps > 64 ) 
             {
                 uno::Reference< rendering::XParametricPolyPolygon2DFactory > 
xFactory(
-                    
rCanvas->getUNOCanvas()->getDevice()->getParametricPolyPolygonFactory() );
+                    
rParms.mrCanvas->getUNOCanvas()->getDevice()->getParametricPolyPolygonFactory() 
);
 
                 if( xFactory.is() )
                 {
@@ -579,16 +519,17 @@
                     aVCLEndColor.SetBlue( (UINT8)(aVCLEndColor.GetBlue() * 
nEndIntensity / 100) );
                     
                     const uno::Sequence< double > aStartColor(
-                        ::vcl::unotools::colorToDoubleSequence( 
rCanvas->getUNOCanvas()->getDevice(),
+                        ::vcl::unotools::colorToDoubleSequence( 
rParms.mrCanvas->getUNOCanvas()->getDevice(),
                                                                 aVCLStartColor 
) );
                     const uno::Sequence< double > aEndColor(
-                        ::vcl::unotools::colorToDoubleSequence( 
rCanvas->getUNOCanvas()->getDevice(),
+                        ::vcl::unotools::colorToDoubleSequence( 
rParms.mrCanvas->getUNOCanvas()->getDevice(),
                                                                 aVCLEndColor ) 
);
 
                     // Setup texture transformation
                     // ----------------------------
                     
-                    const Rectangle aBounds( aDevicePoly.GetBoundRect() );
+                    const ::basegfx::B2DRectangle aBounds( 
+                        ::basegfx::tools::getRange(aDevicePoly) );
 
                     // setup rotation angle. VCL rotates
                     // counter-clockwise, while canvas transformation
@@ -670,15 +611,15 @@
                             // nScaleX)
                             const double nScale( 
                                 ::basegfx::pruneScaleValue(
-                                    fabs( aBounds.GetHeight()*sin(nRotation) ) 
+ 
-                                    fabs( aBounds.GetWidth()*cos(nRotation) 
)));
+                                    fabs( aBounds.getHeight()*sin(nRotation) ) 
+ 
+                                    fabs( aBounds.getWidth()*cos(nRotation) 
)));
 
                             aTextureTransformation.scale( nScale, nScale );
 
                             // translate back origin to center of
                             // primitive
-                            aTextureTransformation.translate( 
0.5*aBounds.GetWidth(),
-                                                              
0.5*aBounds.GetHeight() );
+                            aTextureTransformation.translate( 
0.5*aBounds.getWidth(),
+                                                              
0.5*aBounds.getHeight() );
                         }
                         break;
 
@@ -697,8 +638,8 @@
                             // Respect border value, while doing so, the VCL
                             // gradient's border will effectively shrink the
                             // resulting gradient.
-                            double nScaleX( aBounds.GetWidth() * (1.0 - 
rGradient.GetBorder() / 100.0) );
-                            double nScaleY( aBounds.GetHeight()* (1.0 - 
rGradient.GetBorder() / 100.0) );
+                            double nScaleX( aBounds.getWidth() * (1.0 - 
rGradient.GetBorder() / 100.0) );
+                            double nScaleY( aBounds.getHeight()* (1.0 - 
rGradient.GetBorder() / 100.0) );
 
                             // determine offset values. Since the border is
                             // divided half-by-half to both sides of the
@@ -710,9 +651,9 @@
                             // primitive, and offset of 50% effectively must
                             // yield zero shift. Both values will potentially
                             // be adapted in switch statement below.
-                            double nOffsetX( aBounds.GetWidth() * 
+                            double nOffsetX( aBounds.getWidth() * 
                                              (2.0 * rGradient.GetOfsX() - 
100.0 + rGradient.GetBorder()) / 200.0 );
-                            double nOffsetY( aBounds.GetHeight() * 
+                            double nOffsetY( aBounds.getHeight() * 
                                              (2.0 * rGradient.GetOfsY() - 
100.0 + rGradient.GetBorder()) / 200.0 );
 
                             // determine type of gradient (and necessary
@@ -736,7 +677,7 @@
 
                                     // enlarge gradient to match bound rect 
diagonal
                                     aTextureTransformation.translate( -0.5, 
-0.5 );
-                                    const double nScale( 
hypot(aBounds.GetWidth(), aBounds.GetHeight()) / nScaleX );
+                                    const double nScale( 
hypot(aBounds.getWidth(), aBounds.getHeight()) / nScaleX );
                                     aTextureTransformation.scale( nScale, 
nScale );
                                     aTextureTransformation.translate( 0.5, 0.5 
);
 
@@ -755,12 +696,11 @@
                                     aTextureTransformation.scale( 
nSqrt2,nSqrt2 );
                                     aTextureTransformation.translate( 0.5, 0.5 
);
 
-                                    aTexture.Gradient = 
xFactory->createEllipticalGradient( aEndColor,
+                                    aTexture.Gradient = 
xFactory->createEllipticalGradient( 
+                                        aEndColor,
                                                                                
             aStartColor,
-                                                                               
             geometry::RealRectangle2D( aBounds.Left(),
-                                                                               
                                        aBounds.Top(),
-                                                                               
                                        aBounds.Right(),
-                                                                               
                                        aBounds.Bottom() ) );
+                                        
::basegfx::unotools::rectangle2DFromB2DRectangle( 
+                                            aBounds ));
                                 }
                                 break;
 
@@ -787,10 +727,8 @@
                                     aTexture.Gradient = 
xFactory->createRectangularGradient( 
                                         aEndColor,
                                         aStartColor,
-                                        geometry::RealRectangle2D( 
aBounds.Left(),
-                                                                   
aBounds.Top(),
-                                                                   
aBounds.Right(),
-                                                                   
aBounds.Bottom() ) );
+                                        
::basegfx::unotools::rectangle2DFromB2DRectangle( 
+                                            aBounds ) );
                                     break;
 
                                 default: // other cases can't happen
@@ -824,8 +762,8 @@
                     // gradient will always display at the origin, and
                     // not within the polygon bound (which might be
                     // miles away from the origin).
-                    aTextureTransformation.translate( aBounds.Left(), 
-                                                      aBounds.Top() );
+                    aTextureTransformation.translate( aBounds.getMinX(), 
+                                                      aBounds.getMinY() );
 
                     ::basegfx::unotools::affineMatrixFromHomMatrix( 
aTexture.AffineTransform, 
                                                                     
aTextureTransformation );
@@ -833,8 +771,8 @@
                     ActionSharedPtr pPolyAction( 
                         internal::PolyPolyActionFactory::createPolyPolyAction( 
                             aDevicePoly, 
-                            rCanvas, 
-                            getState( rStates ),
+                            rParms.mrCanvas, 
+                            getState( rParms.mrStates ),
                             aTexture ) );
 
                     if( pPolyAction )
@@ -842,9 +780,9 @@
                         maActions.push_back( 
                             MtfAction( 
                                 pPolyAction,
-                                io_rCurrActionIndex ) );
+                                rParms.mrCurrActionIndex ) );
                         
-                        io_rCurrActionIndex += pPolyAction->getActionCount()-1;
+                        rParms.mrCurrActionIndex += 
pPolyAction->getActionCount()-1;
                     }
 
                     // done, using native gradients
@@ -855,7 +793,7 @@
             // cannot currently use native canvas gradients, as a
             // finite step size is given (this funny feature is not
             // supported by the XCanvas API)
-            pushState( rStates, PUSH_ALL );
+            pushState( rParms.mrStates, PUSH_ALL );
 
             if( !bIsPolygonRectangle )
             {
@@ -863,34 +801,29 @@
                 // the first place (the gradient is always limited to
                 // the given bound rect)
                 updateClipping( 
-                    rStates,
-                    aDevicePoly.getB2DPolyPolygon(),
-                    rCanvas,
+                    aDevicePoly,
+                    rParms,
                     true );
             }
 
             GDIMetaFile aTmpMtf;
-            rVDev.AddGradientActions( rPoly.GetBoundRect(),
+            rParms.mrVDev.AddGradientActions( rPoly.GetBoundRect(),
                                       rGradient,
                                       aTmpMtf );
 
-            createActions( rCanvas, rVDev, aTmpMtf, rStates, 
-                           rParms, bSubsettableActions, 
-                           io_rCurrActionIndex );
+            createActions( aTmpMtf, rParms, bSubsettableActions );
 
-            popState( rStates );
+            popState( rParms.mrStates );
         }
 
         uno::Reference< rendering::XCanvasFont > ImplRenderer::createFont( 
double&                                     o_rFontRotation,
                                                                            
const ::Font&                       rFont,
-                                                                           
const CanvasSharedPtr&      rCanvas,
-                                                                           
const ::VirtualDevice&      rVDev,
-                                                                           
const Parameters&           rParms ) const
+                                                                           
const ActionFactoryParameters& rParms ) const
         {
             rendering::FontRequest aFontRequest;
 
-            if( rParms.maFontName.isValid() )
-                aFontRequest.FontDescription.FamilyName = 
rParms.maFontName.getValue();
+            if( rParms.mrParms.maFontName.isValid() )
+                aFontRequest.FontDescription.FamilyName = 
rParms.mrParms.maFontName.getValue();
             else
                 aFontRequest.FontDescription.FamilyName = rFont.GetName(); 
 
@@ -901,12 +834,12 @@
 
             // TODO(F2): improve vclenum->panose conversion
             aFontRequest.FontDescription.FontDescription.Weight = 
-                rParms.maFontWeight.isValid() ?
-                rParms.maFontWeight.getValue() :
+                rParms.mrParms.maFontWeight.isValid() ?
+                rParms.mrParms.maFontWeight.getValue() :
                 ::canvas::tools::numeric_cast<sal_Int8>( ::basegfx::fround( 
rFont.GetWeight() ) );
             aFontRequest.FontDescription.FontDescription.Letterform = 
-                rParms.maFontLetterForm.isValid() ?
-                rParms.maFontLetterForm.getValue() :
+                rParms.mrParms.maFontLetterForm.isValid() ?
+                rParms.mrParms.maFontLetterForm.getValue() :
                 (rFont.GetItalic() == ITALIC_NONE) ? 0 : 9;
 
             // setup state-local text transformation,
@@ -928,13 +861,16 @@
 
             // TODO(F2): use correct scale direction, font
             // height might be width or anything else
+
+            // TODO(Q3): This code smells of programming by
+            // coincidence (the next two if statements)
             const ::Size rFontSizeLog( rFont.GetSize() );
             const sal_Int32 nFontWidthLog = rFontSizeLog.Width();
             if( nFontWidthLog != 0 )
             {
                 ::Font aTestFont = rFont;
                 aTestFont.SetWidth( 0 );
-                sal_Int32 nNormalWidth = rVDev.GetFontMetric( aTestFont 
).GetWidth();
+                sal_Int32 nNormalWidth = rParms.mrVDev.GetFontMetric( 
aTestFont ).GetWidth();
                 if( nNormalWidth != nFontWidthLog )
                     if( nNormalWidth )
                         aFontMatrix.m00 = (double)nFontWidthLog / nNormalWidth;
@@ -943,25 +879,25 @@
             // #i52608# apply map mode scale also to font matrix - an
             // anisotrophic mapmode must be reflected in an
             // anisotrophic font matrix scale.
-            const ::Size& rScale10000( 
-                rVDev.LogicToPixel( Size(100000L,
-                                         100000L) ) );
-            const sal_Int32 nWidth( rScale10000.Width() );
-            const sal_Int32 nHeight( rScale10000.Height() );
-            if( nWidth != nHeight )
+            const OutDevState& rState( getState( rParms.mrStates ) );
+            if( !::basegfx::fTools::equal(
+                    rState.mapModeTransform.get(0,0),
+                    rState.mapModeTransform.get(1,1)) )
             {
+                const double nScaleX( rState.mapModeTransform.get(0,0) );
+                const double nScaleY( rState.mapModeTransform.get(1,1) );
+
                 // note: no reason to check for division by zero, we
                 // always have the value closer (or equal) to zero as
                 // the nominator.
-                if( abs(nWidth) < abs(nHeight) )
-                    aFontMatrix.m00 *= (double)nWidth / nHeight;
+                if( fabs(nScaleX) < fabs(nScaleY) )
+                    aFontMatrix.m00 *= nScaleX / nScaleY;
                 else
-                    aFontMatrix.m11 *= (double)nHeight / nWidth;
+                    aFontMatrix.m11 *= nScaleY / nScaleX;
             }
+            aFontRequest.CellSize = (rState.mapModeTransform * 
::vcl::unotools::b2DSizeFromSize(rFontSizeLog)).getY();
 
-            aFontRequest.CellSize = rVDev.LogicToPixel( rFontSizeLog 
).Height();
-
-            return rCanvas->getUNOCanvas()->createFont( aFontRequest,
+            return rParms.mrCanvas->getUNOCanvas()->createFont( aFontRequest,
                                                         uno::Sequence< 
beans::PropertyValue >(),
                                                         aFontMatrix );
         }
@@ -972,12 +908,8 @@
                                              int                               
        nIndex,
                                              int                               
        nLength,
                                              const sal_Int32*          
pCharWidths,
-                                             ::VirtualDevice&          rVDev,
-                                             const CanvasSharedPtr&    rCanvas,
-                                             VectorOfOutDevStates&     rStates,
-                                             const Parameters&                 
rParms,
-                                             bool                              
        bSubsettableActions,
-                                             sal_Int32&                        
        io_rCurrActionIndex )
+                                             const ActionFactoryParameters& 
rParms,
+                                             bool                           
bSubsettableActions )
         {
             ENSURE_AND_THROW( nIndex >= 0 && nLength <= rString.Len() + nIndex,
                               "ImplRenderer::createTextWithEffectsAction(): 
Invalid text index" );
@@ -985,7 +917,7 @@
             if( !nLength )
                 return; // zero-length text, no visible output
 
-            const OutDevState& rState( getState( rStates ) );
+            const OutDevState& rState( getState( rParms.mrStates ) );
 
             // TODO(F2): implement all text effects
             // if( rState.textAlignment );             // TODO(F2): NYI
@@ -999,7 +931,7 @@
             {
                 // calculate shadow offset (similar to outdev3.cxx)
                 // TODO(F3): better match with outdev3.cxx
-                sal_Int32 nShadowOffset = static_cast<sal_Int32>(1.5 + 
((rVDev.GetFont().GetHeight()-24.0)/24.0));
+                sal_Int32 nShadowOffset = static_cast<sal_Int32>(1.5 + 
((rParms.mrVDev.GetFont().GetHeight()-24.0)/24.0));
                 if( nShadowOffset < 1 )
                     nShadowOffset = 1;
 
@@ -1008,7 +940,7 @@
 
                 // determine shadow color (from outdev3.cxx)
                 ::Color aTextColor = ::vcl::unotools::sequenceToColor(
-                    rCanvas->getUNOCanvas()->getDevice(), rState.textColor );
+                    rParms.mrCanvas->getUNOCanvas()->getDevice(), 
rState.textColor );
                 bool bIsDark = (aTextColor.GetColor() == COL_BLACK)
                     || (aTextColor.GetLuminance() < 8);
 
@@ -1019,7 +951,7 @@
             if( rState.textReliefStyle )
             {
                 // calculate relief offset (similar to outdev3.cxx)
-                sal_Int32 nReliefOffset = rVDev.PixelToLogic( Size( 1, 1 ) 
).Height();
+                sal_Int32 nReliefOffset = rParms.mrVDev.PixelToLogic( Size( 1, 
1 ) ).Height();
                 nReliefOffset += nReliefOffset/2;
                 if( nReliefOffset < 1 )
                     nReliefOffset = 1;
@@ -1032,7 +964,7 @@
 
                 // determine relief color (from outdev3.cxx)
                 ::Color aTextColor = ::vcl::unotools::sequenceToColor(
-                    rCanvas->getUNOCanvas()->getDevice(), 
+                    rParms.mrCanvas->getUNOCanvas()->getDevice(), 
                     rState.textColor );
 
                 aReliefColor = ::Color( COL_LIGHTGRAY );
@@ -1043,8 +975,8 @@
                 if( aTextColor.GetColor() == COL_BLACK )
                 {
                     aTextColor = ::Color( COL_WHITE );
-                    getState( rStates ).textColor =
-                        ::vcl::unotools::colorToDoubleSequence( 
rCanvas->getUNOCanvas()->getDevice(),
+                    getState( rParms.mrStates ).textColor =
+                        ::vcl::unotools::colorToDoubleSequence( 
rParms.mrCanvas->getUNOCanvas()->getDevice(),
                                                                 aTextColor );
                 }
 
@@ -1065,10 +997,10 @@
                     nIndex,
                     nLength,
                     pCharWidths,
-                    rVDev,
-                    rCanvas,
+                    rParms.mrVDev,
+                    rParms.mrCanvas,
                     rState,
-                    rParms,
+                    rParms.mrParms,
                     bSubsettableActions ) );
 
             if( pTextAction )
@@ -1076,18 +1008,17 @@
                 maActions.push_back( 
                     MtfAction( 
                         pTextAction,
-                        io_rCurrActionIndex ) );
+                        rParms.mrCurrActionIndex ) );
 
-                io_rCurrActionIndex += pTextAction->getActionCount()-1;
+                rParms.mrCurrActionIndex += pTextAction->getActionCount()-1;
             }
                }
 
-        void ImplRenderer::updateClipping( VectorOfOutDevStates&               
        rStates,
-                                           const ::basegfx::B2DPolyPolygon&    
rClipPoly,
-                                           const CanvasSharedPtr&              
        rCanvas,
+        void ImplRenderer::updateClipping( const ::basegfx::B2DPolyPolygon&    
rClipPoly,
+                                           const ActionFactoryParameters&   
rParms,
                                            bool                                
                                bIntersect )
         {
-            ::cppcanvas::internal::OutDevState& rState( getState( rStates ) );
+            ::cppcanvas::internal::OutDevState& rState( getState( 
rParms.mrStates ) );
             ::basegfx::B2DPolyPolygon aClipPoly( rClipPoly );
 
             const bool bEmptyClipRect( rState.clipRect.IsEmpty() );
@@ -1147,7 +1078,7 @@
                 else
                 {
                     rState.xClipPoly = 
::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(
-                        rCanvas->getUNOCanvas()->getDevice(),
+                        rParms.mrCanvas->getUNOCanvas()->getDevice(),
                         ::basegfx::B2DPolyPolygon(
                             ::basegfx::tools::createPolygonFromRect( 
                                 // #121100# VCL rectangular clips
@@ -1162,17 +1093,16 @@
             else
             {
                 rState.xClipPoly = 
::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(
-                    rCanvas->getUNOCanvas()->getDevice(),
+                    rParms.mrCanvas->getUNOCanvas()->getDevice(),
                     rState.clip );
             }
         }
 
-        void ImplRenderer::updateClipping( VectorOfOutDevStates&       rStates,
-                                           const ::Rectangle&          
rClipRect,
-                                           const CanvasSharedPtr&      rCanvas,
+        void ImplRenderer::updateClipping( const ::Rectangle&                
rClipRect,
+                                           const ActionFactoryParameters& 
rParms,
                                            bool                                
                bIntersect )
         {
-            ::cppcanvas::internal::OutDevState& rState( getState( rStates ) );
+            ::cppcanvas::internal::OutDevState& rState( getState( 
rParms.mrStates ) );
 
             const bool bEmptyClipRect( rState.clipRect.IsEmpty() );
             const bool bEmptyClipPoly( rState.clip.count() == 0 );
@@ -1232,7 +1162,7 @@
                 else
                 {
                     rState.xClipPoly = 
::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(
-                        rCanvas->getUNOCanvas()->getDevice(),
+                        rParms.mrCanvas->getUNOCanvas()->getDevice(),
                         ::basegfx::B2DPolyPolygon(
                             ::basegfx::tools::createPolygonFromRect( 
                                 // #121100# VCL rectangular clips
@@ -1247,18 +1177,14 @@
             else
             {
                 rState.xClipPoly = 
::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(
-                    rCanvas->getUNOCanvas()->getDevice(),
+                    rParms.mrCanvas->getUNOCanvas()->getDevice(),
                     rState.clip );
             }
         }
 
-        bool ImplRenderer::createActions( const CanvasSharedPtr&       rCanvas,
-                                          VirtualDevice&                       
rVDev,
-                                          GDIMetaFile&                         
rMtf,
-                                          VectorOfOutDevStates&                
rStates,
-                                          const Parameters&            rParms,
-                                          bool                                 
        bSubsettableActions,
-                                          sal_Int32&                           
io_rCurrActionIndex )
+        bool ImplRenderer::createActions( GDIMetaFile&                         
     rMtf,
+                                          const ActionFactoryParameters& 
rFactoryParms,
+                                          bool                           
bSubsettableActions )
         {
             /* TODO(P2): interpret mtf-comments
                ================================
@@ -1277,6 +1203,14 @@
 
              */
 
+            // alias common parameters
+            VectorOfOutDevStates&  rStates(rFactoryParms.mrStates);
+            const CanvasSharedPtr& rCanvas(rFactoryParms.mrCanvas);
+            ::VirtualDevice&       rVDev(rFactoryParms.mrVDev);
+            const Parameters&      rParms(rFactoryParms.mrParms);
+            sal_Int32&             
io_rCurrActionIndex(rFactoryParms.mrCurrActionIndex);
+            
+
             // Loop over every metaaction
             // ==========================
             MetaAction* pCurrAct;
@@ -1316,8 +1250,11 @@
                         break;
 
                     case META_MAPMODE_ACTION:
-                        // Currently ignored, only affects rVDev (for
-                        // which it _is_ executed)
+                        // modify current mapModeTransformation
+                        // transformation, such that subsequent
+                        // coordinates map correctly
+                        tools::calcLogic2PixelAffineTransform( getState( 
rStates ).mapModeTransform,
+                                                               rVDev );
                         break;
 
                     // monitor clip regions, to assemble clip polygon on our 
own
@@ -1337,26 +1274,27 @@
                                 VERBOSE_TRACE( "ImplRenderer::createActions(): 
non-polygonal clip "
                                                "region encountered, falling 
back to bounding box!" );
 
+                                // #121806# explicitely kept integer
                                 Rectangle aClipRect( 
                                     rVDev.LogicToPixel( 
                                         
pClipAction->GetRegion().GetBoundRect() ) );
 
                                 // intersect current clip with given rect
                                 updateClipping( 
-                                    rStates,
                                     aClipRect,
-                                    rCanvas,
+                                    rFactoryParms,
                                     false );
                             }
                             else
                             {
                                 // set new clip polygon (don't intersect
                                 // with old one, just set it)
+
+                                // #121806# explicitely kept integer
                                 updateClipping( 
-                                    rStates,
                                     rVDev.LogicToPixel( 
                                         
pClipAction->GetRegion().GetPolyPolygon() ).getB2DPolyPolygon(),
-                                    rCanvas,
+                                    rFactoryParms,
                                     false );
                             }
                         }
@@ -1367,14 +1305,15 @@
                     case META_ISECTRECTCLIPREGION_ACTION:
                     {
                         MetaISectRectClipRegionAction* pClipAction = 
static_cast<MetaISectRectClipRegionAction*>(pCurrAct);
+
+                        // #121806# explicitely kept integer
                         Rectangle aClipRect( 
                             rVDev.LogicToPixel( pClipAction->GetRect() ) );
 
                         // intersect current clip with given rect
                         updateClipping( 
-                            rStates,
                             aClipRect,
-                            rCanvas,
+                            rFactoryParms,
                             true );
 
                         break;
@@ -1389,24 +1328,25 @@
                             VERBOSE_TRACE( "ImplRenderer::createActions(): 
non-polygonal clip "
                                            "region encountered, falling back 
to bounding box!" );
 
+                            // #121806# explicitely kept integer
                             Rectangle aClipRect( 
                                 rVDev.LogicToPixel( 
pClipAction->GetRegion().GetBoundRect() ) );
 
                             // intersect current clip with given rect
                             updateClipping( 
-                                rStates,
                                 aClipRect,
-                                rCanvas,
+                                rFactoryParms,
                                 true );
                         }
                         else
                         {
                             // intersect current clip with given clip polygon
+
+                            // #121806# explicitely kept integer
                             updateClipping( 
-                                rStates,
                                 rVDev.LogicToPixel( 
                                     pClipAction->GetRegion().GetPolyPolygon() 
).getB2DPolyPolygon(),
-                                rCanvas,
+                                rFactoryParms,
                                 true );
                         }
 
@@ -1493,9 +1433,7 @@
 
                         rState.xFont = createFont( rState.fontRotation,
                                                    rFont,
-                                                   rCanvas,
-                                                   rVDev,
-                                                   rParms );
+                                                   rFactoryParms );
 
                         // TODO(Q2): define and use appropriate enumeration 
types
                         rState.textReliefStyle          = 
(sal_Int8)rFont.GetRelief();
@@ -1569,11 +1507,7 @@
                         MetaGradientAction* pGradAct = 
static_cast<MetaGradientAction*>(pCurrAct);
                         createGradientAction( ::Polygon( pGradAct->GetRect() ),
                                               pGradAct->GetGradient(),
-                                              rVDev,
-                                              rCanvas,
-                                              rStates,
-                                              rParms,
-                                              io_rCurrActionIndex,
+                                              rFactoryParms,
                                               true,
                                               bSubsettableActions );
                     }
@@ -1587,9 +1521,8 @@
                         rVDev.AddHatchActions( 
static_cast<MetaHatchAction*>(pCurrAct)->GetPolyPolygon(),
                                                
static_cast<MetaHatchAction*>(pCurrAct)->GetHatch(),
                                                aTmpMtf );
-                        createActions( rCanvas, rVDev, aTmpMtf, rStates, 
-                                       rParms, bSubsettableActions,
-                                       io_rCurrActionIndex );
+                        createActions( aTmpMtf, rFactoryParms,
+                                       bSubsettableActions );
                     }
                     break;
 
@@ -1598,6 +1531,7 @@
                         MetaEPSAction*                 pAct = 
static_cast<MetaEPSAction*>(pCurrAct);
                         const GDIMetaFile&  rSubstitute = 
pAct->GetSubstitute();
 
+                        // #121806# explicitely kept integer
                         const Size aMtfSize( rSubstitute.GetPrefSize() );
                         const Size aMtfSizePixPre( rVDev.LogicToPixel( 
aMtfSize,
                                                                        
rSubstitute.GetPrefMapMode() ) );
@@ -1628,11 +1562,9 @@
                         rVDev.Push();
                         rVDev.SetMapMode( rSubstitute.GetPrefMapMode() );
                         
-                        createActions( rCanvas, rVDev,
-                                       
const_cast<GDIMetaFile&>(pAct->GetSubstitute()),
-                                       rStates, rParms,
-                                       bSubsettableActions,
-                                       io_rCurrActionIndex );
+                        createActions( 
const_cast<GDIMetaFile&>(pAct->GetSubstitute()),
+                                       rFactoryParms,
+                                       bSubsettableActions );
 
                         rVDev.Pop();
                         popState( rStates );
@@ -1671,11 +1603,7 @@
                                             {
                                                 createGradientAction( 
pGradAction->GetPolyPolygon(),
                                                                       
pGradAction->GetGradient(),
-                                                                      rVDev,
-                                                                      rCanvas,
-                                                                      rStates,
-                                                                      rParms,
-                                                                      
io_rCurrActionIndex,
+                                                                      
rFactoryParms,
                                                                       false,
                                                                       
bSubsettableActions );
                                             }
@@ -1769,9 +1697,11 @@
                                     ::PolyPolygon aPath;
                                     aFill.getPath( aPath );
 
+                                    ::basegfx::B2DPolyPolygon aPoly( 
aPath.getB2DPolyPolygon() );
+                                    aPoly.transform( getState( rStates 
).mapModeTransform ); 
                                     ActionSharedPtr pPolyAction( 
                                         
internal::PolyPolyActionFactory::createPolyPolyAction( 
-                                            rVDev.LogicToPixel( aPath ),
+                                            aPoly,
                                             rCanvas, 
                                             getState( rStates ),
                                             aTexture ) );
@@ -1812,7 +1742,8 @@
                         {
                             ActionSharedPtr pPointAction( 
                                 
internal::PointActionFactory::createPointAction(
-                                    rVDev.LogicToPixel( 
static_cast<MetaPointAction*>(pCurrAct)->GetPoint() ),
+                                    rState.mapModeTransform * 
::vcl::unotools::b2DPointFromPoint( 
+                                        
static_cast<MetaPointAction*>(pCurrAct)->GetPoint() ),
                                     rCanvas,
                                     rState ) );
 
@@ -1836,7 +1767,7 @@
                         {
                             ActionSharedPtr pPointAction( 
                                 
internal::PointActionFactory::createPointAction(
-                                    rVDev.LogicToPixel(
+                                    rState.mapModeTransform * 
::vcl::unotools::b2DPointFromPoint( 
                                         
static_cast<MetaPixelAction*>(pCurrAct)->GetPoint() ),
                                     rCanvas,
                                     rState,
@@ -1864,9 +1795,10 @@
                             
                             const LineInfo& rLineInfo( pLineAct->GetLineInfo() 
);
 
-                            ::Point aPoints[2];
-                            aPoints[0] = rVDev.LogicToPixel( 
pLineAct->GetStartPoint() );
-                            aPoints[1] = rVDev.LogicToPixel( 
pLineAct->GetEndPoint() );
+                            const ::basegfx::B2DPoint aStartPoint(
+                                rState.mapModeTransform * 
::vcl::unotools::b2DPointFromPoint( pLineAct->GetStartPoint() ));
+                            const ::basegfx::B2DPoint aEndPoint(
+                                rState.mapModeTransform * 
::vcl::unotools::b2DPointFromPoint( pLineAct->GetEndPoint() ));
 
                             ActionSharedPtr pLineAction;
 
@@ -1875,8 +1807,8 @@
                                 // plain hair line
                                 pLineAction =    
                                     
internal::LineActionFactory::createLineAction(
-                                        aPoints[0],
-                                        aPoints[1],
+                                        aStartPoint,
+                                        aEndPoint,
                                         rCanvas,
                                         rState );
 
@@ -1896,17 +1828,19 @@
                                 rendering::StrokeAttributes aStrokeAttributes;
                                 
                                 setupStrokeAttributes( aStrokeAttributes,
-                                                       rVDev,
+                                                       rFactoryParms,
                                                        rLineInfo );
                                 
                                 // XCanvas can only stroke polygons,
                                 // not simple lines - thus, handle
                                 // this case via the polypolygon
                                 // action
+                                ::basegfx::B2DPolygon aPoly;
+                                aPoly.append( aStartPoint );
+                                aPoly.append( aEndPoint );
                                 pLineAction =   
                                     
internal::PolyPolyActionFactory::createPolyPolyAction(
-                                        ::PolyPolygon(
-                                            ::Polygon( 2, aPoints ) ), 
+                                        ::basegfx::B2DPolyPolygon( aPoly ), 
                                         rCanvas, rState, aStrokeAttributes );
 
                                 if( pLineAction )
@@ -1927,63 +1861,117 @@
 
                     case META_RECT_ACTION:
                     {
-                        Rectangle aPixelRect( 
-                            rVDev.LogicToPixel( 
static_cast<MetaRectAction*>(pCurrAct)->GetRect() ) );
+                        const Rectangle& rRect( 
+                            static_cast<MetaRectAction*>(pCurrAct)->GetRect() 
);
+
+                        if( rRect.IsEmpty() )
+                            break;
 
+                        const OutDevState& rState( getState( rStates ) );
+                        const ::basegfx::B2DPoint aTopLeftPixel( 
+                            rState.mapModeTransform * 
::vcl::unotools::b2DPointFromPoint( rRect.TopLeft() ) );
+                        const ::basegfx::B2DPoint aBottomRightPixel( 
+                            rState.mapModeTransform * 
::vcl::unotools::b2DPointFromPoint( rRect.BottomRight() ) +
                         // #121100# OutputDevice::DrawRect() fills
                         // rectangles Apple-like, i.e. with one
                         // additional pixel to the right and bottom.
-                        aPixelRect.setWidth( aPixelRect.getWidth()+1 );
-                        aPixelRect.setHeight( aPixelRect.getHeight()+1 );
+                            ::basegfx::B2DPoint(1,1) );
 
-                        createFillAndStroke( ::PolyPolygon( 
-                                                 ::Polygon( aPixelRect ) ),
-                                              rCanvas, io_rCurrActionIndex,
-                                              rStates );
+                        createFillAndStroke( 
::basegfx::tools::createPolygonFromRect(
+                                                 ::basegfx::B2DRange( 
aTopLeftPixel,
+                                                                      
aBottomRightPixel )),
+                                             rFactoryParms );
                         break;
                     }
 
                     case META_ROUNDRECT_ACTION:
-                        createFillAndStroke( rVDev.LogicToPixel( Polygon( 
static_cast<MetaRoundRectAction*>(pCurrAct)->GetRect(),
+                    {
+                        const Rectangle& rRect( 
+                            
static_cast<MetaRoundRectAction*>(pCurrAct)->GetRect());
+
+                        if( rRect.IsEmpty() )
+                            break;
+
+                        ::basegfx::B2DPolygon aPoly( 
+                            ::basegfx::tools::createPolygonFromRect( 
+                                ::basegfx::B2DRange(
+                                    ::vcl::unotools::b2DPointFromPoint( 
rRect.TopLeft() ),
+                                    ::vcl::unotools::b2DPointFromPoint( 
rRect.BottomRight() ) +
+                                    ::basegfx::B2DPoint(1,1) ),
                                                                           
static_cast<MetaRoundRectAction*>(pCurrAct)->GetHorzRound(),
-                                                                          
static_cast<MetaRoundRectAction*>(pCurrAct)->GetVertRound() ) ),
-                                             rCanvas, io_rCurrActionIndex,
-                                             rStates );
+                                
static_cast<MetaRoundRectAction*>(pCurrAct)->GetVertRound() ));
+                        aPoly.transform( getState( rStates ).mapModeTransform 
);
+
+                        createFillAndStroke( aPoly,
+                                             rFactoryParms );
+                    }
                         break;
 
                     case META_ELLIPSE_ACTION:
                     {
-                        const Rectangle& rRect = 
static_cast<MetaEllipseAction*>(pCurrAct)->GetRect();
-                        createFillAndStroke( rVDev.LogicToPixel( Polygon( 
rRect.Center(),
-                                                                          
rRect.GetWidth() >> 1,
-                                                                          
rRect.GetHeight() >> 1 ) ),
-                                             rCanvas, io_rCurrActionIndex,
-                                             rStates );
+                        const Rectangle& rRect(
+                            
static_cast<MetaEllipseAction*>(pCurrAct)->GetRect() );
+
+                        if( rRect.IsEmpty() )
                         break;
+
+                        const ::basegfx::B2DRange aRange(
+                            ::vcl::unotools::b2DPointFromPoint( 
rRect.TopLeft() ),
+                            ::vcl::unotools::b2DPointFromPoint( 
rRect.BottomRight() ) +
+                            ::basegfx::B2DPoint(1,1) );
+
+                        ::basegfx::B2DPolygon aPoly(
+                            ::basegfx::tools::createPolygonFromEllipse(
+                                aRange.getCenter(),
+                                aRange.getWidth(),
+                                aRange.getHeight() ));
+                        aPoly.transform( getState( rStates ).mapModeTransform 
);
+
+                        createFillAndStroke( aPoly,
+                                             rFactoryParms );
                     }
+                    break;
 
                     case META_ARC_ACTION:
-                        createFillAndStroke( rVDev.LogicToPixel( Polygon( 
static_cast<MetaArcAction*>(pCurrAct)->GetRect(),
+                    {
+                        // TODO(F1): Missing basegfx functionality. Mind empty 
rects!
+                        const Polygon aToolsPoly( 
static_cast<MetaArcAction*>(pCurrAct)->GetRect(),
                                                                           
static_cast<MetaArcAction*>(pCurrAct)->GetStartPoint(),
-                                                                          
static_cast<MetaArcAction*>(pCurrAct)->GetEndPoint(), POLY_ARC ) ),
-                                             rCanvas, io_rCurrActionIndex,
-                                             rStates );
+                                                  
static_cast<MetaArcAction*>(pCurrAct)->GetEndPoint(), POLY_ARC );
+                        ::basegfx::B2DPolygon aPoly( 
aToolsPoly.getB2DPolygon() );
+                        aPoly.transform( getState( rStates ).mapModeTransform 
);
+
+                        createFillAndStroke( aPoly,
+                                             rFactoryParms );
+                    }
                         break;
 
                     case META_PIE_ACTION:
-                        createFillAndStroke( rVDev.LogicToPixel( Polygon( 
static_cast<MetaPieAction*>(pCurrAct)->GetRect(),
+                    {
+                        // TODO(F1): Missing basegfx functionality. Mind empty 
rects!
+                        const Polygon aToolsPoly( 
static_cast<MetaPieAction*>(pCurrAct)->GetRect(),
                                                                           
static_cast<MetaPieAction*>(pCurrAct)->GetStartPoint(),
-                                                                          
static_cast<MetaPieAction*>(pCurrAct)->GetEndPoint(), POLY_PIE ) ),
-                                             rCanvas, io_rCurrActionIndex,
-                                             rStates );
+                                                  
static_cast<MetaPieAction*>(pCurrAct)->GetEndPoint(), POLY_PIE );
+                        ::basegfx::B2DPolygon aPoly( 
aToolsPoly.getB2DPolygon() );
+                        aPoly.transform( getState( rStates ).mapModeTransform 
);
+
+                        createFillAndStroke( aPoly,
+                                             rFactoryParms );
+                    }
                         break;
 
                     case META_CHORD_ACTION:
-                        createFillAndStroke( rVDev.LogicToPixel( Polygon( 
static_cast<MetaChordAction*>(pCurrAct)->GetRect(),
+                    {
+                        // TODO(F1): Missing basegfx functionality. Mind empty 
rects!
+                        const Polygon aToolsPoly( 
static_cast<MetaChordAction*>(pCurrAct)->GetRect(),
                                                                           
static_cast<MetaChordAction*>(pCurrAct)->GetStartPoint(),
-                                                                          
static_cast<MetaChordAction*>(pCurrAct)->GetEndPoint(), POLY_CHORD ) ),
-                                             rCanvas, io_rCurrActionIndex,
-                                             rStates );
+                                                  
static_cast<MetaChordAction*>(pCurrAct)->GetEndPoint(), POLY_CHORD );
+                        ::basegfx::B2DPolygon aPoly( 
aToolsPoly.getB2DPolygon() );
+                        aPoly.transform( getState( rStates ).mapModeTransform 
);
+
+                        createFillAndStroke( aPoly,
+                                             rFactoryParms );
+                    }
                         break;
 
                     case META_POLYLINE_ACTION:
@@ -1995,8 +1983,8 @@
                             MetaPolyLineAction* pPolyLineAct = 
static_cast<MetaPolyLineAction*>(pCurrAct);
 
                             const LineInfo& rLineInfo( 
pPolyLineAct->GetLineInfo() );
-                            ::Polygon          aPoly( rVDev.LogicToPixel( 
-                                                       
pPolyLineAct->GetPolygon() ) );
+                            ::basegfx::B2DPolygon aPoly( 
pPolyLineAct->GetPolygon().getB2DPolygon() );
+                            aPoly.transform( rState.mapModeTransform );
 
                             ActionSharedPtr pLineAction;
 
@@ -2005,7 +1993,7 @@
                                 // plain hair line polygon
                                 pLineAction = 
                                     
internal::PolyPolyActionFactory::createLinePolyPolyAction(
-                                        aPoly,
+                                        ::basegfx::B2DPolyPolygon(aPoly),
                                         rCanvas,
                                         rState );
 
@@ -2025,12 +2013,12 @@
                                 rendering::StrokeAttributes aStrokeAttributes;
                                 
                                 setupStrokeAttributes( aStrokeAttributes,
-                                                       rVDev,
+                                                       rFactoryParms,
                                                        rLineInfo );
 
                                 pLineAction =
                                     
internal::PolyPolyActionFactory::createPolyPolyAction(
-                                        aPoly,
+                                        ::basegfx::B2DPolyPolygon(aPoly),
                                         rCanvas,
                                         rState,
                                         aStrokeAttributes ) ;
@@ -2052,15 +2040,21 @@
                     break;
 
                     case META_POLYGON_ACTION:
-                        createFillAndStroke( rVDev.LogicToPixel( 
static_cast<MetaPolygonAction*>(pCurrAct)->GetPolygon() ),
-                                             rCanvas, io_rCurrActionIndex,
-                                             rStates );
+                    {
+                        ::basegfx::B2DPolygon aPoly( 
static_cast<MetaPolygonAction*>(pCurrAct)->GetPolygon().getB2DPolygon() );
+                        aPoly.transform( getState( rStates ).mapModeTransform 
);
+                        createFillAndStroke( aPoly,
+                                             rFactoryParms );
+                    }
                         break;
 
                     case META_POLYPOLYGON_ACTION:
-                        createFillAndStroke( rVDev.LogicToPixel( 
static_cast<MetaPolyPolygonAction*>(pCurrAct)->GetPolyPolygon() ),
-                                             rCanvas, io_rCurrActionIndex,
-                                             rStates );
+                    {
+                        ::basegfx::B2DPolyPolygon aPoly( 
static_cast<MetaPolyPolygonAction*>(pCurrAct)->GetPolyPolygon().getB2DPolyPolygon()
 );
+                        aPoly.transform( getState( rStates ).mapModeTransform 
);
+                        createFillAndStroke( aPoly,
+                                             rFactoryParms );
+                    }
                         break;
 
                     case META_BMP_ACTION:
@@ -2070,7 +2064,8 @@
                         ActionSharedPtr pBmpAction(
                                 
internal::BitmapActionFactory::createBitmapAction(
                                     pAct->GetBitmap(),
-                                    rVDev.LogicToPixel( pAct->GetPoint() ),
+                                    getState( rStates ).mapModeTransform * 
+                                    ::vcl::unotools::b2DPointFromPoint( 
pAct->GetPoint() ),
                                     rCanvas,
                                     getState( rStates ) ) );
 
@@ -2093,8 +2088,10 @@
                         ActionSharedPtr pBmpAction(
                                 
internal::BitmapActionFactory::createBitmapAction(
                                     pAct->GetBitmap(),
-                                    rVDev.LogicToPixel( pAct->GetPoint() ),
-                                    rVDev.LogicToPixel( pAct->GetSize() ),
+                                    getState( rStates ).mapModeTransform * 
+                                    ::vcl::unotools::b2DPointFromPoint( 
pAct->GetPoint() ),
+                                    getState( rStates ).mapModeTransform * 
+                                    ::vcl::unotools::b2DSizeFromSize( 
pAct->GetSize() ),
                                     rCanvas,
                                     getState( rStates ) ) );
 
@@ -2124,8 +2121,10 @@
                         ActionSharedPtr pBmpAction(
                                 
internal::BitmapActionFactory::createBitmapAction(
                                     aBmp,
-                                    rVDev.LogicToPixel( pAct->GetDestPoint() ),
-                                    rVDev.LogicToPixel( pAct->GetDestSize() ),
+                                    getState( rStates ).mapModeTransform * 
+                                    ::vcl::unotools::b2DPointFromPoint( 
pAct->GetDestPoint() ),
+                                    getState( rStates ).mapModeTransform * 
+                                    ::vcl::unotools::b2DSizeFromSize( 
pAct->GetDestSize() ),
                                     rCanvas,
                                     getState( rStates ) ) );
 
@@ -2148,7 +2147,8 @@
                         ActionSharedPtr pBmpAction(
                                 
internal::BitmapActionFactory::createBitmapAction(
                                     pAct->GetBitmapEx(),
-                                    rVDev.LogicToPixel( pAct->GetPoint() ),
+                                    getState( rStates ).mapModeTransform * 
+                                    ::vcl::unotools::b2DPointFromPoint( 
pAct->GetPoint() ),
                                     rCanvas,
                                     getState( rStates ) ) );
 
@@ -2171,8 +2171,10 @@
                         ActionSharedPtr pBmpAction(
                                 
internal::BitmapActionFactory::createBitmapAction(
                                     pAct->GetBitmapEx(),
-                                    rVDev.LogicToPixel( pAct->GetPoint() ),
-                                    rVDev.LogicToPixel( pAct->GetSize() ),
+                                    getState( rStates ).mapModeTransform * 
+                                    ::vcl::unotools::b2DPointFromPoint( 
pAct->GetPoint() ),
+                                    getState( rStates ).mapModeTransform * 
+                                    ::vcl::unotools::b2DSizeFromSize( 
pAct->GetSize() ),
                                     rCanvas,
                                     getState( rStates ) ) );
 
@@ -2202,8 +2204,10 @@
                         ActionSharedPtr pBmpAction(
                             internal::BitmapActionFactory::createBitmapAction(
                                 aBmp,
-                                rVDev.LogicToPixel( pAct->GetDestPoint() ),
-                                rVDev.LogicToPixel( pAct->GetDestSize() ),
+                                getState( rStates ).mapModeTransform * 
+                                ::vcl::unotools::b2DPointFromPoint( 
pAct->GetDestPoint() ),
+                                getState( rStates ).mapModeTransform * 
+                                ::vcl::unotools::b2DSizeFromSize( 
pAct->GetDestSize() ),
                                 rCanvas,
                                 getState( rStates ) ) );
 
@@ -2232,7 +2236,8 @@
                         ActionSharedPtr pBmpAction(
                             internal::BitmapActionFactory::createBitmapAction(
                                 aBmp,
-                                rVDev.LogicToPixel( pAct->GetPoint() ),
+                                getState( rStates ).mapModeTransform * 
+                                ::vcl::unotools::b2DPointFromPoint( 
pAct->GetPoint() ),
                                 rCanvas,
                                 getState( rStates ) ) );
 
@@ -2261,8 +2266,10 @@
                         ActionSharedPtr pBmpAction(
                             internal::BitmapActionFactory::createBitmapAction(
                                 aBmp,
-                                rVDev.LogicToPixel( pAct->GetPoint() ),
-                                rVDev.LogicToPixel( pAct->GetSize() ),
+                                getState( rStates ).mapModeTransform * 
+                                ::vcl::unotools::b2DPointFromPoint( 
pAct->GetPoint() ),
+                                getState( rStates ).mapModeTransform * 
+                                ::vcl::unotools::b2DSizeFromSize( 
pAct->GetSize() ),
                                 rCanvas,
                                 getState( rStates ) ) );
                         
@@ -2297,8 +2304,10 @@
                         ActionSharedPtr pBmpAction(
                             internal::BitmapActionFactory::createBitmapAction(
                                 aBmp,
-                                rVDev.LogicToPixel( pAct->GetDestPoint() ),
-                                rVDev.LogicToPixel( pAct->GetDestSize() ),
+                                getState( rStates ).mapModeTransform * 
+                                ::vcl::unotools::b2DPointFromPoint( 
pAct->GetDestPoint() ),
+                                getState( rStates ).mapModeTransform * 
+                                ::vcl::unotools::b2DSizeFromSize( 
pAct->GetDestSize() ),
                                 rCanvas,
                                 getState( rStates ) ) );
 
@@ -2330,10 +2339,12 @@
                             rState.fillColor.getLength() )
                         {
                             MetaTransparentAction* pAct = 
static_cast<MetaTransparentAction*>(pCurrAct);
+                            ::basegfx::B2DPolyPolygon aPoly( 
pAct->GetPolyPolygon().getB2DPolyPolygon() );
+                            aPoly.transform( rState.mapModeTransform );
                             
                             ActionSharedPtr pPolyAction(
                                 
internal::PolyPolyActionFactory::createPolyPolyAction(
-                                    rVDev.LogicToPixel( pAct->GetPolyPolygon() 
),
+                                    aPoly,
                                     rCanvas,
                                     rState,
                                     pAct->GetTransparence() ) );
@@ -2369,8 +2380,10 @@
                                 pMtf,
                                 pGradient,
                                 rParms,
-                                rVDev.LogicToPixel( pAct->GetPoint() ),
-                                rVDev.LogicToPixel( pAct->GetSize() ),
+                                getState( rStates ).mapModeTransform * 
+                                ::vcl::unotools::b2DPointFromPoint( 
pAct->GetPoint() ),
+                                getState( rStates ).mapModeTransform * 
+                                ::vcl::unotools::b2DSizeFromSize( 
pAct->GetSize() ),
                                 rCanvas,
                                 getState( rStates ) ) );
 
@@ -2396,12 +2409,8 @@
                             pAct->GetIndex(), 
                             pAct->GetLen() == (USHORT)STRING_LEN ? 
pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(),
                             NULL, 
-                            rVDev, 
-                            rCanvas, 
-                            rStates,
-                            rParms,
-                            bSubsettableActions,
-                            io_rCurrActionIndex );
+                            rFactoryParms,
+                            bSubsettableActions );
                     }
                     break;
 
@@ -2415,12 +2424,8 @@
                             pAct->GetIndex(), 
                             pAct->GetLen() == (USHORT)STRING_LEN ? 
pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(),
                             pAct->GetDXArray(), 
-                            rVDev, 
-                            rCanvas, 
-                            rStates, 
-                            rParms,
-                            bSubsettableActions,
-                            io_rCurrActionIndex );
+                            rFactoryParms,
+                            bSubsettableActions );
                     }
                     break;
 
@@ -2432,22 +2437,20 @@
                         const ::Size           aBaselineOffset( 
tools::getBaselineOffset( rState,
                                                                                
        rVDev ) );
                         const ::Point          aStartPoint( 
pAct->GetStartPoint() );
-                        const ::Size           aSize( rVDev.LogicToPixel( 
-                                                       ::Size( 
pAct->GetWidth(),
-                                                               0 ) ) );
+                        const ::basegfx::B2DSize aSize( 
rState.mapModeTransform * 
+                                                        
::basegfx::B2DSize(pAct->GetWidth(),
+                                                                           0 
));
 
                         ActionSharedPtr pPolyAction( 
                             PolyPolyActionFactory::createPolyPolyAction(
-                                ::PolyPolygon(
                                     tools::createTextLinesPolyPolygon( 
-                                        ::vcl::unotools::b2DPointFromPoint(
-                                            rVDev.LogicToPixel( 
-                                                ::Point(
-                                                    aStartPoint.X() + 
aBaselineOffset.Width(),
-                                                    aStartPoint.Y() + 
aBaselineOffset.Height() ) ) ), 
-                                        aSize.Width(),
+                                    rState.mapModeTransform * 
+                                    ::basegfx::B2DPoint(
+                                        
::vcl::unotools::b2DPointFromPoint(pAct->GetStartPoint()) +
+                                        
::vcl::unotools::b2DSizeFromSize(aBaselineOffset)),
+                                    aSize.getX(),
                                         tools::createTextLineInfo( rVDev, 
-                                                                   rState ) ) 
),
+                                                               rState )),
                                 rCanvas,
                                 rState ) );
 
@@ -2477,9 +2480,9 @@
                                                   pAct->GetStyle(),
                                                   aTmpMtf );
 
-                        createActions( rCanvas, rVDev, aTmpMtf, rStates, 
-                                       rParms, bSubsettableActions, 
-                                       io_rCurrActionIndex );
+                        createActions( aTmpMtf, 
+                                       rFactoryParms, 
+                                       bSubsettableActions );
 
                         popState( rStates );
 
@@ -2528,12 +2531,8 @@
                             pAct->GetIndex(), 
                             pAct->GetLen() == (USHORT)STRING_LEN ? 
pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(),
                             pDXArray.get(),
-                            rVDev, 
-                            rCanvas, 
-                            rStates, 
-                            rParms,
-                            bSubsettableActions,
-                            io_rCurrActionIndex );
+                            rFactoryParms,
+                            bSubsettableActions );
                     }
                     break;
 
@@ -2823,6 +2822,13 @@
             const Size aMtfSizePix( ::std::max( aMtfSizePixPre.Width(), 1L ),
                                     ::std::max( aMtfSizePixPre.Height(), 1L ) 
);
 
+            sal_Int32 nCurrActions(0);
+            ActionFactoryParameters aParms(aStateStack,
+                                           rCanvas,
+                                           aVDev,
+                                           rParams,
+                                           nCurrActions );
+
             // init state stack
             clearStateStack( aStateStack );
 
@@ -2832,6 +2838,9 @@
             getState( aStateStack ).transform.scale( 1.0 / aMtfSizePix.Width(),
                                                      1.0 / 
aMtfSizePix.Height() );
 
+            tools::calcLogic2PixelAffineTransform( getState( aStateStack 
).mapModeTransform,
+                                                   aVDev );
+
             ColorSharedPtr pColor( getCanvas()->createColor() );
 
             // setup default text color to black
@@ -2867,15 +2876,10 @@
                     
                 rState.xFont = createFont( rState.fontRotation,
                                            ::Font(), // default font
-                                           rCanvas,
-                                           aVDev,
-                                           rParams );
+                                           aParms );
             }
 
-            sal_Int32 nCurrActions(0);
-            createActions( rCanvas,
-                           aVDev,
-                           const_cast<GDIMetaFile&>(rMtf), // HACK(Q2):
+            createActions( const_cast<GDIMetaFile&>(rMtf), // HACK(Q2):
                                                                                
           // we're
                                                                   // changing
                                                                   // the
@@ -2883,10 +2887,9 @@
                                                                   // action
                                                                   // in
                                                                   // 
createActions!
-                           aStateStack,
-                           rParams,
-                           true, // TODO(P1): make subsettability configurable 
-                           nCurrActions );
+                           aParms,
+                           true // TODO(P1): make subsettability configurable 
+                            );
         }
 
         ImplRenderer::ImplRenderer( const CanvasSharedPtr&     rCanvas,
@@ -2931,7 +2934,7 @@
                 MtfAction(
                     BitmapActionFactory::createBitmapAction( 
                         rBmpEx,
-                        Point(),
+                        ::basegfx::B2DPoint(),
                         rCanvas,
                         aState),
                     0 ) );

File [changed]: lineaction.cxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/lineaction.cxx?r1=1.9&r2=1.9.14.1
Delta lines:  +20 -21
---------------------
--- lineaction.cxx      17 Sep 2006 12:49:25 -0000      1.9
+++ lineaction.cxx      21 Dec 2006 17:20:53 -0000      1.9.14.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: lineaction.cxx,v $
  *
- *  $Revision: 1.9 $
+ *  $Revision: 1.9.14.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/09/17 12:49:25 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:53 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -46,6 +46,7 @@
 #include <vcl/canvastools.hxx>
 
 #include <basegfx/range/b2drange.hxx>
+#include <basegfx/point/b2dpoint.hxx>
 #include <basegfx/tools/canvastools.hxx>
 #include <canvas/canvastools.hxx>
 
@@ -67,8 +68,8 @@
             class LineAction : public Action, private ::boost::noncopyable
             {
             public:
-                LineAction( const ::Point&,
-                            const ::Point&,  
+                LineAction( const ::basegfx::B2DPoint&,
+                            const ::basegfx::B2DPoint&,  
                             const CanvasSharedPtr&, 
                             const OutDevState& ); 
 
@@ -83,14 +84,14 @@
                 virtual sal_Int32 getActionCount() const;
 
             private:
-                Point                                  maStartPoint;
-                Point                                  maEndPoint;
+                ::basegfx::B2DPoint     maStartPoint;
+                ::basegfx::B2DPoint     maEndPoint;
                 CanvasSharedPtr                        mpCanvas;
                 rendering::RenderState maState;
             };
 
-            LineAction::LineAction( const ::Point&                     
rStartPoint, 
-                                    const ::Point&                     
rEndPoint, 
+            LineAction::LineAction( const ::basegfx::B2DPoint& rStartPoint, 
+                                    const ::basegfx::B2DPoint& rEndPoint, 
                                     const CanvasSharedPtr&     rCanvas,
                                     const OutDevState&                 rState 
) :
                 maStartPoint( rStartPoint ),
@@ -110,8 +111,8 @@
                 rendering::RenderState aLocalState( maState );
                 ::canvas::tools::prependToRenderState(aLocalState, 
rTransformation);
 
-                mpCanvas->getUNOCanvas()->drawLine( 
::vcl::unotools::point2DFromPoint(maStartPoint), 
-                                                    
::vcl::unotools::point2DFromPoint(maEndPoint),
+                mpCanvas->getUNOCanvas()->drawLine( 
::basegfx::unotools::point2DFromB2DPoint(maStartPoint), 
+                                                    
::basegfx::unotools::point2DFromB2DPoint(maEndPoint),
                                                     mpCanvas->getViewState(),
                                                     aLocalState );
 
@@ -135,10 +136,8 @@
                 rendering::RenderState aLocalState( maState );
                 ::canvas::tools::prependToRenderState(aLocalState, 
rTransformation);
                 
-                return tools::calcDevicePixelBounds( ::basegfx::B2DRange( 
maStartPoint.X(),
-                                                                          
maStartPoint.Y(),
-                                                                          
maEndPoint.X(),
-                                                                          
maEndPoint.Y() ),
+                return tools::calcDevicePixelBounds( ::basegfx::B2DRange( 
maStartPoint,
+                                                                          
maEndPoint ),
                                                      mpCanvas->getViewState(),
                                                      aLocalState );
             }
@@ -161,8 +160,8 @@
             }
         }
 
-        ActionSharedPtr LineActionFactory::createLineAction( const ::Point&    
                rStartPoint,
-                                                             const ::Point&    
                rEndPoint,  
+        ActionSharedPtr LineActionFactory::createLineAction( const 
::basegfx::B2DPoint&        rStartPoint,
+                                                             const 
::basegfx::B2DPoint&        rEndPoint,  
                                                              const 
CanvasSharedPtr&    rCanvas, 
                                                              const 
OutDevState&        rState  )
         {

File [changed]: lineaction.hxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/lineaction.hxx?r1=1.6&r2=1.6.44.1
Delta lines:  +8 -6
-------------------
--- lineaction.hxx      8 Sep 2005 08:18:59 -0000       1.6
+++ lineaction.hxx      21 Dec 2006 17:20:53 -0000      1.6.44.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: lineaction.hxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.6.44.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 08:18:59 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:53 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -39,7 +39,9 @@
 #include <action.hxx>
 #include <cppcanvas/canvas.hxx>
 
-class Point;
+namespace basegfx {
+    class B2DPoint;
+}
 
 
 /* Definition of internal::LineActionFactory class */
@@ -61,8 +63,8 @@
         {
         public:
             /// Plain hair line from point 1 to point 2
-            static ActionSharedPtr createLineAction( const ::Point&,
-                                                     const ::Point&,  
+            static ActionSharedPtr createLineAction( const 
::basegfx::B2DPoint&,
+                                                     const 
::basegfx::B2DPoint&,  
                                                      const CanvasSharedPtr&, 
                                                      const OutDevState& ); 
 

File [changed]: mtftools.cxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/mtftools.cxx?r1=1.11&r2=1.11.6.1
Delta lines:  +20 -3
--------------------
--- mtftools.cxx        1 Nov 2006 17:48:05 -0000       1.11
+++ mtftools.cxx        21 Dec 2006 17:20:53 -0000      1.11.6.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: mtftools.cxx,v $
  *
- *  $Revision: 1.11 $
+ *  $Revision: 1.11.6.1 $
  *
- *  last change: $Author: vg $ $Date: 2006/11/01 17:48:05 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:53 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -118,6 +118,23 @@
             o_rMatrix.identity();
             o_rMatrix.scale( aSizePixel.Width() / (double)aSizeLogic.Width(),
                              aSizePixel.Height() / (double)aSizeLogic.Height() 
);
+
+            return o_rMatrix;
+        }
+
+        ::basegfx::B2DHomMatrix& calcLogic2PixelAffineTransform( 
::basegfx::B2DHomMatrix&      o_rMatrix,
+                                                                 const 
VirtualDevice&          rVDev )
+        {
+            // retrieves scale
+            calcLogic2PixelLinearTransform(o_rMatrix, rVDev);
+
+            // translate according to curr map mode/pref map mode offset
+            const ::Point  aEmptyPoint;
+            const ::Point& rTranslatedPoint( 
+                rVDev.LogicToPixel( aEmptyPoint ));
+
+            o_rMatrix.translate(rTranslatedPoint.X(),
+                                rTranslatedPoint.Y());
 
             return o_rMatrix;
         }

File [changed]: mtftools.hxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/mtftools.hxx?r1=1.7&r2=1.7.40.1
Delta lines:  +18 -3
--------------------
--- mtftools.hxx        2 Nov 2005 13:41:15 -0000       1.7
+++ mtftools.hxx        21 Dec 2006 17:20:53 -0000      1.7.40.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: mtftools.hxx,v $
  *
- *  $Revision: 1.7 $
+ *  $Revision: 1.7.40.1 $
  *
- *  last change: $Author: kz $ $Date: 2005/11/02 13:41:15 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:53 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -105,6 +105,21 @@
             @return the calculated transformation matrix.
          */
         ::basegfx::B2DHomMatrix& calcLogic2PixelLinearTransform( 
::basegfx::B2DHomMatrix&      o_rMatrix,
+                                                                 const 
VirtualDevice&          rVDev );
+
+        /** Construct a matrix that converts from logical to pixel
+            coordinate system.
+
+            This method calculates a matrix that approximates the
+            VirtualDevice's LogicToPixel conversion.
+
+            @param o_rMatrix
+            This matrix will receive the calculated transform, and is
+            also returned from this method.
+
+            @return the calculated transformation matrix.
+         */
+        ::basegfx::B2DHomMatrix& calcLogic2PixelAffineTransform( 
::basegfx::B2DHomMatrix&      o_rMatrix,
                                                                  const 
VirtualDevice&          rVDev );
 
         /** This method modifies the clip, to cancel the given

File [changed]: outdevstate.hxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/outdevstate.hxx?r1=1.7&r2=1.7.44.1
Delta lines:  +5 -4
-------------------
--- outdevstate.hxx     8 Sep 2005 08:20:31 -0000       1.7
+++ outdevstate.hxx     21 Dec 2006 17:20:53 -0000      1.7.44.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: outdevstate.hxx,v $
  *
- *  $Revision: 1.7 $
+ *  $Revision: 1.7.44.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 08:20:31 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:53 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -99,6 +99,7 @@
 
                 xFont(),
                 transform(),
+                mapModeTransform(),
                 fontRotation(0.0),
 
                 textEmphasisMarkStyle(EMPHASISMARK_NONE),
@@ -120,7 +121,6 @@
                 isTextFillColorSet( false ),
                 isTextLineColorSet( false )
             {
-                transform.identity();
             }
 
             ::basegfx::B2DPolyPolygon                                          
                                                                        clip;
@@ -140,6 +140,7 @@
              */
             ::com::sun::star::uno::Reference< 
::com::sun::star::rendering::XCanvasFont >               xFont;
             ::basegfx::B2DHomMatrix                                            
                                                                                
transform;
+            ::basegfx::B2DHomMatrix                                            
                                                                                
mapModeTransform;
             double                                                             
                                                                                
                fontRotation;
 
             sal_uInt16                                                         
                                                                                
        textEmphasisMarkStyle;

File [changed]: pointaction.cxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/pointaction.cxx?r1=1.9&r2=1.9.14.1
Delta lines:  +26 -25
---------------------
--- pointaction.cxx     17 Sep 2006 12:49:51 -0000      1.9
+++ pointaction.cxx     21 Dec 2006 17:20:54 -0000      1.9.14.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: pointaction.cxx,v $
  *
- *  $Revision: 1.9 $
+ *  $Revision: 1.9.14.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/09/17 12:49:51 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:54 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -43,6 +43,7 @@
 #include <vcl/canvastools.hxx>
 
 #include <basegfx/range/b2drange.hxx>
+#include <basegfx/point/b2dpoint.hxx>
 #include <basegfx/tools/canvastools.hxx>
 #include <canvas/canvastools.hxx>
 
@@ -65,10 +66,10 @@
             class PointAction : public Action, private ::boost::noncopyable
             { 
             public: 
-                PointAction( const ::Point&,  
+                PointAction( const ::basegfx::B2DPoint&,  
                              const CanvasSharedPtr&, 
                              const OutDevState& ); 
-                PointAction( const ::Point&,  
+                PointAction( const ::basegfx::B2DPoint&,  
                              const CanvasSharedPtr&, 
                              const OutDevState&, 
                              const ::Color&            ); 
@@ -88,12 +89,12 @@
                 PointAction(const PointAction&);
                 PointAction& operator = ( const PointAction& );
 
-                ::Point                                                        
                        maPoint;
+                ::basegfx::B2DPoint                                            
        maPoint;
                 CanvasSharedPtr                                                
                mpCanvas;
                 ::com::sun::star::rendering::RenderState       maState;
             };
 
-            PointAction::PointAction( const ::Point&                   rPoint, 
+            PointAction::PointAction( const ::basegfx::B2DPoint& rPoint, 
                                       const CanvasSharedPtr&   rCanvas,
                                       const OutDevState&               rState 
) :
                 maPoint( rPoint ),
@@ -104,7 +105,7 @@
                 maState.DeviceColor = rState.lineColor;
             }
 
-            PointAction::PointAction( const ::Point&                   rPoint, 
+            PointAction::PointAction( const ::basegfx::B2DPoint& rPoint, 
                                       const CanvasSharedPtr&   rCanvas,
                                       const OutDevState&               rState,
                                       const ::Color&                   
rAltColor ) :
@@ -125,7 +126,7 @@
                 rendering::RenderState aLocalState( maState );
                 ::canvas::tools::prependToRenderState(aLocalState, 
rTransformation);
 
-                mpCanvas->getUNOCanvas()->drawPoint( 
::vcl::unotools::point2DFromPoint(maPoint), 
+                mpCanvas->getUNOCanvas()->drawPoint( 
::basegfx::unotools::point2DFromB2DPoint(maPoint), 
                                                      mpCanvas->getViewState(), 
                                                      aLocalState );
 
@@ -149,10 +150,10 @@
                 rendering::RenderState aLocalState( maState );
                 ::canvas::tools::prependToRenderState(aLocalState, 
rTransformation);
                 
-                return tools::calcDevicePixelBounds( ::basegfx::B2DRange( 
maPoint.X()-1,
-                                                                          
maPoint.Y()-1,
-                                                                          
maPoint.X()+1,
-                                                                          
maPoint.Y()+1 ),
+                return tools::calcDevicePixelBounds( ::basegfx::B2DRange( 
maPoint.getX()-1,
+                                                                          
maPoint.getY()-1,
+                                                                          
maPoint.getX()+1,
+                                                                          
maPoint.getY()+1 ),
                                                      mpCanvas->getViewState(),
                                                      aLocalState );
             }
@@ -175,14 +176,14 @@
             }
         }
 
-        ActionSharedPtr PointActionFactory::createPointAction( const ::Point&  
                rPoint,  
+        ActionSharedPtr PointActionFactory::createPointAction( const 
::basegfx::B2DPoint& rPoint,  
                                                                const 
CanvasSharedPtr&  rCanvas, 
                                                                const 
OutDevState&              rState )
         {
             return ActionSharedPtr( new PointAction( rPoint, rCanvas, rState ) 
);
         }
         
-        ActionSharedPtr PointActionFactory::createPointAction( const ::Point&  
                rPoint,  
+        ActionSharedPtr PointActionFactory::createPointAction( const 
::basegfx::B2DPoint& rPoint,  
                                                                const 
CanvasSharedPtr&  rCanvas, 
                                                                const 
OutDevState&              rState, 
                                                                const ::Color&  
                rColor  )

File [changed]: pointaction.hxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/pointaction.hxx?r1=1.6&r2=1.6.44.1
Delta lines:  +8 -7
-------------------
--- pointaction.hxx     8 Sep 2005 08:21:14 -0000       1.6
+++ pointaction.hxx     21 Dec 2006 17:20:54 -0000      1.6.44.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: pointaction.hxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.6.44.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 08:21:14 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:54 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -39,9 +39,10 @@
 #include <action.hxx>
 #include <cppcanvas/canvas.hxx>
 
-class Point;
 class Color;
-
+namespace basegfx {
+    class B2DPoint;
+}
 
 /* Definition of internal::PointActionFactory class */
 
@@ -62,12 +63,12 @@
         { 
         public: 
             /// Point in current color
-            static ActionSharedPtr createPointAction( const ::Point&,  
+            static ActionSharedPtr createPointAction( const 
::basegfx::B2DPoint&,  
                                                       const CanvasSharedPtr&, 
                                                       const OutDevState& ); 
             
             /// Point in given color
-            static ActionSharedPtr createPointAction( const ::Point&,  
+            static ActionSharedPtr createPointAction( const 
::basegfx::B2DPoint&,  
                                                       const CanvasSharedPtr&, 
                                                       const OutDevState&, 
                                                       const ::Color&           
); 

File [changed]: polypolyaction.cxx
Url: 
http://gsl.openoffice.org/source/browse/gsl/cppcanvas/source/mtfrenderer/polypolyaction.cxx?r1=1.10&r2=1.10.10.1
Delta lines:  +37 -35
---------------------
--- polypolyaction.cxx  12 Oct 2006 15:00:10 -0000      1.10
+++ polypolyaction.cxx  21 Dec 2006 17:20:54 -0000      1.10.10.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: polypolyaction.cxx,v $
  *
- *  $Revision: 1.10 $
+ *  $Revision: 1.10.10.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/10/12 15:00:10 $
+ *  last change: $Author: thb $ $Date: 2006/12/21 17:20:54 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -46,6 +46,8 @@
 
 #include <basegfx/range/b2drange.hxx>
 #include <basegfx/tools/canvastools.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <canvas/canvastools.hxx>
 
@@ -68,12 +70,12 @@
             class PolyPolyAction : public CachedPrimitiveBase
             { 
             public: 
-                PolyPolyAction( const ::PolyPolygon&,  
+                PolyPolyAction( const ::basegfx::B2DPolyPolygon&,  
                                 const CanvasSharedPtr&, 
                                 const OutDevState&,
                                 bool bFill,
                                 bool bStroke ); 
-                PolyPolyAction( const ::PolyPolygon&,  
+                PolyPolyAction( const ::basegfx::B2DPolyPolygon&,  
                                 const CanvasSharedPtr&, 
                                 const OutDevState&,
                                 bool bFill,
@@ -95,7 +97,7 @@
                                      const ::basegfx::B2DHomMatrix&            
     rTransformation ) const;
 
                 const uno::Reference< rendering::XPolyPolygon2D >      
mxPolyPoly;
-                const ::Rectangle                                              
                        maBounds;
+                const ::basegfx::B2DRange                                      
                maBounds;
                 const CanvasSharedPtr                                          
                mpCanvas;
 
                // stroke color is now implicit: the maState.DeviceColor member
@@ -104,7 +106,7 @@
                 uno::Sequence< double >                                        
                        maFillColor;
             };
 
-            PolyPolyAction::Pol