drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx |    2 
 drawinglayer/source/primitive2d/patternfillprimitive2d.cxx   |   16 ++--
 drawinglayer/source/primitive2d/softedgeprimitive2d.cxx      |    2 
 drawinglayer/source/processor2d/cairopixelprocessor2d.cxx    |   44 +++--------
 drawinglayer/source/processor2d/processor2dtools.cxx         |    6 -
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx   |    4 -
 drawinglayer/source/tools/converters.cxx                     |   14 +--
 include/drawinglayer/converters.hxx                          |    2 
 include/drawinglayer/processor2d/cairopixelprocessor2d.hxx   |    4 -
 include/drawinglayer/processor2d/processor2dtools.hxx        |    4 -
 svgio/source/svgreader/svgfeblendnode.cxx                    |   24 +++---
 svgio/source/svgreader/svgfecompositenode.cxx                |   33 ++++----
 12 files changed, 67 insertions(+), 88 deletions(-)

New commits:
commit f3522ba36c867f4eb69fabcf293419f1d69caffa
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Aug 14 14:17:46 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Aug 14 18:06:26 2025 +0200

    use Bitmap in extractBitmapFromBaseProcessor2D
    
    now that Bitmap supports transparency
    
    Change-Id: Ia4e15cfee6b4d223d3fd4324c6c8f7a9186cd4ed
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189597
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx 
b/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx
index 390a14e4dc20..7151f4ec7bb4 100644
--- a/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx
@@ -1127,10 +1127,10 @@ CairoPixelProcessor2D::~CairoPixelProcessor2D()
         cairo_surface_destroy(mpOwnedSurface);
 }
 
-BitmapEx CairoPixelProcessor2D::extractBitmapEx() const
+Bitmap CairoPixelProcessor2D::extractBitmap() const
 {
     // default is empty BitmapEx
-    BitmapEx aRetval;
+    Bitmap aRetval;
 
     if (nullptr == mpRT)
         // no RenderContext, not valid
@@ -1165,20 +1165,9 @@ BitmapEx CairoPixelProcessor2D::extractBitmapEx() const
 
     // prepare VCL/Bitmap stuff
     const Size aBitmapSize(nWidth, nHeight);
-    Bitmap aBitmap(aBitmapSize, vcl::PixelFormat::N24_BPP);
-    BitmapWriteAccess aAccess(aBitmap);
-
-    // prepare VCL/AlphaMask stuff
     const bool bHasAlpha(CAIRO_FORMAT_ARGB32 == aFormat);
-    std::optional<AlphaMask> aAlphaMask;
-    // NOTE: Tried to use std::optional for pAlphaWrite but
-    // BitmapWriteAccess does not have all needed operators
-    BitmapWriteAccess* pAlphaWrite(nullptr);
-    if (bHasAlpha)
-    {
-        aAlphaMask = AlphaMask(aBitmapSize);
-        pAlphaWrite = new BitmapWriteAccess(*aAlphaMask);
-    }
+    Bitmap aBitmap(aBitmapSize, bHasAlpha ? vcl::PixelFormat::N32_BPP : 
vcl::PixelFormat::N24_BPP);
+    BitmapWriteAccess aAccess(aBitmap);
 
     // prepare cairo stuff
     const sal_uInt32 nStride(cairo_image_surface_get_stride(pReadSource));
@@ -1192,19 +1181,18 @@ BitmapEx CairoPixelProcessor2D::extractBitmapEx() const
         {
             // prepare scanline
             unsigned char* pPixelData(pStartPixelData + (nStride * y));
-            Scanline pWriteRGB = aAccess.GetScanline(y);
-            Scanline pWriteA = pAlphaWrite->GetScanline(y);
+            Scanline pWriteRGBA = aAccess.GetScanline(y);
 
             for (sal_uInt32 x(0); x < nWidth; ++x)
             {
                 // RGBA: Do not forget: it's pre-multiplied
                 sal_uInt8 nAlpha(pPixelData[SVP_CAIRO_ALPHA]);
                 aAccess.SetPixelOnData(
-                    pWriteRGB, x,
-                    
BitmapColor(vcl::bitmap::unpremultiply(pPixelData[SVP_CAIRO_RED], nAlpha),
-                                
vcl::bitmap::unpremultiply(pPixelData[SVP_CAIRO_GREEN], nAlpha),
-                                
vcl::bitmap::unpremultiply(pPixelData[SVP_CAIRO_BLUE], nAlpha)));
-                pAlphaWrite->SetPixelOnData(pWriteA, x, BitmapColor(nAlpha));
+                    pWriteRGBA, x,
+                    BitmapColor(
+                        ColorAlpha, 
vcl::bitmap::unpremultiply(pPixelData[SVP_CAIRO_RED], nAlpha),
+                        
vcl::bitmap::unpremultiply(pPixelData[SVP_CAIRO_GREEN], nAlpha),
+                        vcl::bitmap::unpremultiply(pPixelData[SVP_CAIRO_BLUE], 
nAlpha), nAlpha));
                 pPixelData += 4;
             }
         }
@@ -1228,16 +1216,8 @@ BitmapEx CairoPixelProcessor2D::extractBitmapEx() const
         }
     }
 
-    // cleanup optional BitmapWriteAccess pAlphaWrite
-    if (nullptr != pAlphaWrite)
-        delete pAlphaWrite;
-
-    if (bHasAlpha)
-        // construct and return BitmapEx
-        aRetval = BitmapEx(aBitmap, *aAlphaMask);
-    else
-        // reset BitmapEx to just Bitmap content
-        aRetval = aBitmap;
+    // construct and return Bitmap
+    aRetval = aBitmap;
 
     if (pReadSource != pSource)
     {
diff --git a/drawinglayer/source/processor2d/processor2dtools.cxx 
b/drawinglayer/source/processor2d/processor2dtools.cxx
index 6c38abc4039d..54f3840699e4 100644
--- a/drawinglayer/source/processor2d/processor2dtools.cxx
+++ b/drawinglayer/source/processor2d/processor2dtools.cxx
@@ -160,16 +160,16 @@ std::unique_ptr<BaseProcessor2D> 
createProcessor2DFromOutputDevice(
     }
 }
 
-BitmapEx extractBitmapExFromBaseProcessor2D(const 
std::unique_ptr<BaseProcessor2D>& rProcessor)
+Bitmap extractBitmapFromBaseProcessor2D(const 
std::unique_ptr<BaseProcessor2D>& rProcessor)
 {
-    BitmapEx aRetval;
+    Bitmap aRetval;
 
 #if USE_HEADLESS_CODE
     // currently only defined for cairo
     CairoPixelProcessor2D* 
pSource(dynamic_cast<CairoPixelProcessor2D*>(rProcessor.get()));
 
     if (nullptr != pSource)
-        aRetval = pSource->extractBitmapEx();
+        aRetval = pSource->extractBitmap();
 #endif
 
     // avoid unused parameter errors
diff --git a/drawinglayer/source/tools/converters.cxx 
b/drawinglayer/source/tools/converters.cxx
index 86bf0068d57b..45a7b422c23e 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -177,7 +177,7 @@ Bitmap 
convertToBitmap(drawinglayer::primitive2d::Primitive2DContainer&& rSeq,
         pRGBAProcessor->process(aSequence);
 
         // create final BitmapEx result (content)
-        const Bitmap 
aRetval(processor2d::extractBitmapExFromBaseProcessor2D(pRGBAProcessor));
+        const Bitmap 
aRetval(processor2d::extractBitmapFromBaseProcessor2D(pRGBAProcessor));
 
         // check if we have a result and return if so
         if (!aRetval.IsEmpty())
diff --git a/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx 
b/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx
index af3a1d63a710..418b4936ea68 100644
--- a/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx
+++ b/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx
@@ -263,8 +263,8 @@ public:
         maBColorModifierStack = rStack;
     }
 
-    // try to extract current content as BitmapEx
-    BitmapEx extractBitmapEx() const;
+    // try to extract current content as Bitmap
+    Bitmap extractBitmap() const;
 };
 }
 
diff --git a/include/drawinglayer/processor2d/processor2dtools.hxx 
b/include/drawinglayer/processor2d/processor2dtools.hxx
index 70df04249858..b8c72bdb40e4 100644
--- a/include/drawinglayer/processor2d/processor2dtools.hxx
+++ b/include/drawinglayer/processor2d/processor2dtools.hxx
@@ -87,7 +87,7 @@ namespace drawinglayer::processor2d
             const drawinglayer::geometry::ViewInformation2D& 
rViewInformation2D);
 
         /** extract the pixel data from a given BaseProcessor2D to
-            a BitmapEx. This may fail due to maybe system-dependent
+            a Bitmap. This may fail due to maybe system-dependent
 
             @param rProcessor
             A unique_ptr to a BaseProcessor2D from which to extract
@@ -95,7 +95,7 @@ namespace drawinglayer::processor2d
             @return
             a BitmapEx, may be empty, so check result
         */
-        DRAWINGLAYER_DLLPUBLIC BitmapEx 
extractBitmapExFromBaseProcessor2D(const std::unique_ptr<BaseProcessor2D>& 
rProcessor);
+        DRAWINGLAYER_DLLPUBLIC Bitmap extractBitmapFromBaseProcessor2D(const 
std::unique_ptr<BaseProcessor2D>& rProcessor);
 
 
 } // end of namespace drawinglayer::processor2d
commit cbd59a989770ce721395556f95218952f5fcbdd5
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Aug 14 13:44:04 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Aug 14 18:06:16 2025 +0200

    use Bitmap in drawinglayer::convertToBitmap
    
    now that Bitmap supports transparency
    
    Change-Id: Ib35d91c1742c2126bef878251eb0ea4de87d425d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189596
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx 
b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index bcb30cfcef90..d9ee4bc62683 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -144,7 +144,7 @@ namespace drawinglayer::unorenderer
                     primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef };
 
                     Bitmap aBitmap(
-                        convertToBitmapEx(
+                        convertToBitmap(
                             std::move(xEmbedSeq),
                             aViewInformation2D,
                             nDiscreteWidth,
diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx 
b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index 55d05a29f103..b3e98ecad072 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -132,23 +132,23 @@ namespace drawinglayer::primitive2d
                             Primitive2DContainer(getChildren()))
                 };
 
-                const BitmapEx aBitmapEx(
-                    convertToBitmapEx(
+                const Bitmap aBitmap(
+                    convertToBitmap(
                         std::move(xEmbedSeq),
                         aViewInformation2D,
                         mnDiscreteWidth,
                         mnDiscreteHeight,
                         mnDiscreteWidth * mnDiscreteHeight));
 
-                if(!aBitmapEx.IsEmpty())
+                if(!aBitmap.IsEmpty())
                 {
-                    const Size& rBmpPix = aBitmapEx.GetSizePixel();
+                    const Size aBmpPix = aBitmap.GetSizePixel();
 
-                    if(rBmpPix.Width() > 0 && rBmpPix.Height() > 0)
+                    if(aBmpPix.Width() > 0 && aBmpPix.Height() > 0)
                     {
                         const primitive2d::Primitive2DReference 
xEmbedRefBitmap(
                             new primitive2d::BitmapPrimitive2D(
-                                Bitmap(aBitmapEx),
+                                aBitmap,
                                 basegfx::B2DHomMatrix()));
                         aContent = primitive2d::Primitive2DContainer { 
xEmbedRefBitmap };
                     }
@@ -194,12 +194,12 @@ namespace drawinglayer::primitive2d
                         std::move(aContent)));
             primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef };
 
-            return convertToBitmapEx(
+            return BitmapEx(convertToBitmap(
                         std::move(xEmbedSeq),
                         aViewInformation2D,
                         nWidth,
                         nHeight,
-                        nWidth * nHeight);
+                        nWidth * nHeight));
         }
 
         Primitive2DReference 
PatternFillPrimitive2D::create2DDecomposition(const 
geometry::ViewInformation2D& rViewInformation) const
diff --git a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx 
b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
index 5d21d8df0fe6..7985f604c221 100644
--- a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
@@ -174,7 +174,7 @@ void SoftEdgePrimitive2D::create2DDecomposition(
         // drawinglayer::primitive2d::ProcessAndBlurAlphaMask() can be called.
         // Otherwise, blurring of edges will fail in cases like running in a
         // slideshow or exporting to PDF.
-        const BitmapEx aBitmapEx(::drawinglayer::convertToBitmapEx(
+        const BitmapEx aBitmapEx(::drawinglayer::convertToBitmap(
             std::move(xEmbedSeq), aViewInformation2D, nDiscreteClippedWidth, 
nDiscreteClippedHeight,
             nMaximumQuadraticPixels, true));
 
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 7f826a9b040c..7d654a3e419a 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -2714,7 +2714,7 @@ void 
VclMetafileProcessor2D::processTransparencePrimitive2D(
     // limitation to paint the content
     const auto aViewInformation2D(geometry::createViewInformation2D({}));
     const sal_uInt32 nMaximumQuadraticPixels(500000);
-    const BitmapEx aBitmapEx(convertToBitmapEx(
+    const Bitmap aBitmap(convertToBitmap(
         std::move(xEmbedSeq), aViewInformation2D, 
basegfx::fround(aDiscreteRange.getWidth()),
         basegfx::fround(aDiscreteRange.getHeight()), nMaximumQuadraticPixels));
 
@@ -2723,7 +2723,7 @@ void 
VclMetafileProcessor2D::processTransparencePrimitive2D(
                                        
basegfx::fround<tools::Long>(aLogicRange.getMinY())),
                                  
Size(basegfx::fround<tools::Long>(aLogicRange.getWidth()),
                                       
basegfx::fround<tools::Long>(aLogicRange.getHeight())),
-                                 aBitmapEx);
+                                 aBitmap);
 }
 
 void VclMetafileProcessor2D::processStructureTagPrimitive2D(
diff --git a/drawinglayer/source/tools/converters.cxx 
b/drawinglayer/source/tools/converters.cxx
index f9c7db07bad2..86bf0068d57b 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -152,7 +152,7 @@ AlphaMask 
createAlphaMask(drawinglayer::primitive2d::Primitive2DContainer&& rSeq
     return implcreateAlphaMask(aSequence, rViewInformation2D, aSizePixel, 
bUseLuminance);
 }
 
-BitmapEx convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&& 
rSeq,
+Bitmap convertToBitmap(drawinglayer::primitive2d::Primitive2DContainer&& rSeq,
                            const geometry::ViewInformation2D& 
rViewInformation2D,
                            sal_uInt32 nDiscreteWidth, sal_uInt32 
nDiscreteHeight,
                            sal_uInt32 nMaxSquarePixels, bool 
bForceAlphaMaskCreation)
@@ -161,7 +161,7 @@ BitmapEx 
convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&& rSe
 
     if (!implPrepareConversion(aSequence, nDiscreteWidth, nDiscreteHeight, 
nMaxSquarePixels))
     {
-        return BitmapEx();
+        return Bitmap();
     }
 
 #if USE_HEADLESS_CODE
@@ -177,7 +177,7 @@ BitmapEx 
convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&& rSe
         pRGBAProcessor->process(aSequence);
 
         // create final BitmapEx result (content)
-        const BitmapEx 
aRetval(processor2d::extractBitmapExFromBaseProcessor2D(pRGBAProcessor));
+        const Bitmap 
aRetval(processor2d::extractBitmapExFromBaseProcessor2D(pRGBAProcessor));
 
         // check if we have a result and return if so
         if (!aRetval.IsEmpty())
@@ -227,7 +227,7 @@ BitmapEx 
convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&& rSe
     {
         SAL_WARN("vcl", "Cannot set VirtualDevice to size : " << 
aSizePixel.Width() << "x"
                                                               << 
aSizePixel.Height());
-        return BitmapEx();
+        return Bitmap();
     }
 
     // We map to pixel, use that MapMode. Init by erasing.
@@ -303,10 +303,10 @@ BitmapEx 
convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&& rSe
             aAlpha.Invert();
         }
         // return combined result
-        return BitmapEx(aRetval, aAlpha);
+        return Bitmap(BitmapEx(aRetval, aAlpha));
     }
     else
-        return BitmapEx(aRetval);
+        return aRetval;
 }
 
 Bitmap convertPrimitive2DContainerToBitmap(primitive2d::Primitive2DContainer&& 
rSequence,
@@ -373,7 +373,7 @@ Bitmap 
convertPrimitive2DContainerToBitmap(primitive2d::Primitive2DContainer&& r
             new primitive2d::TransformPrimitive2D(aEmbedding, 
std::move(rSequence)));
         primitive2d::Primitive2DContainer xEmbedSeq{ xEmbedRef };
 
-        Bitmap aBitmap(convertToBitmapEx(std::move(xEmbedSeq), 
aViewInformation2D,
+        Bitmap aBitmap(convertToBitmap(std::move(xEmbedSeq), 
aViewInformation2D,
                                              nDiscreteWidth, nDiscreteHeight,
                                              nMaximumQuadraticPixels));
 
diff --git a/include/drawinglayer/converters.hxx 
b/include/drawinglayer/converters.hxx
index 9534157043b2..66d3ad27f0ee 100644
--- a/include/drawinglayer/converters.hxx
+++ b/include/drawinglayer/converters.hxx
@@ -38,7 +38,7 @@ AlphaMask DRAWINGLAYER_DLLPUBLIC createAlphaMask(
 
 // Helper for convertPrimitive2DContainerToBitmapEx below, but can be also used
 // directly
-BitmapEx DRAWINGLAYER_DLLPUBLIC convertToBitmapEx(
+Bitmap DRAWINGLAYER_DLLPUBLIC convertToBitmap(
     drawinglayer::primitive2d::Primitive2DContainer&& rSeq,
     const geometry::ViewInformation2D& rViewInformation2D, sal_uInt32 
nDiscreteWidth,
     sal_uInt32 nDiscreteHeight, sal_uInt32 nMaxSquarePixels, bool 
bForceAlphaMaskCreation = false);
diff --git a/svgio/source/svgreader/svgfeblendnode.cxx 
b/svgio/source/svgreader/svgfeblendnode.cxx
index 97c519f913dc..9122b945cd9d 100644
--- a/svgio/source/svgreader/svgfeblendnode.cxx
+++ b/svgio/source/svgreader/svgfeblendnode.cxx
@@ -127,29 +127,29 @@ void 
SvgFeBlendNode::apply(drawinglayer::primitive2d::Primitive2DContainer& rTar
     if (pSource)
     {
         drawinglayer::primitive2d::Primitive2DContainer aSource(*pSource);
-        aBmp = Bitmap(drawinglayer::convertToBitmapEx(
-            std::move(aSource), aViewInformation2D, aBaseRange.getWidth(), 
aBaseRange.getHeight(),
-            aBaseRange.getWidth() * aBaseRange.getHeight()));
+        aBmp = drawinglayer::convertToBitmap(std::move(aSource), 
aViewInformation2D,
+                                             aBaseRange.getWidth(), 
aBaseRange.getHeight(),
+                                             aBaseRange.getWidth() * 
aBaseRange.getHeight());
     }
     else
     {
-        aBmp = Bitmap(drawinglayer::convertToBitmapEx(
-            std::move(rTarget), aViewInformation2D, aBaseRange.getWidth(), 
aBaseRange.getHeight(),
-            aBaseRange.getWidth() * aBaseRange.getHeight()));
+        aBmp = drawinglayer::convertToBitmap(std::move(rTarget), 
aViewInformation2D,
+                                             aBaseRange.getWidth(), 
aBaseRange.getHeight(),
+                                             aBaseRange.getWidth() * 
aBaseRange.getHeight());
     }
 
     if (pSource2)
     {
         drawinglayer::primitive2d::Primitive2DContainer aSource(*pSource2);
-        aBmp2 = Bitmap(drawinglayer::convertToBitmapEx(
-            std::move(aSource), aViewInformation2D, aBaseRange.getWidth(), 
aBaseRange.getHeight(),
-            aBaseRange.getWidth() * aBaseRange.getHeight()));
+        aBmp2 = drawinglayer::convertToBitmap(std::move(aSource), 
aViewInformation2D,
+                                              aBaseRange.getWidth(), 
aBaseRange.getHeight(),
+                                              aBaseRange.getWidth() * 
aBaseRange.getHeight());
     }
     else
     {
-        aBmp2 = Bitmap(drawinglayer::convertToBitmapEx(
-            std::move(rTarget), aViewInformation2D, aBaseRange.getWidth(), 
aBaseRange.getHeight(),
-            aBaseRange.getWidth() * aBaseRange.getHeight()));
+        aBmp2 = drawinglayer::convertToBitmap(std::move(rTarget), 
aViewInformation2D,
+                                              aBaseRange.getWidth(), 
aBaseRange.getHeight(),
+                                              aBaseRange.getWidth() * 
aBaseRange.getHeight());
     }
 
     Bitmap aResBmp;
diff --git a/svgio/source/svgreader/svgfecompositenode.cxx 
b/svgio/source/svgreader/svgfecompositenode.cxx
index c8f0f49abf2c..61521bd1756a 100644
--- a/svgio/source/svgreader/svgfecompositenode.cxx
+++ b/svgio/source/svgreader/svgfecompositenode.cxx
@@ -225,40 +225,39 @@ void 
SvgFeCompositeNode::apply(drawinglayer::primitive2d::Primitive2DContainer&
         const basegfx::B2DRange aBaseRange(0, 0, std::max(aRange.getMaxX(), 
aRange2.getMaxX()),
                                            std::max(aRange.getMaxY(), 
aRange2.getMaxY()));
 
-        BitmapEx aBmpEx, aBmpEx2;
+        Bitmap aBmp, aBmp2;
 
         if (pSource)
         {
             drawinglayer::primitive2d::Primitive2DContainer aSource(*pSource);
-            aBmpEx = drawinglayer::convertToBitmapEx(
-                std::move(aSource), aViewInformation2D, aBaseRange.getWidth(),
-                aBaseRange.getHeight(), aBaseRange.getWidth() * 
aBaseRange.getHeight());
+            aBmp = drawinglayer::convertToBitmap(std::move(aSource), 
aViewInformation2D,
+                                                 aBaseRange.getWidth(), 
aBaseRange.getHeight(),
+                                                 aBaseRange.getWidth() * 
aBaseRange.getHeight());
         }
         else
         {
-            aBmpEx = drawinglayer::convertToBitmapEx(
-                std::move(rTarget), aViewInformation2D, aBaseRange.getWidth(),
-                aBaseRange.getHeight(), aBaseRange.getWidth() * 
aBaseRange.getHeight());
+            aBmp = drawinglayer::convertToBitmap(std::move(rTarget), 
aViewInformation2D,
+                                                 aBaseRange.getWidth(), 
aBaseRange.getHeight(),
+                                                 aBaseRange.getWidth() * 
aBaseRange.getHeight());
         }
 
         if (pSource2)
         {
             drawinglayer::primitive2d::Primitive2DContainer aSource(*pSource2);
-            aBmpEx2 = drawinglayer::convertToBitmapEx(
-                std::move(aSource), aViewInformation2D, aBaseRange.getWidth(),
-                aBaseRange.getHeight(), aBaseRange.getWidth() * 
aBaseRange.getHeight());
+            aBmp2 = drawinglayer::convertToBitmap(std::move(aSource), 
aViewInformation2D,
+                                                  aBaseRange.getWidth(), 
aBaseRange.getHeight(),
+                                                  aBaseRange.getWidth() * 
aBaseRange.getHeight());
         }
         else
         {
-            aBmpEx2 = drawinglayer::convertToBitmapEx(
-                std::move(rTarget), aViewInformation2D, aBaseRange.getWidth(),
-                aBaseRange.getHeight(), aBaseRange.getWidth() * 
aBaseRange.getHeight());
+            aBmp2 = drawinglayer::convertToBitmap(std::move(rTarget), 
aViewInformation2D,
+                                                  aBaseRange.getWidth(), 
aBaseRange.getHeight(),
+                                                  aBaseRange.getWidth() * 
aBaseRange.getHeight());
         }
 
-        BitmapArithmeticBlendFilter aArithmeticFilter(Bitmap(aBmpEx2), 
maK1.getNumber(),
-                                                      maK2.getNumber(), 
maK3.getNumber(),
-                                                      maK4.getNumber());
-        Bitmap aResBmp = aArithmeticFilter.execute(Bitmap(aBmpEx));
+        BitmapArithmeticBlendFilter aArithmeticFilter(aBmp2, maK1.getNumber(), 
maK2.getNumber(),
+                                                      maK3.getNumber(), 
maK4.getNumber());
+        Bitmap aResBmp = aArithmeticFilter.execute(aBmp);
 
         const drawinglayer::primitive2d::Primitive2DReference xRef(
             new drawinglayer::primitive2d::BitmapPrimitive2D(

Reply via email to