[Libreoffice-commits] core.git: 5 commits - canvas/source drawinglayer/Library_drawinglayer.mk drawinglayer/source include/vcl liblangtag/ExternalProject_langtag.mk liblangtag/liblangtag-0.5.1-mingw.patch nss/nss-3.13.3-build.patch.3 odk/Package_settings.mk odk/settings officecfg/registry svx/source vcl/aqua vcl/generic vcl/headless vcl/inc vcl/source vcl/unx vcl/win

Caolán McNamara caolanm at redhat.com
Fri Jun 14 08:00:37 PDT 2013


 canvas/source/vcl/bitmapbackbuffer.cxx                       |    3 
 canvas/source/vcl/canvashelper.cxx                           |    9 
 canvas/source/vcl/impltools.hxx                              |   14 
 canvas/source/vcl/spritecanvashelper.cxx                     |    4 
 canvas/source/vcl/spritedevicehelper.cxx                     |    1 
 drawinglayer/Library_drawinglayer.mk                         |    2 
 drawinglayer/source/processor2d/vclhelperbitmaprender.cxx    |  221 -----
 drawinglayer/source/processor2d/vclhelperbitmaprender.hxx    |   53 -
 drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx |  328 -------
 drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx |   52 -
 drawinglayer/source/processor2d/vclprocessor2d.cxx           |   46 -
 include/vcl/bitmapex.hxx                                     |   39 
 include/vcl/outdev.hxx                                       |   61 -
 include/vcl/salbtype.hxx                                     |    5 
 liblangtag/ExternalProject_langtag.mk                        |    2 
 liblangtag/liblangtag-0.5.1-mingw.patch                      |   46 -
 nss/nss-3.13.3-build.patch.3                                 |  100 +-
 odk/Package_settings.mk                                      |    1 
 odk/settings/platform.mk                                     |   73 +
 officecfg/registry/schema/org/openoffice/Office/Draw.xcs     |    2 
 svx/source/sdr/contact/objectcontactofpageview.cxx           |    7 
 svx/source/svdraw/svdhdl.cxx                                 |    2 
 svx/source/svdraw/svdograf.cxx                               |    9 
 vcl/aqua/source/gdi/salgdicommon.cxx                         |   89 +-
 vcl/generic/print/genpspgraphics.cxx                         |   31 
 vcl/headless/svpgdi.cxx                                      |   70 -
 vcl/inc/aqua/atsui/salgdi.h                                  |   16 
 vcl/inc/coretext/salgdi2.h                                   |   17 
 vcl/inc/generic/genpspgraphics.h                             |   16 
 vcl/inc/headless/svpgdi.hxx                                  |   16 
 vcl/inc/salgdi.hxx                                           |   62 -
 vcl/inc/unx/gtk/gtkgdi.hxx                                   |    2 
 vcl/inc/unx/salgdi.h                                         |   20 
 vcl/inc/win/salbmp.h                                         |   19 
 vcl/inc/win/salgdi.h                                         |   48 -
 vcl/inc/win/salvd.h                                          |    8 
 vcl/source/gdi/bitmapex.cxx                                  |  368 ++++++++
 vcl/source/gdi/outdev2.cxx                                   |  325 +++++--
 vcl/source/gdi/outmap.cxx                                    |    2 
 vcl/source/gdi/salgdilayout.cxx                              |   87 +-
 vcl/source/gdi/salmisc.cxx                                   |    5 
 vcl/source/gdi/virdev.cxx                                    |    2 
 vcl/unx/generic/gdi/salgdi2.cxx                              |  108 +-
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx                     |    4 
 vcl/win/source/gdi/salbmp.cxx                                |  473 ++++++++++-
 vcl/win/source/gdi/salgdi.cxx                                |  124 +-
 vcl/win/source/gdi/salgdi2.cxx                               |  216 ++---
 vcl/win/source/gdi/salgdi3.cxx                               |   60 -
 vcl/win/source/gdi/salgdi_gdiplus.cxx                        |  207 ++++
 vcl/win/source/gdi/salnativewidgets-luna.cxx                 |    6 
 vcl/win/source/gdi/salprn.cxx                                |    6 
 vcl/win/source/gdi/salvd.cxx                                 |   24 
 vcl/win/source/gdi/winlayout.cxx                             |   16 
 vcl/win/source/window/salframe.cxx                           |   72 -
 54 files changed, 2214 insertions(+), 1385 deletions(-)

New commits:
commit b464ca01387bc9063888f4caac497982605fecf8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 14 15:54:39 2013 +0100

    make vcl compiler under mingw again
    
    Change-Id: Ie4d85ca344163807b9455f6305c35327df9fd877

diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx
index a00dfde..af09b16 100644
--- a/vcl/win/source/gdi/salbmp.cxx
+++ b/vcl/win/source/gdi/salbmp.cxx
@@ -31,8 +31,30 @@
 #include <comphelper/broadcasthelper.hxx>
 #include <map>
 
+#if defined _MSC_VER
+#pragma warning(push, 1)
+#endif
+
+#ifdef __MINGW32__
+#ifdef GetObject
+#undef GetObject
+#endif
+#define GetObject GetObjectA
+#endif
+
 #include <gdiplus.h>
 
+#ifdef __MINGW32__
+#ifdef GetObject
+#undef GetObject
+#endif
+#endif
+
+#if defined _MSC_VER
+#pragma warning(pop)
+#endif
+
+
 // ------------------------------------------------------------------
 // - Inlines -
 
diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx
index ba28f57..cc772e9 100644
--- a/vcl/win/source/gdi/salgdi_gdiplus.cxx
+++ b/vcl/win/source/gdi/salgdi_gdiplus.cxx
@@ -351,7 +351,12 @@ void setInterpolationMode(
 
     if(bSameWidth && bSameHeight)
     {
+#ifdef __MINGW32__
+        //Gdiplus::InterpolationModeInvalid is missing on mingw
+        rGraphics.SetInterpolationMode(Gdiplus::InterpolationModeDefault);
+#else
         rGraphics.SetInterpolationMode(Gdiplus::InterpolationModeInvalid);
+#endif
     }
     else if(rDestWidth > rSrcWidth && rDestHeight > rSrcHeight)
     {
commit 9bb96049addebd8907854730713d8a3f5f033e34
Author: Armin Le Grand <alg at apache.org>
Date:   Wed Jan 23 13:27:50 2013 +0000

    Resolves: #i121534# Reintegrating changes for rotated bitmap support
    
    (cherry picked from commit b2cc0de3fc9adee90787ca760e86869f9255b380)
    
    Conflicts:
    	canvas/source/vcl/spritecanvashelper.cxx
    	drawinglayer/Library_drawinglayer.mk
    	drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
    	drawinglayer/source/processor2d/vclhelperbitmaprender.hxx
    	drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx
    	drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx
    	drawinglayer/source/processor2d/vclprocessor2d.cxx
    	officecfg/registry/schema/org/openoffice/Office/Draw.xcs
    	svx/source/svdraw/svdograf.cxx
    	vcl/aqua/source/gdi/salgdi.cxx
    	vcl/inc/aqua/salgdi.h
    	vcl/inc/os2/salgdi.h
    	vcl/inc/salgdi.hxx
    	vcl/inc/unx/pspgraphics.h
    	vcl/inc/vcl/bitmapex.hxx
    	vcl/inc/vcl/outdev.hxx
    	vcl/inc/vcl/salbtype.hxx
    	vcl/os2/source/gdi/salgdi2.cxx
    	vcl/source/gdi/bitmapex.cxx
    	vcl/source/gdi/outdev2.cxx
    	vcl/source/gdi/salgdilayout.cxx
    	vcl/source/gdi/salmisc.cxx
    	vcl/unx/generic/gdi/pspgraphics.cxx
    	vcl/unx/generic/gdi/salgdi2.cxx
    	vcl/unx/headless/svpgdi.cxx
    	vcl/unx/headless/svpgdi.hxx
    	vcl/unx/headless/svppspgraphics.cxx
    	vcl/unx/headless/svppspgraphics.hxx
    	vcl/win/source/gdi/salbmp.cxx
    	vcl/win/source/gdi/salgdi.cxx
    	vcl/win/source/gdi/salgdi3.cxx
    	vcl/win/source/gdi/salgdi_gdiplus.cxx
    	vcl/win/source/gdi/winlayout.cxx
    
    Change-Id: I871d1d107b019758f3913e5eb63bc9bc0ba403fd
    
    Do not name unused arguments to prevent compiler warnings.
    
    (cherry picked from commit f3118889a0cd941f193e9b6557c0792015d77a34)
    
    Change-Id: I482d1f96d695c7bf9912ec464bb39e7fdd14adef
    
    Related: #i121534# fix graphite-enabled windows build
    
    (cherry picked from commit c90a6ca92b1239d01a2892e15488e4a183a88b1a)
    
    Conflicts:
    	vcl/win/source/gdi/winlayout.cxx
    
    Change-Id: I95fd41ad6f7187f34ba9474674a471fb4fc65314

diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx
index ae3e7cf..0fb9380 100644
--- a/canvas/source/vcl/bitmapbackbuffer.cxx
+++ b/canvas/source/vcl/bitmapbackbuffer.cxx
@@ -78,6 +78,7 @@ namespace vclcanvas
         {
             // VDev content is more current than bitmap - copy contents before!
             mpVDev->EnableMapMode( sal_False );
+            mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
             const Point aEmptyPoint;
             *maBitmap = mpVDev->GetBitmapEx( aEmptyPoint,
                                              mpVDev->GetOutputSizePixel() );
@@ -98,6 +99,7 @@ namespace vclcanvas
         if( mbVDevContentIsCurrent && mpVDev )
         {
             mpVDev->EnableMapMode( sal_False );
+            mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
             aSize = mpVDev->GetOutputSizePixel();
         }
 
@@ -141,6 +143,7 @@ namespace vclcanvas
         {
             // fill with bitmap content
             mpVDev->EnableMapMode( sal_False );
+            mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
             const Point aEmptyPoint;
             mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap );
         }
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 10a6f53..54fff82 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -155,6 +155,7 @@ namespace vclcanvas
     {
         mp2ndOutDev = rOutDev;
         mp2ndOutDev->getOutDev().EnableMapMode( sal_False );
+        mp2ndOutDev->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
     }
 
     void CanvasHelper::clear()
@@ -166,6 +167,7 @@ namespace vclcanvas
             tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
 
             rOutDev.EnableMapMode( sal_False );
+            rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
             rOutDev.SetLineColor( COL_WHITE );
             rOutDev.SetFillColor( COL_WHITE );
             rOutDev.SetClipRegion();
@@ -178,6 +180,7 @@ namespace vclcanvas
 
                 rOutDev2.SetDrawMode( DRAWMODE_DEFAULT );
                 rOutDev2.EnableMapMode( sal_False );
+                rOutDev2.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
                 rOutDev2.SetLineColor( COL_WHITE );
                 rOutDev2.SetFillColor( COL_WHITE );
                 rOutDev2.SetClipRegion();
@@ -934,6 +937,7 @@ namespace vclcanvas
 
         tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
         rOutDev.EnableMapMode( sal_False );
+        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
 
         // TODO(F2): Support alpha vdev canvas here
         const Point aEmptyPoint(0,0);
@@ -963,6 +967,7 @@ namespace vclcanvas
 
         tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
         rOutDev.EnableMapMode( sal_False );
+        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
 
         Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(),
                                           aRect.GetSize()) );
@@ -1015,6 +1020,7 @@ namespace vclcanvas
 
         tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
         rOutDev.EnableMapMode( sal_False );
+        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
 
         const Rectangle aRect( ::vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
         const sal_uInt16    nBitCount( ::std::min( (sal_uInt16)24U,
@@ -1139,6 +1145,7 @@ namespace vclcanvas
 
         tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
         rOutDev.EnableMapMode( sal_False );
+        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
 
         const Size aBmpSize( rOutDev.GetOutputSizePixel() );
 
@@ -1176,6 +1183,7 @@ namespace vclcanvas
 
         tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
         rOutDev.EnableMapMode( sal_False );
+        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
 
         const Size aBmpSize( rOutDev.GetOutputSizePixel() );
 
@@ -1219,6 +1227,7 @@ namespace vclcanvas
         OutputDevice* p2ndOutDev = NULL;
 
         rOutDev.EnableMapMode( sal_False );
+        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
 
         if( mp2ndOutDev )
             p2ndOutDev = &mp2ndOutDev->getOutDev();
diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx
index 7c2a506..7b481c4 100644
--- a/canvas/source/vcl/impltools.hxx
+++ b/canvas/source/vcl/impltools.hxx
@@ -123,14 +123,16 @@ namespace vclcanvas
         public:
             explicit OutDevStateKeeper( OutputDevice& rOutDev ) :
                 mpOutDev( &rOutDev ),
-                mbMappingWasEnabled( mpOutDev->IsMapModeEnabled() )
+                mbMappingWasEnabled( mpOutDev->IsMapModeEnabled() ),
+                mnAntiAliasing( mpOutDev->GetAntialiasing() )
             {
                 init();
             }
 
             explicit OutDevStateKeeper( const OutDevProviderSharedPtr& rOutDev ) :
                 mpOutDev( rOutDev.get() ? &(rOutDev->getOutDev()) : NULL ),
-                mbMappingWasEnabled( mpOutDev ? mpOutDev->IsMapModeEnabled() : false )
+                mbMappingWasEnabled( mpOutDev ? mpOutDev->IsMapModeEnabled() : false ),
+                mnAntiAliasing( mpOutDev ? mpOutDev->GetAntialiasing() : 0 )
             {
                 init();
             }
@@ -140,6 +142,8 @@ namespace vclcanvas
                 if( mpOutDev )
                 {
                     mpOutDev->EnableMapMode( mbMappingWasEnabled );
+                    mpOutDev->SetAntialiasing( mnAntiAliasing );
+
                     mpOutDev->Pop();
                 }
             }
@@ -151,11 +155,13 @@ namespace vclcanvas
                 {
                     mpOutDev->Push();
                     mpOutDev->EnableMapMode(sal_False);
+                    mpOutDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
                 }
             }
 
-            OutputDevice*   mpOutDev;
-            const bool      mbMappingWasEnabled;
+            OutputDevice*       mpOutDev;
+            const bool          mbMappingWasEnabled;
+            const sal_uInt16    mnAntiAliasing;
         };
 
         ::Point mapRealPoint2D( const ::com::sun::star::geometry::RealPoint2D&  rPoint,
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index c627950..185d440 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -88,6 +88,7 @@ namespace vclcanvas
             // wouldn't save much render time, and b) will clutter
             // scrolled sprite content outside this area)
             rOutDev.EnableMapMode( sal_False );
+            rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
             rOutDev.SetClipRegion(Region(rRequestedArea));
 
             // repaint affected sprite directly to output device (at
@@ -322,6 +323,7 @@ namespace vclcanvas
 
             // flush to screen
             rOutDev.EnableMapMode( sal_False );
+            rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
             rOutDev.SetClipRegion();
             rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize,
                                 aEmptyPoint, aOutDevSize,
@@ -563,6 +565,7 @@ namespace vclcanvas
 
         // paint background
         maVDev->EnableMapMode( sal_False );
+        maVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
         maVDev->SetClipRegion();
         maVDev->DrawOutDev( aEmptyPoint, aOutputSize,
                             aOutputPosition, aOutputSize,
@@ -580,6 +583,7 @@ namespace vclcanvas
 
         // flush to screen
         rOutDev.EnableMapMode( sal_False );
+        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
         rOutDev.DrawOutDev( aOutputPosition, aOutputSize,
                             aEmptyPoint, aOutputSize,
                             *maVDev );
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index 5f89521..0a0e4b5 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -136,6 +136,7 @@ namespace vclcanvas
 
             const ::Point aEmptyPoint;
             mpBackBuffer->getOutDev().EnableMapMode( sal_False );
+            mpBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
             WriteDIB(mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint, mpBackBuffer->getOutDev().GetOutputSizePixel()), aStream, false, true);
         }
 
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index a8e92b1..308a948 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -142,8 +142,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/processor2d/objectinfoextractor2d \
     drawinglayer/source/processor2d/processorfromoutputdevice \
     drawinglayer/source/processor2d/textaspolygonextractor2d \
-    drawinglayer/source/processor2d/vclhelperbitmaprender \
-    drawinglayer/source/processor2d/vclhelperbitmaptransform \
     drawinglayer/source/processor2d/vclhelperbufferdevice \
     drawinglayer/source/processor2d/vclmetafileprocessor2d \
     drawinglayer/source/processor2d/vclpixelprocessor2d \
diff --git a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
deleted file mode 100644
index 4e67fa7..0000000
--- a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <vclhelperbitmaprender.hxx>
-#include <basegfx/vector/b2dvector.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/range/b2drange.hxx>
-#include <vcl/outdev.hxx>
-#include <vclhelperbitmaptransform.hxx>
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
-#include <vcl/gdimtf.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-// support for different kinds of bitmap rendering using vcl
-
-namespace drawinglayer
-{
-    void RenderBitmapPrimitive2D_BitmapEx(
-        OutputDevice& rOutDev,
-        const BitmapEx& rBitmapEx,
-        const basegfx::B2DHomMatrix& rTransform)
-    {
-        // only translate and scale, use vcl's DrawBitmapEx().
-        BitmapEx aContent(rBitmapEx);
-
-        // prepare dest coor. Necessary to expand since vcl's DrawBitmapEx draws one pix less
-        basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0);
-        aOutlineRange.transform(rTransform);
-        // prepare dest coordinates
-        const Point aPoint(
-                basegfx::fround(aOutlineRange.getMinX()),
-                basegfx::fround(aOutlineRange.getMinY()));
-        const Size aSize(
-                basegfx::fround(aOutlineRange.getWidth()),
-                basegfx::fround(aOutlineRange.getHeight()));
-
-        // decompose matrix to check for shear, rotate and mirroring
-        basegfx::B2DVector aScale, aTranslate;
-        double fRotate, fShearX;
-        rTransform.decompose(aScale, aTranslate, fRotate, fShearX);
-
-        // Check mirroring.
-        sal_uInt32 nMirrorFlags(BMP_MIRROR_NONE);
-
-        if(basegfx::fTools::less(aScale.getX(), 0.0))
-        {
-            nMirrorFlags |= BMP_MIRROR_HORZ;
-        }
-
-        if(basegfx::fTools::less(aScale.getY(), 0.0))
-        {
-            nMirrorFlags |= BMP_MIRROR_VERT;
-        }
-
-        if(BMP_MIRROR_NONE != nMirrorFlags)
-        {
-            aContent.Mirror(nMirrorFlags);
-        }
-
-        // draw bitmap
-        if(aSize == aContent.GetSizePixel())
-        {
-            rOutDev.DrawBitmapEx(aPoint, aContent);
-        }
-        else
-        {
-            rOutDev.DrawBitmapEx(aPoint, aSize, aContent);
-        }
-    }
-
-    void RenderBitmapPrimitive2D_self(
-        OutputDevice& rOutDev,
-        const BitmapEx& rBitmapEx,
-        const basegfx::B2DHomMatrix& rTransform)
-    {
-        // process self with free transformation (containing shear and rotate). Get dest rect in pixels.
-        basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0);
-        aOutlineRange.transform(rTransform);
-        const Rectangle aDestRectLogic(
-            basegfx::fround(aOutlineRange.getMinX()),
-            basegfx::fround(aOutlineRange.getMinY()),
-            basegfx::fround(aOutlineRange.getMaxX()),
-            basegfx::fround(aOutlineRange.getMaxY()));
-        const Rectangle aDestRectPixel(rOutDev.LogicToPixel(aDestRectLogic));
-
-        // #i96708# check if Metafile is recorded
-        const GDIMetaFile* pMetaFile = rOutDev.GetConnectMetaFile();
-        const bool bRecordToMetaFile(pMetaFile && pMetaFile->IsRecord() && !pMetaFile->IsPause());
-
-        // intersect with output pixel size, but only
-        // when not recording to metafile
-        const Rectangle aOutputRectPixel(Point(), rOutDev.GetOutputSizePixel());
-        Rectangle aCroppedRectPixel(bRecordToMetaFile ? aDestRectPixel : aDestRectPixel.GetIntersection(aOutputRectPixel));
-
-        if(!aCroppedRectPixel.IsEmpty())
-        {
-            // as maximum for destination, orientate at aOutputRectPixel, but
-            // take a rotation of 45 degrees (sqrt(2)) as maximum expansion into account
-            const Size aSourceSizePixel(rBitmapEx.GetSizePixel());
-            const double fMaximumArea(
-
-                // #i121153# With Metafile, aOutputRectPixel may be empty and a virtual
-                // maximum quadratic size has to be used
-                bRecordToMetaFile ? 500000.0 :
-
-                (double)aOutputRectPixel.getWidth() *
-                (double)aOutputRectPixel.getHeight() *
-                1.4142136); // 1.4142136 taken as sqrt(2.0)
-
-            // test if discrete view size (pixel) maybe too big and limit it
-            const double fArea(aCroppedRectPixel.getWidth() * aCroppedRectPixel.getHeight());
-            const bool bNeedToReduce(fArea > fMaximumArea);
-            double fReduceFactor(1.0);
-            const Size aDestSizePixel(aCroppedRectPixel.GetSize());
-
-            if(bNeedToReduce)
-            {
-                fReduceFactor = sqrt(fMaximumArea / fArea);
-                aCroppedRectPixel.setWidth(basegfx::fround(aCroppedRectPixel.getWidth() * fReduceFactor));
-                aCroppedRectPixel.setHeight(basegfx::fround(aCroppedRectPixel.getHeight() * fReduceFactor));
-            }
-
-            // build transform from pixel in aDestination to pixel in rBitmapEx
-            // from relative in aCroppedRectPixel to relative in aDestRectPixel
-            // No need to take bNeedToReduce into account, TopLeft is unchanged
-            basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(
-                aCroppedRectPixel.Left() - aDestRectPixel.Left(),
-                aCroppedRectPixel.Top() - aDestRectPixel.Top()));
-
-            // from relative in aDestRectPixel to absolute Logic. Here it
-            // is essential to adapt to reduce factor (if used)
-            double fAdaptedDRPWidth((double)aDestRectPixel.getWidth());
-            double fAdaptedDRPHeight((double)aDestRectPixel.getHeight());
-
-            if(bNeedToReduce)
-            {
-                fAdaptedDRPWidth *= fReduceFactor;
-                fAdaptedDRPHeight *= fReduceFactor;
-            }
-
-            aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(
-                aDestRectLogic.getWidth() / fAdaptedDRPWidth, aDestRectLogic.getHeight() / fAdaptedDRPHeight,
-                aDestRectLogic.Left(), aDestRectLogic.Top())
-                * aTransform;
-
-            // from absolute in Logic to unified object coordinates (0.0 .. 1.0 in x and y)
-            basegfx::B2DHomMatrix aInvBitmapTransform(rTransform);
-            aInvBitmapTransform.invert();
-            aTransform = aInvBitmapTransform * aTransform;
-
-            // from unit object coordinates to rBitmapEx pixel coordintes
-            aTransform.scale(aSourceSizePixel.getWidth() - 1L, aSourceSizePixel.getHeight() - 1L);
-
-            // create bitmap using source, destination and linear back-transformation
-            BitmapEx aDestination = impTransformBitmapEx(rBitmapEx, aCroppedRectPixel, aTransform);
-
-            // paint
-            if(bNeedToReduce)
-            {
-                // paint in target size
-                if(bRecordToMetaFile)
-                {
-                    rOutDev.DrawBitmapEx(
-                        rOutDev.PixelToLogic(aCroppedRectPixel.TopLeft()),
-                        rOutDev.PixelToLogic(aDestSizePixel),
-                        aDestination);
-                }
-                else
-                {
-                    const bool bWasEnabled(rOutDev.IsMapModeEnabled());
-                    rOutDev.EnableMapMode(false);
-
-                    rOutDev.DrawBitmapEx(
-                        aCroppedRectPixel.TopLeft(),
-                        aDestSizePixel,
-                        aDestination);
-
-                    rOutDev.EnableMapMode(bWasEnabled);
-                }
-            }
-            else
-            {
-                if(bRecordToMetaFile)
-                {
-                    rOutDev.DrawBitmapEx(
-                        rOutDev.PixelToLogic(aCroppedRectPixel.TopLeft()),
-                        aDestination);
-                }
-                else
-                {
-                    const bool bWasEnabled(rOutDev.IsMapModeEnabled());
-                    rOutDev.EnableMapMode(false);
-
-                    rOutDev.DrawBitmapEx(
-                        aCroppedRectPixel.TopLeft(),
-                        aDestination);
-
-                    rOutDev.EnableMapMode(bWasEnabled);
-                }
-            }
-        }
-    }
-} // end of namespace drawinglayer
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/processor2d/vclhelperbitmaprender.hxx b/drawinglayer/source/processor2d/vclhelperbitmaprender.hxx
deleted file mode 100644
index 3130742..0000000
--- a/drawinglayer/source/processor2d/vclhelperbitmaprender.hxx
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLHELPERBITMAPRENDER_HXX
-#define INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLHELPERBITMAPRENDER_HXX
-
-#include <sal/types.h>
-
-//////////////////////////////////////////////////////////////////////////////
-// predefines
-
-class OutputDevice;
-class BitmapEx;
-namespace basegfx { class B2DHomMatrix; }
-
-//////////////////////////////////////////////////////////////////////////////
-// support methods for vcl direct gradient renderering
-
-namespace drawinglayer
-{
-    void RenderBitmapPrimitive2D_BitmapEx(
-        OutputDevice& rOutDev,
-        const BitmapEx& rBitmapEx,
-        const basegfx::B2DHomMatrix& rTransform);
-
-    void RenderBitmapPrimitive2D_self(
-        OutputDevice& rOutDev,
-        const BitmapEx& rBitmapEx,
-        const basegfx::B2DHomMatrix& rTransform);
-
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif // INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLHELPERBITMAPRENDER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx b/drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx
deleted file mode 100644
index 76ea68d..0000000
--- a/drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx
+++ /dev/null
@@ -1,328 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <vclhelperbitmaptransform.hxx>
-#include <vcl/bmpacc.hxx>
-#include <basegfx/point/b2dpoint.hxx>
-#include <basegfx/color/bcolormodifier.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-// support for rendering Bitmap and BitmapEx contents
-
-namespace drawinglayer
-{
-    namespace
-    {
-        void impSmoothPoint(BitmapColor& rValue, const basegfx::B2DPoint& rSource, sal_Int32 nIntX, sal_Int32 nIntY, BitmapReadAccess& rRead)
-        {
-            double fDeltaX(rSource.getX() - nIntX);
-            double fDeltaY(rSource.getY() - nIntY);
-            sal_Int32 nIndX(0L);
-            sal_Int32 nIndY(0L);
-
-            if(fDeltaX > 0.0 && nIntX + 1L < rRead.Width())
-            {
-                nIndX++;
-            }
-            else if(fDeltaX < 0.0 && nIntX >= 1L)
-            {
-                fDeltaX = -fDeltaX;
-                nIndX--;
-            }
-
-            if(fDeltaY > 0.0 && nIntY + 1L < rRead.Height())
-            {
-                nIndY++;
-            }
-            else if(fDeltaY < 0.0 && nIntY >= 1L)
-            {
-                fDeltaY = -fDeltaY;
-                nIndY--;
-            }
-
-            if(nIndX || nIndY)
-            {
-                const double fColorToReal(1.0 / 255.0);
-                double fR(rValue.GetRed() * fColorToReal);
-                double fG(rValue.GetGreen() * fColorToReal);
-                double fB(rValue.GetBlue() * fColorToReal);
-                double fRBottom(0.0), fGBottom(0.0), fBBottom(0.0);
-
-                if(nIndX)
-                {
-                    const double fMulA(fDeltaX * fColorToReal);
-                    double fMulB(1.0 - fDeltaX);
-                    const BitmapColor aTopPartner(rRead.GetColor(nIntY, nIntX + nIndX));
-
-                    fR = (fR * fMulB) + (aTopPartner.GetRed() * fMulA);
-                    fG = (fG * fMulB) + (aTopPartner.GetGreen() * fMulA);
-                    fB = (fB * fMulB) + (aTopPartner.GetBlue() * fMulA);
-
-                    if(nIndY)
-                    {
-                        fMulB *= fColorToReal;
-                        const BitmapColor aBottom(rRead.GetColor(nIntY + nIndY, nIntX));
-                        const BitmapColor aBottomPartner(rRead.GetColor(nIntY + nIndY, nIntX + nIndX));
-
-                        fRBottom = (aBottom.GetRed() * fMulB) + (aBottomPartner.GetRed() * fMulA);
-                        fGBottom = (aBottom.GetGreen() * fMulB) + (aBottomPartner.GetGreen() * fMulA);
-                        fBBottom = (aBottom.GetBlue() * fMulB) + (aBottomPartner.GetBlue() * fMulA);
-                    }
-                }
-
-                if(nIndY)
-                {
-                    if(!nIndX)
-                    {
-                        const BitmapColor aBottom(rRead.GetColor(nIntY + nIndY, nIntX));
-
-                        fRBottom = aBottom.GetRed() * fColorToReal;
-                        fGBottom = aBottom.GetGreen() * fColorToReal;
-                        fBBottom = aBottom.GetBlue() * fColorToReal;
-                    }
-
-                    const double fMulB(1.0 - fDeltaY);
-
-                    fR = (fR * fMulB) + (fRBottom * fDeltaY);
-                    fG = (fG * fMulB) + (fGBottom * fDeltaY);
-                    fB = (fB * fMulB) + (fBBottom * fDeltaY);
-                }
-
-                rValue.SetRed((sal_uInt8)(fR * 255.0));
-                rValue.SetGreen((sal_uInt8)(fG * 255.0));
-                rValue.SetBlue((sal_uInt8)(fB * 255.0));
-            }
-        }
-
-        Bitmap impTransformBitmap(
-            const Bitmap& rSource,
-            const Size aDestinationSize,
-            const basegfx::B2DHomMatrix& rTransform,
-            bool bSmooth)
-        {
-            Bitmap aDestination(aDestinationSize, 24);
-            BitmapWriteAccess* pWrite = aDestination.AcquireWriteAccess();
-
-            if(pWrite)
-            {
-                const Size aContentSizePixel(rSource.GetSizePixel());
-                BitmapReadAccess* pRead = (const_cast< Bitmap& >(rSource)).AcquireReadAccess();
-
-                if(pRead)
-                {
-                    const Size aDestinationSizePixel(aDestination.GetSizePixel());
-                    bool bWorkWithIndex(rSource.GetBitCount() <= 8);
-                    BitmapColor aOutside(BitmapColor(0xff, 0xff, 0xff));
-
-                    for(sal_Int32 y(0L); y < aDestinationSizePixel.getHeight(); y++)
-                    {
-                        for(sal_Int32 x(0L); x < aDestinationSizePixel.getWidth(); x++)
-                        {
-                            const basegfx::B2DPoint aSourceCoor(rTransform * basegfx::B2DPoint(x, y));
-                            const sal_Int32 nIntX(basegfx::fround(aSourceCoor.getX()));
-
-                            if(nIntX >= 0L && nIntX < aContentSizePixel.getWidth())
-                            {
-                                const sal_Int32 nIntY(basegfx::fround(aSourceCoor.getY()));
-
-                                if(nIntY >= 0L && nIntY < aContentSizePixel.getHeight())
-                                {
-                                    // inside pixel
-                                    BitmapColor aValue;
-
-                                    if(bWorkWithIndex)
-                                    {
-                                        aValue = pRead->GetPaletteColor(pRead->GetPixelIndex(nIntY, nIntX));
-                                    }
-                                    else
-                                    {
-                                        aValue = pRead->GetPixel(nIntY, nIntX);
-                                    }
-
-                                    if(bSmooth)
-                                    {
-                                        impSmoothPoint(aValue, aSourceCoor, nIntX, nIntY, *pRead);
-                                    }
-
-                                    pWrite->SetPixel(y, x, aValue);
-                                    continue;
-                                }
-                            }
-
-                            // here are outside pixels. Complete mask
-                            if(bWorkWithIndex)
-                            {
-                                pWrite->SetPixel(y, x, aOutside);
-                            }
-                        }
-                    }
-
-                    delete pRead;
-                }
-
-                delete pWrite;
-            }
-
-            rSource.AdaptBitCount(aDestination);
-
-            return aDestination;
-        }
-    } // end of anonymous namespace
-} // end of namespace drawinglayer
-
-namespace drawinglayer
-{
-    BitmapEx impTransformBitmapEx(
-        const BitmapEx& rSource,
-        const Rectangle& rCroppedRectPixel,
-        const basegfx::B2DHomMatrix& rTransform)
-    {
-        // force destination to 24 bit, we want to smooth output
-        const Size aDestinationSize(rCroppedRectPixel.GetSize());
-        static bool bDoSmoothAtAll(true);
-        const Bitmap aDestination(impTransformBitmap(rSource.GetBitmap(), aDestinationSize, rTransform, bDoSmoothAtAll));
-
-        // create mask
-        if(rSource.IsTransparent())
-        {
-            if(rSource.IsAlpha())
-            {
-                const Bitmap aAlpha(impTransformBitmap(rSource.GetAlpha().GetBitmap(), aDestinationSize, rTransform, bDoSmoothAtAll));
-                return BitmapEx(aDestination, AlphaMask(aAlpha));
-            }
-            else
-            {
-                const Bitmap aMask(impTransformBitmap(rSource.GetMask(), aDestinationSize, rTransform, false));
-                return BitmapEx(aDestination, aMask);
-            }
-        }
-
-        return BitmapEx(aDestination);
-    }
-
-    BitmapEx impModifyBitmapEx(
-        const basegfx::BColorModifierStack& rBColorModifierStack,
-        const BitmapEx& rSource)
-    {
-        Bitmap aChangedBitmap(rSource.GetBitmap());
-        bool bDone(false);
-
-        for(sal_uInt32 a(rBColorModifierStack.count()); a && !bDone; )
-        {
-            const basegfx::BColorModifier& rModifier = rBColorModifierStack.getBColorModifier(--a);
-
-            switch(rModifier.getMode())
-            {
-                case basegfx::BCOLORMODIFYMODE_REPLACE :
-                {
-                    // complete replace
-                    if(rSource.IsTransparent())
-                    {
-                        // clear bitmap with dest color
-                        if(aChangedBitmap.GetBitCount() <= 8)
-                        {
-                            // do NOT use erase; for e.g. 8bit Bitmaps, the nearest color to the given
-                            // erase color is determined and used -> this may be different from what is
-                            // wanted here. Better create a new bitmap with the needed color explicitly
-                            BitmapReadAccess* pReadAccess = aChangedBitmap.AcquireReadAccess();
-                            OSL_ENSURE(pReadAccess, "Got no Bitmap ReadAccess ?!?");
-
-                            if(pReadAccess)
-                            {
-                                BitmapPalette aNewPalette(pReadAccess->GetPalette());
-                                aNewPalette[0] = BitmapColor(Color(rModifier.getBColor()));
-                                aChangedBitmap = Bitmap(
-                                    aChangedBitmap.GetSizePixel(),
-                                    aChangedBitmap.GetBitCount(),
-                                    &aNewPalette);
-                                delete pReadAccess;
-                            }
-                        }
-                        else
-                        {
-                            aChangedBitmap.Erase(Color(rModifier.getBColor()));
-                        }
-                    }
-                    else
-                    {
-                        // erase bitmap, caller will know to paint direct
-                        aChangedBitmap.SetEmpty();
-                    }
-
-                    bDone = true;
-                    break;
-                }
-
-                default : // BCOLORMODIFYMODE_INTERPOLATE, BCOLORMODIFYMODE_GRAY, BCOLORMODIFYMODE_BLACKANDWHITE
-                {
-                    BitmapWriteAccess* pContent = aChangedBitmap.AcquireWriteAccess();
-
-                    if(pContent)
-                    {
-                        const double fConvertColor(1.0 / 255.0);
-
-                        for(sal_uInt32 y(0L); y < (sal_uInt32)pContent->Height(); y++)
-                        {
-                            for(sal_uInt32 x(0L); x < (sal_uInt32)pContent->Width(); x++)
-                            {
-                                const BitmapColor aBMCol(pContent->GetColor(y, x));
-                                const basegfx::BColor aBSource(
-                                    (double)aBMCol.GetRed() * fConvertColor,
-                                    (double)aBMCol.GetGreen() * fConvertColor,
-                                    (double)aBMCol.GetBlue() * fConvertColor);
-                                const basegfx::BColor aBDest(rModifier.getModifiedColor(aBSource));
-
-                                pContent->SetPixel(y, x, BitmapColor(Color(aBDest)));
-                            }
-                        }
-
-                        delete pContent;
-                    }
-
-                    break;
-                }
-            }
-        }
-
-        if(aChangedBitmap.IsEmpty())
-        {
-            return BitmapEx();
-        }
-        else
-        {
-            if(rSource.IsTransparent())
-            {
-                if(rSource.IsAlpha())
-                {
-                    return BitmapEx(aChangedBitmap, rSource.GetAlpha());
-                }
-                else
-                {
-                    return BitmapEx(aChangedBitmap, rSource.GetMask());
-                }
-            }
-            else
-            {
-                return BitmapEx(aChangedBitmap);
-            }
-        }
-    }
-} // end of namespace drawinglayer
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx b/drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx
deleted file mode 100644
index 5a25eb8..0000000
--- a/drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLHELPERBITMAPTRANSFORM_HXX
-#define INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLHELPERBITMAPTRANSFORM_HXX
-
-#include <vcl/bitmapex.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-// predefines
-
-namespace basegfx {
-    class B2DHomMatrix;
-    class BColorModifierStack;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// support methods for vcl direct gradient renderering
-
-namespace drawinglayer
-{
-    BitmapEx impTransformBitmapEx(
-        const BitmapEx& rSource,
-        const Rectangle& rCroppedRectPixel,
-        const basegfx::B2DHomMatrix& rTransform);
-
-    BitmapEx impModifyBitmapEx(
-        const basegfx::BColorModifierStack& rBColorModifierStack,
-        const BitmapEx& rSource);
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif // INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLHELPERBITMAPTRANSFORM_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 759454a..02b80cc 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -25,9 +25,7 @@
 #include <vcl/outdev.hxx>
 #include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
-#include <vclhelperbitmaptransform.hxx>
 #include <basegfx/polygon/b2dpolygontools.hxx>
-#include <vclhelperbitmaprender.hxx>
 #include <drawinglayer/attribute/sdrfillgraphicattribute.hxx>
 #include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
 #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
@@ -436,7 +434,7 @@ namespace drawinglayer
 
             if(maBColorModifierStack.count())
             {
-                aBitmapEx = impModifyBitmapEx(maBColorModifierStack, aBitmapEx);
+                aBitmapEx = aBitmapEx.ModifyBitmapEx(maBColorModifierStack);
 
                 if(aBitmapEx.IsEmpty())
                 {
@@ -453,36 +451,24 @@ namespace drawinglayer
                 }
             }
 
-            {
-                static bool bForceUseOfOwnTransformer(false);
-
-                // decompose matrix to check for shear, rotate and mirroring
-                basegfx::B2DVector aScale, aTranslate;
-                double fRotate, fShearX;
-                aLocalTransform.decompose(aScale, aTranslate, fRotate, fShearX);
+            // decompose matrix to check for shear, rotate and mirroring
+            basegfx::B2DVector aScale, aTranslate;
+            double fRotate, fShearX;
 
-                // #i121387# when mirrored and rotated, avoid the GraphicManager output which has low quality
-                const bool bRotated(!basegfx::fTools::equalZero(fRotate));
-                const bool bSheared(!basegfx::fTools::equalZero(fShearX));
-                //const bool bMirrored(aScale.getX() < 0.0 || aScale.getY() < 0.0);
-                // const bool bMirroredAndRotated(bRotated && bMirrored);
+            aLocalTransform.decompose(aScale, aTranslate, fRotate, fShearX);
 
-                if(!bForceUseOfOwnTransformer && !bRotated && !bSheared) // && !bMirrored)
-                {
-                    RenderBitmapPrimitive2D_BitmapEx(*mpOutputDevice, aBitmapEx, aLocalTransform);
-                }
-                else
-                {
-                    if(!aBitmapEx.IsTransparent() && (bSheared || bRotated))
-                    {
-                        // parts will be uncovered, extend aBitmapEx with a mask bitmap
-                        const Bitmap aContent(aBitmapEx.GetBitmap());
-                        aBitmapEx = BitmapEx(aContent, Bitmap(aContent.GetSizePixel(), 1));
-                    }
+            const bool bRotated(!basegfx::fTools::equalZero(fRotate));
+            const bool bSheared(!basegfx::fTools::equalZero(fShearX));
 
-                    RenderBitmapPrimitive2D_self(*mpOutputDevice, aBitmapEx, aLocalTransform);
-                }
+            if(!aBitmapEx.IsTransparent() && (bSheared || bRotated))
+            {
+                // parts will be uncovered, extend aBitmapEx with a mask bitmap
+                const Bitmap aContent(aBitmapEx.GetBitmap());
+                aBitmapEx = BitmapEx(aContent, Bitmap(aContent.GetSizePixel(), 1));
             }
+
+            // draw using OutputDevice'sDrawTransformedBitmapEx
+            mpOutputDevice->DrawTransformedBitmapEx(aLocalTransform, aBitmapEx);
         }
 
         void VclProcessor2D::RenderFillGraphicPrimitive2D(const primitive2d::FillGraphicPrimitive2D& rFillBitmapCandidate)
@@ -563,7 +549,7 @@ namespace drawinglayer
                                 if(maBColorModifierStack.count())
                                 {
                                     // when color modifier, apply to bitmap
-                                    aBitmapEx = impModifyBitmapEx(maBColorModifierStack, aBitmapEx);
+                                    aBitmapEx = aBitmapEx.ModifyBitmapEx(maBColorModifierStack);
 
                                     // impModifyBitmapEx uses empty bitmap as sign to return that
                                     // the content will be completely replaced to mono color, use shortcut
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index f26ef96..42b7b99 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -24,6 +24,7 @@
 #include <vcl/bitmap.hxx>
 #include <vcl/alpha.hxx>
 #include <tools/color.hxx>
+#include <basegfx/color/bcolormodifier.hxx>
 
 #include <com/sun/star/uno/Reference.hxx>
 
@@ -381,6 +382,44 @@ public:
      */
     sal_uInt8 GetTransparency(sal_Int32 nX, sal_Int32 nY) const;
 
+    /** Create transformed Bitmap
+
+        @param fWidth
+        The target width in pixels
+
+        @param fHeight
+        The target height in pixels
+
+        @param rTransformation
+        The back transformation for each pixel in (0 .. fWidth),(0 .. fHeight) to
+        local pixel coordiantes
+    */
+    BitmapEx TransformBitmapEx(
+        double fWidth,
+        double fHeight,
+        const basegfx::B2DHomMatrix& rTransformation) const;
+
+    /** Create transformed Bitmap
+
+        @param rTransformation
+        The transformation from unit coordinates to target
+
+        @param fMaximumArea
+        A limitation for the maximum size of pixels to use for the result
+
+        @return The transformed bitmap
+    */
+    BitmapEx getTransformed(
+        const basegfx::B2DHomMatrix& rTransformation,
+        double fMaximumArea = 500000.0) const;
+
+    /** Create ColorStack-modified version of this BitmapEx
+
+        @param rBColorModifierStack
+        A ColrModifierStack which defines how each pixel has to be modified
+    */
+    BitmapEx ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorModifierStack) const;
+
 public:
 
     static BitmapEx AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize);
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index b76598f..306c9d4 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -72,6 +72,7 @@ class SalLayout;
 class ImplLayoutArgs;
 class ImplFontAttributes;
 class VirtualDevice;
+struct SalTwoRect;
 
 namespace com {
 namespace sun {
@@ -336,27 +337,29 @@ private:
     Point               maRefPoint;
     sal_uInt16              mnAntialiasing;
     LanguageType        meTextLanguage;
-    mutable sal_Bool       mbMap:1,
-                        mbMapIsDefault:1,
-                        mbClipRegion:1,
-                        mbBackground:1,
-                        mbOutput:1,
-                        mbDevOutput:1,
-                        mbOutputClipped:1,
-                        mbLineColor:1,
-                        mbFillColor:1,
-                        mbInitLineColor:1,
-                        mbInitFillColor:1,
-                        mbInitFont:1,
-                        mbInitTextColor:1,
-                        mbInitClipRegion:1,
-                        mbClipRegionSet:1,
-                        mbKerning:1,
-                        mbNewFont:1,
-                        mbTextLines:1,
-                        mbTextSpecial:1,
-                        mbRefPoint:1,
-                        mbEnableRTL:1;
+
+    /// bitfield
+    mutable bool        mbMap : 1;
+    mutable bool        mbMapIsDefault : 1;
+    mutable bool        mbClipRegion : 1;
+    mutable bool        mbBackground : 1;
+    mutable bool        mbOutput : 1;
+    mutable bool        mbDevOutput : 1;
+    mutable bool        mbOutputClipped : 1;
+    mutable bool        mbLineColor : 1;
+    mutable bool        mbFillColor : 1;
+    mutable bool        mbInitLineColor : 1;
+    mutable bool        mbInitFillColor : 1;
+    mutable bool        mbInitFont : 1;
+    mutable bool        mbInitTextColor : 1;
+    mutable bool        mbInitClipRegion : 1;
+    mutable bool        mbClipRegionSet : 1;
+    mutable bool        mbKerning : 1;
+    mutable bool        mbNewFont : 1;
+    mutable bool        mbTextLines : 1;
+    mutable bool        mbTextSpecial : 1;
+    mutable bool        mbRefPoint : 1;
+    mutable bool        mbEnableRTL : 1;
 
 public:
     SAL_DLLPRIVATE sal_Int32    ImplGetDPIX() const { return mnDPIX; }
@@ -455,7 +458,7 @@ public:
     SAL_DLLPRIVATE void         ImplDrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
     SAL_DLLPRIVATE void         ImplDrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
 
-    SAL_DLLPRIVATE void         ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pPosAry );
+    SAL_DLLPRIVATE void         ImplDrawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rPosAry );
     SAL_DLLPRIVATE void         ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
                                         const Point& rSrcPtPixel, const Size& rSrcSizePixel,
                                         const Bitmap& rBitmap, const sal_uLong nAction );
@@ -746,6 +749,20 @@ public:
                                       const Point& rSrcPtPixel, const Size& rSrcSizePixel,
                                       const BitmapEx& rBitmapEx );
 
+    /** Draw BitampEx transformed
+
+        @param rTransformation
+        The transformation describing the target positioning of the given bitmap. Transforming
+        the unit object coordinates (0, 0, 1, 1) with this matrix is the transformation to
+        discrete coordinates
+
+        @param rBitmapEx
+        The BitmapEx to be painted
+    */
+    void DrawTransformedBitmapEx(
+        const basegfx::B2DHomMatrix& rTransformation,
+        const BitmapEx& rBitmapEx);
+
     void                DrawMask( const Point& rDestPt,
                                   const Bitmap& rBitmap, const Color& rMaskColor );
     void                DrawMask( const Point& rDestPt, const Size& rDestSize,
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx
index f926262..ae3e214 100644
--- a/include/vcl/salbtype.hxx
+++ b/include/vcl/salbtype.hxx
@@ -267,8 +267,9 @@ struct VCL_DLLPUBLIC BitmapBuffer
 // - StretchAndConvert -
 // ---------------------
 
-VCL_DLLPUBLIC BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
-                                               sal_uLong nDstBitmapFormat, BitmapPalette* pDstPal = NULL, ColorMask* pDstMask = NULL );
+VCL_DLLPUBLIC BitmapBuffer* StretchAndConvert(
+    const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
+    sal_uLong nDstBitmapFormat, const BitmapPalette* pDstPal = NULL, const ColorMask* pDstMask = NULL );
 
 // ------------------------------------------------------------------
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
index 257e4f7..04bc033 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
@@ -300,7 +300,7 @@
           <desc>Indicates whether a double-click on an object activates the rotation mode.</desc>
           <label>Rotation Mode after clicking object</label>
         </info>
-        <value>false</value>
+        <value>true</value>
       </prop>
       <prop oor:name="Preview" oor:type="xs:double" oor:nillable="false">
         <!-- OldPath: Draw/Other -->
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index d53539f..0e91865 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -173,6 +173,7 @@ namespace sdr
             const double fCurrentTime(getPrimitiveAnimator().GetTime());
             OutputDevice& rTargetOutDev = GetPageWindow().GetPaintWindow().GetTargetOutputDevice();
             basegfx::B2DRange aViewRange;
+            basegfx::B2DHomMatrix aViewTransformation;
 
             // create ViewRange
             if(isOutputToRecordingMetaFile())
@@ -222,12 +223,16 @@ namespace sdr
 
                 // transform to world coordinates
                 aViewRange.transform(rTargetOutDev.GetInverseViewTransformation());
+
+                // for metafile, leave ViewTransformation empty, but for pixel renderer
+                // get it from OutputDevice
+                aViewTransformation = rTargetOutDev.GetViewTransformation();
             }
 
             // update local ViewInformation2D
             const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D(
                 basegfx::B2DHomMatrix(),
-                rTargetOutDev.GetViewTransformation(),
+                aViewTransformation,
                 aViewRange,
                 GetXDrawPageForSdrPage(GetSdrPage()),
                 fCurrentTime,
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 4911fab..fa7dc52 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -525,7 +525,7 @@ void SdrHdl::CreateB2dIAObject()
             // for SJ and the CustomShapeHandles:
             case HDL_CUSTOMSHAPE1:
             {
-                eKindOfMarker = (b1PixMore) ? Customshape_7x7 : Customshape_9x9;
+                eKindOfMarker = (b1PixMore) ? Customshape_9x9 : Customshape_7x7;
                 eColIndex = Yellow;
                 break;
             }
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 56a8a02..00da762 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -656,7 +656,6 @@ const OUString& SdrGrafObj::GetFilterName() const
 
 void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
 {
-    bool bAnim = pGraphic->IsAnimated();
     bool bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj;
 
     rInfo.bResizeFreeAllowed = aGeo.nDrehWink % 9000 == 0 ||
@@ -664,10 +663,10 @@ void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
                                aGeo.nDrehWink % 27000 == 0;
 
     rInfo.bResizePropAllowed = true;
-    rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim;
-    rInfo.bRotate90Allowed = bNoPresGrf && !bAnim;
-    rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim;
-    rInfo.bMirror45Allowed = bNoPresGrf && !bAnim;
+    rInfo.bRotateFreeAllowed = bNoPresGrf;
+    rInfo.bRotate90Allowed = bNoPresGrf;
+    rInfo.bMirrorFreeAllowed = bNoPresGrf;
+    rInfo.bMirror45Allowed = bNoPresGrf;
     rInfo.bMirror90Allowed = !bEmptyPresObj;
     rInfo.bTransparenceAllowed = false;
     rInfo.bGradientAllowed = false;
diff --git a/vcl/aqua/source/gdi/salgdicommon.cxx b/vcl/aqua/source/gdi/salgdicommon.cxx
index f449b36..a7b3f32 100644
--- a/vcl/aqua/source/gdi/salgdicommon.cxx
+++ b/vcl/aqua/source/gdi/salgdicommon.cxx
@@ -284,7 +284,7 @@ static inline void alignLinePoint( const SalPoint* i_pIn, float& o_fX, float& o_
     o_fY = static_cast<float>(i_pIn->mnY ) + 0.5;
 }
 
-void AquaSalGraphics::copyBits( const SalTwoRect *pPosAry, SalGraphics *pSrcGraphics )
+void AquaSalGraphics::copyBits( const SalTwoRect& rPosAry, SalGraphics *pSrcGraphics )
 {
     if( !pSrcGraphics )
     {
@@ -292,10 +292,10 @@ void AquaSalGraphics::copyBits( const SalTwoRect *pPosAry, SalGraphics *pSrcGrap
     }
     //from unix salgdi2.cxx
     //[FIXME] find a better way to prevent calc from crashing when width and height are negative
-    if( pPosAry->mnSrcWidth <= 0
-        || pPosAry->mnSrcHeight <= 0
-        || pPosAry->mnDestWidth <= 0
-        || pPosAry->mnDestHeight <= 0 )
+    if( rPosAry.mnSrcWidth <= 0
+        || rPosAry.mnSrcHeight <= 0
+        || rPosAry.mnDestWidth <= 0
+        || rPosAry.mnDestHeight <= 0 )
     {
         return;
     }
@@ -304,17 +304,17 @@ void AquaSalGraphics::copyBits( const SalTwoRect *pPosAry, SalGraphics *pSrcGrap
     /*const*/ AquaSalGraphics* pSrc = static_cast<AquaSalGraphics*>(pSrcGraphics);
     const bool bSameGraphics = (this == pSrc) ||
         (mbWindow && mpFrame && pSrc->mbWindow && (mpFrame == pSrc->mpFrame));
-    if( bSameGraphics &&
-        (pPosAry->mnSrcWidth == pPosAry->mnDestWidth) &&
-        (pPosAry->mnSrcHeight == pPosAry->mnDestHeight))
+    if( bSameGraphics
+    &&  (rPosAry.mnSrcWidth == rPosAry.mnDestWidth)
+    &&  (rPosAry.mnSrcHeight == rPosAry.mnDestHeight))
     {
         // short circuit if there is nothing to do
-        if( (pPosAry->mnSrcX == pPosAry->mnDestX) &&
-            (pPosAry->mnSrcY == pPosAry->mnDestY))
+        if( (rPosAry.mnSrcX == rPosAry.mnDestX)
+        &&  (rPosAry.mnSrcY == rPosAry.mnDestY))
             return;
         // use copyArea() if source and destination context are identical
-        copyArea( pPosAry->mnDestX, pPosAry->mnDestY, pPosAry->mnSrcX, pPosAry->mnSrcY,
-            pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, 0 );
+        copyArea( rPosAry.mnDestX, rPosAry.mnDestY, rPosAry.mnSrcX, rPosAry.mnSrcY,
+            rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, 0 );
         return;
     }
 
@@ -323,9 +323,9 @@ void AquaSalGraphics::copyBits( const SalTwoRect *pPosAry, SalGraphics *pSrcGrap
 
     DBG_ASSERT( pSrc->mxLayer!=NULL, "AquaSalGraphics::copyBits() from non-layered graphics" );
 
-    const CGPoint aDstPoint = { static_cast<CGFloat>(+pPosAry->mnDestX - pPosAry->mnSrcX), static_cast<CGFloat>(pPosAry->mnDestY - pPosAry->mnSrcY) };
-    if( (pPosAry->mnSrcWidth == pPosAry->mnDestWidth &&
-         pPosAry->mnSrcHeight == pPosAry->mnDestHeight) &&
+    const CGPoint aDstPoint = { static_cast<CGFloat>(+rPosAry.mnDestX - rPosAry.mnSrcX), static_cast<CGFloat>(rPosAry.mnDestY - rPosAry.mnSrcY) };
+    if( (rPosAry.mnSrcWidth == rPosAry.mnDestWidth &&
+         rPosAry.mnSrcHeight == rPosAry.mnDestHeight) &&
         (!mnBitmapDepth || (aDstPoint.x + pSrc->mnWidth) <= mnWidth) ) // workaround a Quartz crasher
     {
         // in XOR mode the drawing context is redirected to the XOR mask
@@ -339,7 +339,7 @@ void AquaSalGraphics::copyBits( const SalTwoRect *pPosAry, SalGraphics *pSrcGrap
             }
         }
         CGContextSaveGState( xCopyContext );
-        const CGRect aDstRect = { { static_cast<CGFloat>(pPosAry->mnDestX), static_cast<CGFloat>(pPosAry->mnDestY) }, { static_cast<CGFloat>(pPosAry->mnDestWidth), static_cast<CGFloat>(pPosAry->mnDestHeight) } };
+        const CGRect aDstRect = { { static_cast<CGFloat>(rPosAry.mnDestX), static_cast<CGFloat>(rPosAry.mnDestY) }, { static_cast<CGFloat>(rPosAry.mnDestWidth), static_cast<CGFloat>(rPosAry.mnDestHeight) } };
         CGContextClipToRect( xCopyContext, aDstRect );
 
         // draw at new destination
@@ -356,15 +356,15 @@ void AquaSalGraphics::copyBits( const SalTwoRect *pPosAry, SalGraphics *pSrcGrap
     }
     else
     {
-        SalBitmap* pBitmap = pSrc->getBitmap( pPosAry->mnSrcX, pPosAry->mnSrcY,
-                                              pPosAry->mnSrcWidth, pPosAry->mnSrcHeight );
+        SalBitmap* pBitmap = pSrc->getBitmap( rPosAry.mnSrcX, rPosAry.mnSrcY,
+                                              rPosAry.mnSrcWidth, rPosAry.mnSrcHeight );
 
         if( pBitmap )
         {
-            SalTwoRect aPosAry( *pPosAry );
+            SalTwoRect aPosAry( rPosAry );
             aPosAry.mnSrcX = 0;
             aPosAry.mnSrcY = 0;
-            drawBitmap( &aPosAry, *pBitmap );
+            drawBitmap( aPosAry, *pBitmap );
             delete pBitmap;
         }
     }
@@ -530,6 +530,19 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
     return true;
 }
 
+bool AquaSalGraphics::drawTransformedBitmap(
+    const basegfx::B2DPoint& rNull,
+    const basegfx::B2DPoint& rX,
+    const basegfx::B2DPoint& rY,
+    const SalBitmap& rSourceBitmap,
+    const SalBitmap* pAlphaBitmap)
+{
+    // here direct support for transformed bitmaps can be impemented
+    (void)rNull; (void)rX; (void)rY; (void)rSourceBitmap; (void)pAlphaBitmap;
+    return false;
+}
+
+
 bool AquaSalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
                                      long nHeight, sal_uInt8 nTransparency )
 {
@@ -558,33 +571,33 @@ bool AquaSalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
     return true;
 }
 
-void AquaSalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap )
+void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap )
 {
     if( !CheckContext() )
     {
         return;
     }
     const QuartzSalBitmap& rBitmap = static_cast<const QuartzSalBitmap&>(rSalBitmap);
-    CGImageRef xImage = rBitmap.CreateCroppedImage( (int)pPosAry->mnSrcX, (int)pPosAry->mnSrcY,
-                                                    (int)pPosAry->mnSrcWidth, (int)pPosAry->mnSrcHeight );
+    CGImageRef xImage = rBitmap.CreateCroppedImage( (int)rPosAry.mnSrcX, (int)rPosAry.mnSrcY,
+                                                    (int)rPosAry.mnSrcWidth, (int)rPosAry.mnSrcHeight );
     if( !xImage )
     {
         return;
     }
-    const CGRect aDstRect = { { static_cast<CGFloat>(pPosAry->mnDestX), static_cast<CGFloat>(pPosAry->mnDestY) },
-                              { static_cast<CGFloat>(pPosAry->mnDestWidth), static_cast<CGFloat>(pPosAry->mnDestHeight) } };
+    const CGRect aDstRect = { { static_cast<CGFloat>(rPosAry.mnDestX), static_cast<CGFloat>(rPosAry.mnDestY) },
+                              { static_cast<CGFloat>(rPosAry.mnDestWidth), static_cast<CGFloat>(rPosAry.mnDestHeight) } };
     CGContextDrawImage( mrContext, aDstRect, xImage );
     CGImageRelease( xImage );
     RefreshRect( aDstRect );
 }
 
-void AquaSalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap,SalColor )
+void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,SalColor )
 {
     OSL_FAIL("not implemented for color masking!");
-    drawBitmap( pPosAry, rSalBitmap );
+    drawBitmap( rPosAry, rSalBitmap );
 }
 
-void AquaSalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap,
+void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
                                   const SalBitmap& rTransparentBitmap )
 {
     if( !CheckContext() )
@@ -593,14 +606,14 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rS
     }
     const QuartzSalBitmap& rBitmap = static_cast<const QuartzSalBitmap&>(rSalBitmap);
     const QuartzSalBitmap& rMask = static_cast<const QuartzSalBitmap&>(rTransparentBitmap);
-    CGImageRef xMaskedImage( rBitmap.CreateWithMask( rMask, pPosAry->mnSrcX, pPosAry->mnSrcY,
-                                                     pPosAry->mnSrcWidth, pPosAry->mnSrcHeight ) );
+    CGImageRef xMaskedImage( rBitmap.CreateWithMask( rMask, rPosAry.mnSrcX, rPosAry.mnSrcY,
+                                                     rPosAry.mnSrcWidth, rPosAry.mnSrcHeight ) );
     if( !xMaskedImage )
     {
         return;
     }
-    const CGRect aDstRect = { { static_cast<CGFloat>(pPosAry->mnDestX), static_cast<CGFloat>(pPosAry->mnDestY)},
-                              { static_cast<CGFloat>(pPosAry->mnDestWidth), static_cast<CGFloat>(pPosAry->mnDestHeight) } };
+    const CGRect aDstRect = { { static_cast<CGFloat>(rPosAry.mnDestX), static_cast<CGFloat>(rPosAry.mnDestY)},
+                              { static_cast<CGFloat>(rPosAry.mnDestWidth), static_cast<CGFloat>(rPosAry.mnDestHeight) } };
     CGContextDrawImage( mrContext, aDstRect, xMaskedImage );
     CGImageRelease( xMaskedImage );
     RefreshRect( aDstRect );
@@ -672,24 +685,22 @@ void AquaSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
     Rectangle aRefreshRect( nX1, nY1, nX2, nY2 );
 }
 
-void AquaSalGraphics::drawMask( const SalTwoRect* pPosAry,
-                                const SalBitmap& rSalBitmap,
-                                SalColor nMaskColor )
+void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap, SalColor nMaskColor )
 {
     if( !CheckContext() )
     {
         return;
     }
     const QuartzSalBitmap& rBitmap = static_cast<const QuartzSalBitmap&>(rSalBitmap);
-    CGImageRef xImage = rBitmap.CreateColorMask( pPosAry->mnSrcX, pPosAry->mnSrcY,
-                                                 pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
+    CGImageRef xImage = rBitmap.CreateColorMask( rPosAry.mnSrcX, rPosAry.mnSrcY,
+                                                 rPosAry.mnSrcWidth, rPosAry.mnSrcHeight,
                                                  nMaskColor );
     if( !xImage )
     {
         return;
     }
-    const CGRect aDstRect = { { static_cast<CGFloat>(pPosAry->mnDestX), static_cast<CGFloat>(pPosAry->mnDestY) },
-                              { static_cast<CGFloat>(pPosAry->mnDestWidth), static_cast<CGFloat>(pPosAry->mnDestHeight) } };
+    const CGRect aDstRect = { { static_cast<CGFloat>(rPosAry.mnDestX), static_cast<CGFloat>(rPosAry.mnDestY) },
+                              { static_cast<CGFloat>(rPosAry.mnDestWidth), static_cast<CGFloat>(rPosAry.mnDestHeight) } };
     CGContextDrawImage( mrContext, aDstRect, xImage );
     CGImageRelease( xImage );
     RefreshRect( aDstRect );
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index b84ed32..a62b271 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -496,7 +496,7 @@ sal_Bool GenPspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, v
     return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize );
 }
 
-void GenPspGraphics::copyBits( const SalTwoRect*,
+void GenPspGraphics::copyBits( const SalTwoRect&,
                             SalGraphics* )
 {
     OSL_FAIL( "Error: PrinterGfx::CopyBits() not implemented" );
@@ -507,12 +507,12 @@ void GenPspGraphics::copyArea ( long,long,long,long,long,long,sal_uInt16 )
     OSL_FAIL( "Error: PrinterGfx::CopyArea() not implemented" );
 }
 
-void GenPspGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap )
+void GenPspGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap )
 {
-    Rectangle aSrc (Point(pPosAry->mnSrcX, pPosAry->mnSrcY),
-                    Size(pPosAry->mnSrcWidth, pPosAry->mnSrcHeight));
-    Rectangle aDst (Point(pPosAry->mnDestX, pPosAry->mnDestY),
-                    Size(pPosAry->mnDestWidth, pPosAry->mnDestHeight));
+    Rectangle aSrc (Point(rPosAry.mnSrcX, rPosAry.mnSrcY),
+                    Size(rPosAry.mnSrcWidth, rPosAry.mnSrcHeight));
+    Rectangle aDst (Point(rPosAry.mnDestX, rPosAry.mnDestY),
+                    Size(rPosAry.mnDestWidth, rPosAry.mnDestHeight));
 
     BitmapBuffer* pBuffer= const_cast<SalBitmap&>(rSalBitmap).AcquireBuffer(sal_True);
 
@@ -522,21 +522,21 @@ void GenPspGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSa
     const_cast<SalBitmap&>(rSalBitmap).ReleaseBuffer (pBuffer, sal_True);
 }
 
-void GenPspGraphics::drawBitmap( const SalTwoRect*,
+void GenPspGraphics::drawBitmap( const SalTwoRect&,
                               const SalBitmap&,
                               const SalBitmap& )
 {
     OSL_FAIL("Error: no PrinterGfx::DrawBitmap() for transparent bitmap");
 }
 
-void GenPspGraphics::drawBitmap( const SalTwoRect*,
+void GenPspGraphics::drawBitmap( const SalTwoRect&,
                               const SalBitmap&,
                               SalColor )
 {
     OSL_FAIL("Error: no PrinterGfx::DrawBitmap() for transparent color");
 }
 
-void GenPspGraphics::drawMask( const SalTwoRect*,
+void GenPspGraphics::drawMask( const SalTwoRect&,
                             const SalBitmap &,
                             SalColor )
 {
@@ -1338,6 +1338,19 @@ bool GenPspGraphics::drawAlphaBitmap( const SalTwoRect&,
     return false;
 }
 
+bool GenPspGraphics::drawTransformedBitmap(
+    const basegfx::B2DPoint& rNull,
+    const basegfx::B2DPoint& rX,
+    const basegfx::B2DPoint& rY,
+    const SalBitmap& rSourceBitmap,
+    const SalBitmap* pAlphaBitmap)
+{
+    // here direct support for transformed bitmaps can be impemented
+    (void)rNull; (void)rX; (void)rY; (void)rSourceBitmap; (void)pAlphaBitmap;
+    return false;
+}
+
+
 bool GenPspGraphics::drawAlphaRect( long, long, long, long, sal_uInt8 )
 {
     return false;
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index e193ec2..c7d75a0 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -68,6 +68,18 @@ bool SvpSalGraphics::drawAlphaBitmap( const SalTwoRect&, const SalBitmap& /*rSou
     return false;
 }
 
+bool SvpSalGraphics::drawTransformedBitmap(
+    const basegfx::B2DPoint& rNull,
+    const basegfx::B2DPoint& rX,
+    const basegfx::B2DPoint& rY,
+    const SalBitmap& rSourceBitmap,
+    const SalBitmap* pAlphaBitmap)
+{
+    // here direct support for transformed bitmaps can be impemented
+    (void)rNull; (void)rX; (void)rY; (void)rSourceBitmap; (void)pAlphaBitmap;
+    return false;
+}
+
 bool SvpSalGraphics::drawAlphaRect( long /*nX*/, long /*nY*/, long /*nWidth*/, long /*nHeight*/, sal_uInt8 /*nTransparency*/ )
 {
     // TODO(P3) implement alpha blending
@@ -554,7 +566,7 @@ void SvpSalGraphics::copyArea( long nDestX,
     dbgOut( m_aDevice );
 }
 
-void SvpSalGraphics::copyBits( const SalTwoRect* pPosAry,
+void SvpSalGraphics::copyBits( const SalTwoRect& rPosAry,
                                SalGraphics*      pSrcGraphics )
 {
     if( !m_aDevice.get() )
@@ -562,12 +574,12 @@ void SvpSalGraphics::copyBits( const SalTwoRect* pPosAry,
 
     SvpSalGraphics* pSrc = pSrcGraphics ?
         static_cast<SvpSalGraphics*>(pSrcGraphics) : this;
-    basegfx::B2IBox aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
-                     pPosAry->mnSrcX+pPosAry->mnSrcWidth,
-                     pPosAry->mnSrcY+pPosAry->mnSrcHeight );
-    basegfx::B2IBox aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
-                      pPosAry->mnDestX+pPosAry->mnDestWidth,
-                      pPosAry->mnDestY+pPosAry->mnDestHeight );
+    basegfx::B2IBox aSrcRect( rPosAry.mnSrcX, rPosAry.mnSrcY,
+                     rPosAry.mnSrcX+rPosAry.mnSrcWidth,
+                     rPosAry.mnSrcY+rPosAry.mnSrcHeight );
+    basegfx::B2IBox aDestRect( rPosAry.mnDestX, rPosAry.mnDestY,
+                      rPosAry.mnDestX+rPosAry.mnDestWidth,
+                      rPosAry.mnDestY+rPosAry.mnDestHeight );
 
     SvpSalGraphics::ClipUndoHandle aUndo( this );
     if( !isClippedSetup( aDestRect, aUndo ) )
@@ -575,16 +587,16 @@ void SvpSalGraphics::copyBits( const SalTwoRect* pPosAry,
     dbgOut( m_aDevice );
 }
 
-void SvpSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
+void SvpSalGraphics::drawBitmap( const SalTwoRect& rPosAry,
                                  const SalBitmap& rSalBitmap )
 {
     const SvpSalBitmap& rSrc = static_cast<const SvpSalBitmap&>(rSalBitmap);
-    basegfx::B2IBox aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
-                     pPosAry->mnSrcX+pPosAry->mnSrcWidth,
-                     pPosAry->mnSrcY+pPosAry->mnSrcHeight );
-    basegfx::B2IBox aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
-                      pPosAry->mnDestX+pPosAry->mnDestWidth,
-                      pPosAry->mnDestY+pPosAry->mnDestHeight );
+    basegfx::B2IBox aSrcRect( rPosAry.mnSrcX, rPosAry.mnSrcY,
+                     rPosAry.mnSrcX+rPosAry.mnSrcWidth,
+                     rPosAry.mnSrcY+rPosAry.mnSrcHeight );
+    basegfx::B2IBox aDestRect( rPosAry.mnDestX, rPosAry.mnDestY,
+                      rPosAry.mnDestX+rPosAry.mnDestWidth,
+                      rPosAry.mnDestY+rPosAry.mnDestHeight );
 
     SvpSalGraphics::ClipUndoHandle aUndo( this );
     if( !isClippedSetup( aDestRect, aUndo ) )
@@ -592,25 +604,25 @@ void SvpSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
     dbgOut( m_aDevice );
 }
 
-void SvpSalGraphics::drawBitmap( const SalTwoRect*,
+void SvpSalGraphics::drawBitmap( const SalTwoRect&,
                                  const SalBitmap&,
                                  SalColor )
 {
     // SNI, as in X11 plugin
 }
 
-void SvpSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
+void SvpSalGraphics::drawBitmap( const SalTwoRect& rPosAry,
                                  const SalBitmap& rSalBitmap,
                                  const SalBitmap& rTransparentBitmap )
 {
     const SvpSalBitmap& rSrc = static_cast<const SvpSalBitmap&>(rSalBitmap);
     const SvpSalBitmap& rSrcTrans = static_cast<const SvpSalBitmap&>(rTransparentBitmap);
-    basegfx::B2IBox aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
-                     pPosAry->mnSrcX+pPosAry->mnSrcWidth,
-                     pPosAry->mnSrcY+pPosAry->mnSrcHeight );
-    basegfx::B2IBox aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
-                      pPosAry->mnDestX+pPosAry->mnDestWidth,
-                      pPosAry->mnDestY+pPosAry->mnDestHeight );
+    basegfx::B2IBox aSrcRect( rPosAry.mnSrcX, rPosAry.mnSrcY,
+                     rPosAry.mnSrcX+rPosAry.mnSrcWidth,
+                     rPosAry.mnSrcY+rPosAry.mnSrcHeight );
+    basegfx::B2IBox aDestRect( rPosAry.mnDestX, rPosAry.mnDestY,
+                      rPosAry.mnDestX+rPosAry.mnDestWidth,
+                      rPosAry.mnDestY+rPosAry.mnDestHeight );
     SvpSalGraphics::ClipUndoHandle aUndo( this );
     if( !isClippedSetup( aDestRect, aUndo ) )
         m_aDevice->drawMaskedBitmap( rSrc.getBitmap(), rSrcTrans.getBitmap(),
@@ -618,21 +630,21 @@ void SvpSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
     dbgOut( m_aDevice );
 }
 
-void SvpSalGraphics::drawMask( const SalTwoRect* pPosAry,
+void SvpSalGraphics::drawMask( const SalTwoRect& rPosAry,
                                const SalBitmap& rSalBitmap,
                                SalColor nMaskColor )
 {
     const SvpSalBitmap& rSrc = static_cast<const SvpSalBitmap&>(rSalBitmap);
-    basegfx::B2IBox aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
-                     pPosAry->mnSrcX+pPosAry->mnSrcWidth,
-                     pPosAry->mnSrcY+pPosAry->mnSrcHeight );
-    basegfx::B2IPoint aDestPoint( pPosAry->mnDestX, pPosAry->mnDestY );
+    basegfx::B2IBox aSrcRect( rPosAry.mnSrcX, rPosAry.mnSrcY,
+                     rPosAry.mnSrcX+rPosAry.mnSrcWidth,
+                     rPosAry.mnSrcY+rPosAry.mnSrcHeight );
+    basegfx::B2IPoint aDestPoint( rPosAry.mnDestX, rPosAry.mnDestY );
 
     // BitmapDevice::drawMaskedColor works with 0==transparent,
     // 255==opaque. drawMask() semantic is the other way
     // around. Therefore, invert mask.
     basebmp::BitmapDeviceSharedPtr aCopy =
-        cloneBitmapDevice( basegfx::B2IVector( pPosAry->mnSrcWidth, pPosAry->mnSrcHeight ),
+        cloneBitmapDevice( basegfx::B2IVector( rPosAry.mnSrcWidth, rPosAry.mnSrcHeight ),
                            rSrc.getBitmap() );
     basebmp::Color aBgColor( COL_WHITE );
     aCopy->clear(aBgColor);
@@ -640,7 +652,7 @@ void SvpSalGraphics::drawMask( const SalTwoRect* pPosAry,
     aCopy->drawMaskedColor( aFgColor, rSrc.getBitmap(), aSrcRect, basegfx::B2IPoint() );
 
     basebmp::Color aColor( nMaskColor );
-    basegfx::B2IBox aSrcRect2( 0, 0, pPosAry->mnSrcWidth, pPosAry->mnSrcHeight );
+    basegfx::B2IBox aSrcRect2( 0, 0, rPosAry.mnSrcWidth, rPosAry.mnSrcHeight );
     const basegfx::B2IBox aClipRect( aDestPoint, basegfx::B2ITuple( aSrcRect.getWidth(), aSrcRect.getHeight() ) );
 
     SvpSalGraphics::ClipUndoHandle aUndo( this );
diff --git a/vcl/inc/aqua/atsui/salgdi.h b/vcl/inc/aqua/atsui/salgdi.h
index 2591521..567d90c 100644
--- a/vcl/inc/aqua/atsui/salgdi.h
+++ b/vcl/inc/aqua/atsui/salgdi.h
@@ -185,15 +185,15 @@ public:
 
     // CopyBits and DrawBitmap --> RasterOp and ClipRegion
     // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
-    virtual void        copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics );
-    virtual void        drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap );
-    virtual void        drawBitmap( const SalTwoRect* pPosAry,
+    virtual void        copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics );
+    virtual void        drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap );
+    virtual void        drawBitmap( const SalTwoRect& rPosAry,
                                     const SalBitmap& rSalBitmap,
                                     SalColor nTransparentColor );
-    virtual void        drawBitmap( const SalTwoRect* pPosAry,
+    virtual void        drawBitmap( const SalTwoRect& rPosAry,
                                     const SalBitmap& rSalBitmap,
                                     const SalBitmap& rTransparentBitmap );
-    virtual void        drawMask( const SalTwoRect* pPosAry,
+    virtual void        drawMask( const SalTwoRect& rPosAry,
                                   const SalBitmap& rSalBitmap,
                                   SalColor nMaskColor );
 
@@ -209,6 +209,12 @@ public:
     virtual bool            drawAlphaBitmap( const SalTwoRect&,
                                              const SalBitmap& rSourceBitmap,
                                              const SalBitmap& rAlphaBitmap );
+    virtual bool drawTransformedBitmap(
+        const basegfx::B2DPoint& rNull,
+        const basegfx::B2DPoint& rX,
+        const basegfx::B2DPoint& rY,
+        const SalBitmap& rSourceBitmap,
+        const SalBitmap* pAlphaBitmap);
 
     virtual bool            drawAlphaRect( long nX, long nY, long nWidth,
                                            long nHeight, sal_uInt8 nTransparency );
diff --git a/vcl/inc/coretext/salgdi2.h b/vcl/inc/coretext/salgdi2.h
index 01cf18a..77ed739 100644
--- a/vcl/inc/coretext/salgdi2.h
+++ b/vcl/inc/coretext/salgdi2.h
@@ -242,15 +242,15 @@ public:
 
     // CopyBits and DrawBitmap --> RasterOp and ClipRegion
     // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
-    virtual void        copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics );
-    virtual void        drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap );
-    virtual void        drawBitmap( const SalTwoRect* pPosAry,
+    virtual void        copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics );
+    virtual void        drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap );
+    virtual void        drawBitmap( const SalTwoRect& rPosAry,
                                     const SalBitmap& rSalBitmap,
                                     SalColor nTransparentColor );
-    virtual void        drawBitmap( const SalTwoRect* pPosAry,
+    virtual void        drawBitmap( const SalTwoRect& rPosAry,
                                     const SalBitmap& rSalBitmap,
                                     const SalBitmap& rTransparentBitmap );
-    virtual void        drawMask( const SalTwoRect* pPosAry,
+    virtual void        drawMask( const SalTwoRect& rPosAry,
                                   const SalBitmap& rSalBitmap,
                                   SalColor nMaskColor );
 
@@ -267,6 +267,13 @@ public:
                                              const SalBitmap& rSourceBitmap,
                                              const SalBitmap& rAlphaBitmap );
 
+    bool drawTransformedBitmap(
+        const basegfx::B2DPoint& rNull,
+        const basegfx::B2DPoint& rX,
+        const basegfx::B2DPoint& rY,
+        const SalBitmap& rSourceBitmap,
+        const SalBitmap* pAlphaBitmap);
+
     virtual bool            drawAlphaRect( long nX, long nY, long nWidth,
                                            long nHeight, sal_uInt8 nTransparency );
 
diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h
index 4a1d8a0..07bdb01 100644
--- a/vcl/inc/generic/genpspgraphics.h
+++ b/vcl/inc/generic/genpspgraphics.h
@@ -156,17 +156,17 @@ public:
                                       long nSrcWidth,
                                       long nSrcHeight,
                                       sal_uInt16 nFlags );
-    virtual void            copyBits( const SalTwoRect* pPosAry,
+    virtual void            copyBits( const SalTwoRect& rPosAry,
                                       SalGraphics* pSrcGraphics );
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
+    virtual void            drawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap );
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
+    virtual void            drawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap,
                                         SalColor nTransparentColor );
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
+    virtual void            drawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap,
                                         const SalBitmap& rTransparentBitmap );
-    virtual void            drawMask( const SalTwoRect* pPosAry,
+    virtual void            drawMask( const SalTwoRect& rPosAry,
                                       const SalBitmap& rSalBitmap,
                                       SalColor nMaskColor );
     virtual SalBitmap*      getBitmap( long nX, long nY, long nWidth, long nHeight );
@@ -180,6 +180,12 @@ public:
     virtual bool            drawAlphaBitmap( const SalTwoRect&,
                                              const SalBitmap& rSourceBitmap,
                                              const SalBitmap& rAlphaBitmap );
+    virtual bool drawTransformedBitmap(
+        const basegfx::B2DPoint& rNull,
+        const basegfx::B2DPoint& rX,
+        const basegfx::B2DPoint& rY,
+        const SalBitmap& rSourceBitmap,
+        const SalBitmap* pAlphaBitmap);
     virtual bool            drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency );
 
     virtual SystemGraphicsData GetGraphicsData() const;
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 2757899..c0fdb4e 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -98,6 +98,12 @@ protected:
 #endif
 
     virtual bool drawAlphaBitmap( const SalTwoRect&, const SalBitmap& rSourceBitmap, const SalBitmap& rAlphaBitmap );
+    virtual bool drawTransformedBitmap(
+        const basegfx::B2DPoint& rNull,
+        const basegfx::B2DPoint& rX,
+        const basegfx::B2DPoint& rY,
+        const SalBitmap& rSourceBitmap,
+        const SalBitmap* pAlphaBitmap);
     virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency );
 
 public:
@@ -190,17 +196,17 @@ public:
                                       long nSrcWidth,
                                       long nSrcHeight,
                                       sal_uInt16 nFlags );
-    virtual void            copyBits( const SalTwoRect* pPosAry,
+    virtual void            copyBits( const SalTwoRect& rPosAry,
                                       SalGraphics* pSrcGraphics );
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
+    virtual void            drawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap );
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
+    virtual void            drawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap,
                                         SalColor nTransparentColor );
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
+    virtual void            drawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap,
                                         const SalBitmap& rTransparentBitmap );
-    virtual void            drawMask( const SalTwoRect* pPosAry,
+    virtual void            drawMask( const SalTwoRect& rPosAry,
                                       const SalBitmap& rSalBitmap,
                                       SalColor nMaskColor );
     virtual SalBitmap*      getBitmap( long nX, long nY, long nWidth, long nHeight );
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 3422dce..093e923 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -85,8 +85,9 @@ class VCL_PLUGIN_PUBLIC SalGraphics
     int                     m_nLayout; // 0: mirroring off, 1: mirror x-axis
 
 protected:
+    /// bitfield
     // flags which hold the SetAntialiasing() value from OutputDevice
-    bool                    m_bAntiAliasB2DDraw;
+    bool                    m_bAntiAliasB2DDraw : 1;
 
 public:
     void                    setAntiAliasB2DDraw(bool bNew) { m_bAntiAliasB2DDraw = bNew; }
@@ -122,20 +123,20 @@ protected:
 
     // CopyBits and DrawBitmap --> RasterOp and ClipRegion
     // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
-    virtual void            copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ) = 0;
-    virtual void            drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) = 0;
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
-                                        const SalBitmap& rSalBitmap,
-                                        SalColor nTransparentColor ) = 0;
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
-                                        const SalBitmap& rSalBitmap,
-                                        const SalBitmap& rMaskBitmap ) = 0;
-    virtual void            drawMask( const SalTwoRect* pPosAry,
-                                      const SalBitmap& rSalBitmap,
-                                      SalColor nMaskColor ) = 0;
-
-    virtual SalBitmap*      getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0;
-    virtual SalColor        getPixel( long nX, long nY ) = 0;
+    virtual void        copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) = 0;
+    virtual void        drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) = 0;
+    virtual void        drawBitmap( const SalTwoRect& rPosAry,
+                                    const SalBitmap& rSalBitmap,
+                                    SalColor nTransparentColor ) = 0;
+    virtual void        drawBitmap( const SalTwoRect& rPosAry,
+                                    const SalBitmap& rSalBitmap,
+                                    const SalBitmap& rMaskBitmap ) = 0;
+    virtual void        drawMask( const SalTwoRect& rPosAry,
+                                  const SalBitmap& rSalBitmap,
+                                  SalColor nMaskColor ) = 0;
+
+    virtual SalBitmap*  getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0;
+    virtual SalColor    getPixel( long nX, long nY ) = 0;
 
     // invert --> ClipRegion (only Windows or VirDevs)
     virtual void            invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) = 0;
@@ -165,9 +166,18 @@ protected:
         otherwise. In this case, clients should try to emulate alpha
         compositing themselves
      */
-    virtual bool            drawAlphaBitmap( const SalTwoRect&,
-                                             const SalBitmap& rSourceBitmap,
-                                             const SalBitmap& rAlphaBitmap ) = 0;
+    virtual bool        drawAlphaBitmap( const SalTwoRect&,
+                                         const SalBitmap& rSourceBitmap,
+                                         const SalBitmap& rAlphaBitmap ) = 0;
+
+    /** draw transformed bitmap (maybe with alpha) where Null, X, Y define the coordinate system */
+    virtual bool drawTransformedBitmap(
+        const basegfx::B2DPoint& rNull,
+        const basegfx::B2DPoint& rX,
+        const basegfx::B2DPoint& rY,
+        const SalBitmap& rSourceBitmap,
+        const SalBitmap* pAlphaBitmap) = 0;
+
     /** Render solid rectangle with given transparency
 
         @param nTransparency
@@ -408,19 +418,19 @@ public:
 
     // CopyBits and DrawBitmap --> RasterOp and ClipRegion
     // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
-    void                    CopyBits( const SalTwoRect* pPosAry,
+    void                    CopyBits( const SalTwoRect& rPosAry,
                                       SalGraphics* pSrcGraphics,
                                       const OutputDevice *pOutDev,
                                       const OutputDevice *pSrcOutDev );
-    void                    DrawBitmap( const SalTwoRect* pPosAry,
+    void                    DrawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap,
                                         const OutputDevice *pOutDev );
-    void                    DrawBitmap( const SalTwoRect* pPosAry,
+    void                    DrawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap,
                                         const SalBitmap& rTransparentBitmap,
                                         const OutputDevice *pOutDev );
 
-    void                    DrawMask( const SalTwoRect* pPosAry,
+    void                    DrawMask( const SalTwoRect& rPosAry,
                                       const SalBitmap& rSalBitmap,
                                       SalColor nMaskColor,
                                       const OutputDevice *pOutDev );
@@ -487,6 +497,14 @@ public:
                                              const SalBitmap& rAlphaBitmap,
                                              const OutputDevice *pOutDev );
 
+    bool DrawTransformedBitmap(
+        const basegfx::B2DPoint& rNull,
+        const basegfx::B2DPoint& rX,
+        const basegfx::B2DPoint& rY,
+        const SalBitmap& rSourceBitmap,
+        const SalBitmap* pAlphaBitmap,
+        const OutputDevice* pOutDev );
+
     bool                    DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
                                            sal_uInt8 nTransparency, const OutputDevice *pOutDev );
 
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index d41713a..6c9fea6 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -147,7 +147,7 @@ public:
     // a control is painted; but presentation effects need
     // the background set to None; workaround: set the background
     // before copyBits
-    virtual void            copyBits( const SalTwoRect* pPosAry,
+    virtual void            copyBits( const SalTwoRect& rPosAry,
                                       SalGraphics* pSrcGraphics );
 
 protected:
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 3a20ff6..583651f 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -163,7 +163,7 @@ protected:
     inline  GC              GetStippleGC();
 
     using SalGraphics::DrawBitmap;
-    void            DrawBitmap( const SalTwoRect *pPosAry,
+    void            DrawBitmap( const SalTwoRect& rPosAry,
                                 SalGraphics      *pThis,
                                 const SalBitmap  &rSalBitmap,
                                 const SalBitmap  &rTransparentBitmap,
@@ -172,7 +172,7 @@ protected:
     GC                      GetFontGC();
     bool                    setFont( const FontSelectPattern* pEntry, int nFallbackLevel );
 
-    void                    drawMaskedBitmap( const SalTwoRect* pPosAry,
+    void                    drawMaskedBitmap( const SalTwoRect& rPosAry,
                                               const SalBitmap& rSalBitmap,
                                               const SalBitmap& rTransparentBitmap );
 
@@ -298,17 +298,17 @@ public:
                                       long nSrcWidth,
                                       long nSrcHeight,
                                       sal_uInt16 nFlags );
-    virtual void            copyBits( const SalTwoRect* pPosAry,
+    virtual void            copyBits( const SalTwoRect& rPosAry,
                                       SalGraphics* pSrcGraphics );
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
+    virtual void            drawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap );
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
+    virtual void            drawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap,
                                         SalColor nTransparentColor );
-    virtual void            drawBitmap( const SalTwoRect* pPosAry,
+    virtual void            drawBitmap( const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap,
                                         const SalBitmap& rMaskBitmap );
-    virtual void            drawMask( const SalTwoRect* pPosAry,
+    virtual void            drawMask( const SalTwoRect& rPosAry,
                                       const SalBitmap& rSalBitmap,
                                       SalColor nMaskColor );
     virtual SalBitmap*      getBitmap( long nX, long nY, long nWidth, long nHeight );
@@ -321,6 +321,12 @@ public:
     virtual bool            drawAlphaBitmap( const SalTwoRect&,
                                              const SalBitmap& rSourceBitmap,
                                              const SalBitmap& rAlphaBitmap );
+    virtual bool drawTransformedBitmap(
+        const basegfx::B2DPoint& rNull,
+        const basegfx::B2DPoint& rX,
+        const basegfx::B2DPoint& rY,
+        const SalBitmap& rSourceBitmap,
+        const SalBitmap* pAlphaBitmap);
 
     virtual bool            drawAlphaRect( long nX, long nY, long nWidth,
                                            long nHeight, sal_uInt8 nTransparency );
diff --git a/vcl/inc/win/salbmp.h b/vcl/inc/win/salbmp.h
index 59ae69c..4a9d721 100644
--- a/vcl/inc/win/salbmp.h
+++ b/vcl/inc/win/salbmp.h
@@ -23,6 +23,7 @@
 #include <tools/gen.hxx>
 #include <win/wincomp.hxx>
 #include <salbmp.hxx>
+#include <boost/shared_ptr.hpp>
 
 // --------------
 // - SalBitmap  -
@@ -32,24 +33,38 @@ struct  BitmapBuffer;
 class   BitmapColor;
 class   BitmapPalette;
 class   SalGraphics;
+namespace Gdiplus { class Bitmap; }
+typedef boost::shared_ptr< Gdiplus::Bitmap > GdiPlusBmpPtr;
 
 class WinSalBitmap : public SalBitmap
 {
 private:
+    friend class GdiPlusBuffer; // allow buffer to remove maGdiPlusBitmap eventually
 
     Size                maSize;
     HGLOBAL             mhDIB;
     HBITMAP             mhDDB;
-    sal_uInt16              mnBitCount;
+
+    // the buffered evtl. used Gdiplus::Bitmap instance. It is managed by
+    // GdiPlusBuffer. To make this safe, it is only handed out as shared
+    // pointer; the GdiPlusBuffer may delete the local instance
+    GdiPlusBmpPtr       maGdiPlusBitmap;
+
+    sal_uInt16          mnBitCount;
+
+    Gdiplus::Bitmap* ImplCreateGdiPlusBitmap(const WinSalBitmap& rAlphaSource);
+    Gdiplus::Bitmap* ImplCreateGdiPlusBitmap();
 
 public:
 
     HGLOBAL             ImplGethDIB() const { return mhDIB; }
     HBITMAP             ImplGethDDB() const { return mhDDB; }
 
+    GdiPlusBmpPtr ImplGetGdiPlusBitmap(const WinSalBitmap* pAlphaSource = 0) const;
+
     static HGLOBAL      ImplCreateDIB( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal );
     static HANDLE       ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB );
-    static sal_uInt16       ImplGetDIBColorCount( HGLOBAL hDIB );
+    static sal_uInt16   ImplGetDIBColorCount( HGLOBAL hDIB );
     static void         ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
                                              const Size& rSizePixel, bool bRLE4 );
 
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 31a04dc..f9fd488 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -140,8 +140,14 @@ public:
 
 class WinSalGraphics : public SalGraphics
 {
+private:
+    HDC                     mhLocalDC;              // HDC
+
+public:
+    HDC getHDC() const { return mhLocalDC; }
+    void setHDC(HDC aNew) { mhLocalDC = aNew; }
+
 public:
-    HDC                     mhDC;               // HDC
     HWND                    mhWnd;              // Window-Handle, when Window-Graphics
     HFONT                   mhFonts[ MAX_FALLBACK ];        // Font + Fallbacks
     const ImplWinFontData*  mpWinFontData[ MAX_FALLBACK ];  // pointer to the most recent font face
@@ -168,15 +174,17 @@ public:
     KERNINGPAIR*            mpFontKernPairs;    // Kerning Pairs of the current Font
     sal_uIntPtr                 mnFontKernPairCount;// Number of Kerning Pairs of the current Font
     int                     mnPenWidth;         // Linienbreite
-    sal_Bool                    mbStockPen;         // is Pen a stockpen
-    sal_Bool                    mbStockBrush;       // is Brush a stcokbrush
-    sal_Bool                    mbPen;              // is Pen (FALSE == NULL_PEN)
-    sal_Bool                    mbBrush;            // is Brush (FALSE == NULL_BRUSH)
-    sal_Bool                    mbPrinter;          // is Printer
-    sal_Bool                    mbVirDev;           // is VirDev
-    sal_Bool                    mbWindow;           // is Window
-    sal_Bool                    mbScreen;           // is Screen compatible
-    bool                    mbXORMode;          // _every_ output with RasterOp XOR
+
+    /// bitfield
+    bool                    mbStockPen : 1;         // is Pen a stockpen
+    bool                    mbStockBrush : 1;       // is Brush a stcokbrush
+    bool                    mbPen : 1;              // is Pen (FALSE == NULL_PEN)
+    bool                    mbBrush : 1;            // is Brush (FALSE == NULL_BRUSH)
+    bool                    mbPrinter : 1;          // is Printer
+    bool                    mbVirDev : 1;           // is VirDev
+    bool                    mbWindow : 1;           // is Window
+    bool                    mbScreen : 1;           // is Screen compatible
+    bool                    mbXORMode : 1;          // _every_ output with RasterOp XOR
 
     // remember RGB values for SetLineColor/SetFillColor
     SalColor                maLineColor;
@@ -215,15 +223,15 @@ protected:
 
     // CopyBits and DrawBitmap --> RasterOp and ClipRegion
     // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
-    virtual void        copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics );
-    virtual void        drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap );
-    virtual void        drawBitmap( const SalTwoRect* pPosAry,
+    virtual void        copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics );
+    virtual void        drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap );
+    virtual void        drawBitmap( const SalTwoRect& rPosAry,
                                     const SalBitmap& rSalBitmap,
                                     SalColor nTransparentColor );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list