drawinglayer/source/primitive2d/shadowprimitive2d.cxx |   14 +++++++-------
 drawinglayer/source/tools/primitive2dxmldump.cxx      |   16 ++++++++--------
 2 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 50fafaeedac41cc1059c65d0f0b6004ec6535170
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Sep 1 13:09:58 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Sep 1 22:27:38 2025 +0200

    BitmapEx->Bitmap in Primitive2dXmlDump
    
    now that Bitmap supports transparency
    
    Change-Id: I3d755c87107dbf644b53b4dbbcbeb12248b171b3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190482
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx 
b/drawinglayer/source/tools/primitive2dxmldump.cxx
index fb0d78a66be4..3cffb08bf81c 100644
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
@@ -706,22 +706,22 @@ void Primitive2dXmlDump::decomposeAndWrite(
                 rWriter.startElement("bitmap");
                 writeMatrix(rWriter, rBitmapPrimitive2D.getTransform());
 
-                const BitmapEx aBitmapEx(rBitmapPrimitive2D.getBitmap());
-                const Size& rSizePixel(aBitmapEx.GetSizePixel());
+                const Bitmap aBitmap(rBitmapPrimitive2D.getBitmap());
+                const Size aSizePixel(aBitmap.GetSizePixel());
 
-                rWriter.attribute("height", rSizePixel.getHeight());
-                rWriter.attribute("width", rSizePixel.getWidth());
-                rWriter.attribute("checksum", 
OString(std::to_string(aBitmapEx.GetChecksum())));
+                rWriter.attribute("height", aSizePixel.getHeight());
+                rWriter.attribute("width", aSizePixel.getWidth());
+                rWriter.attribute("checksum", 
OString(std::to_string(aBitmap.GetChecksum())));
 
-                for (tools::Long y = 0; y < rSizePixel.getHeight(); y++)
+                for (tools::Long y = 0; y < aSizePixel.getHeight(); y++)
                 {
                     rWriter.startElement("data");
                     OUString aBitmapData = u""_ustr;
-                    for (tools::Long x = 0; x < rSizePixel.getWidth(); x++)
+                    for (tools::Long x = 0; x < aSizePixel.getWidth(); x++)
                     {
                         if (x != 0)
                             aBitmapData = aBitmapData + ",";
-                        aBitmapData = aBitmapData + aBitmapEx.GetPixelColor(x, 
y).AsRGBHexString();
+                        aBitmapData = aBitmapData + aBitmap.GetPixelColor(x, 
y).AsRGBHexString();
                     }
                     rWriter.attribute("row", aBitmapData);
                     rWriter.endElement();
commit ebe44a65a0c9c8d8403d14ddbfbaa6ea151ec79e
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Sep 1 13:50:56 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Sep 1 22:27:27 2025 +0200

    BitmapEx->Bitmap in ShadowPrimitive2D
    
    now that Bitmap supports transparency
    
    Change-Id: I33ffb206088e1516121f9dca5b53bb55bc90bec6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190500
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx 
b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
index 5a0c06d141f8..c364523b076c 100644
--- a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
@@ -204,7 +204,7 @@ void ShadowPrimitive2D::create2DDecomposition(
         new primitive2d::TransformPrimitive2D(aEmbedding, 
std::move(aEmbedded)));
     primitive2d::Primitive2DContainer xEmbedSeq{ xEmbedRef };
 
-    // Create BitmapEx using drawinglayer tooling, including a 
MaximumQuadraticPixel
+    // Create Bitmap using drawinglayer tooling, including a 
MaximumQuadraticPixel
     // limitation to be safe and not go runtime/memory havoc. Use a pretty 
small
     // limit due to this is Blurred Shadow functionality and will look good 
with bitmap
     // scaling anyways. The value of 250.000 square pixels below maybe adapted 
as needed.
@@ -253,7 +253,7 @@ void ShadowPrimitive2D::create2DDecomposition(
     // The end result is the bitmap filled with blur color and blurred 8-bit 
alpha mask
     Bitmap bmp(aAlpha.GetSizePixel(), vcl::PixelFormat::N24_BPP);
     bmp.Erase(Color(getShadowColor()));
-    BitmapEx result(bmp, mask);
+    Bitmap result(bmp, mask);
 
 #ifdef DBG_UTIL
     static bool bDoSaveForVisualControl(false); // loplugin:constvars:ignore
@@ -266,7 +266,7 @@ void ShadowPrimitive2D::create2DDecomposition(
             SvFileStream aNew(sDumpPath + "test_shadowblur.png",
                               StreamMode::WRITE | StreamMode::TRUNC);
             vcl::PngImageWriter aPNGWriter(aNew);
-            aPNGWriter.write(Bitmap(result));
+            aPNGWriter.write(result);
         }
     }
 #endif
@@ -274,10 +274,10 @@ void ShadowPrimitive2D::create2DDecomposition(
     // Independent from discrete sizes of blur alpha creation, always
     // map and project blur result to geometry range extended by blur
     // radius, but to the eventually clipped instance (ClippedRange)
-    const primitive2d::Primitive2DReference xEmbedRefBitmap(new 
BitmapPrimitive2D(
-        Bitmap(result), basegfx::utils::createScaleTranslateB2DHomMatrix(
-                            aClippedRange.getWidth(), 
aClippedRange.getHeight(),
-                            aClippedRange.getMinX(), 
aClippedRange.getMinY())));
+    const primitive2d::Primitive2DReference xEmbedRefBitmap(
+        new BitmapPrimitive2D(result, 
basegfx::utils::createScaleTranslateB2DHomMatrix(
+                                          aClippedRange.getWidth(), 
aClippedRange.getHeight(),
+                                          aClippedRange.getMinX(), 
aClippedRange.getMinY())));
 
     rContainer = primitive2d::Primitive2DContainer{ xEmbedRefBitmap };
 }

Reply via email to