vcl/source/window/printdlg.cxx |    2 +-
 vcl/workben/vcldemo.cxx        |   28 ++++++++++++++--------------
 2 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 96f960b5d582774422987ea4b198c854d7220c4a
Author:     Noel Grandin <[email protected]>
AuthorDate: Sat Aug 30 21:20:33 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sun Aug 31 07:38:55 2025 +0200

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

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 55e69b211845..93867807b1c1 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -173,7 +173,7 @@ void 
PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext,
     }
     else
     {
-        BitmapEx aPreviewBitmap(maPreviewBitmap);
+        Bitmap aPreviewBitmap(maPreviewBitmap);
 
         // This explicit force-to-scale allows us to get the
         // mentioned best quality here. Unfortunately this is
commit f8e4e87ce0c4a55d3350fff3b12c9d5789b7713a
Author:     Noel Grandin <[email protected]>
AuthorDate: Sat Aug 30 21:18:40 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sun Aug 31 07:38:46 2025 +0200

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

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 56a0cfe44d50..af4b7528e934 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -820,15 +820,15 @@ public:
         {
             Bitmap aPageShadowMask(u"sw/res/page-shadow-mask.png"_ustr);
 
-            BitmapEx aRight(aPageShadowMask);
+            Bitmap aRight(aPageShadowMask);
             sal_Int32 nSlice = (aPageShadowMask.GetSizePixel().Width() - 3) / 
4;
             // a width x 1 slice
             aRight.Crop(tools::Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) 
+ 1),
                                   Size(nSlice, 1)));
-            AlphaMask aAlphaMask(aRight.GetBitmap());
+            AlphaMask aAlphaMask(aRight.CreateColorBitmap());
             Bitmap aBlockColor(aAlphaMask.GetSizePixel(), 
vcl::PixelFormat::N24_BPP);
             aBlockColor.Erase(COL_RED);
-            BitmapEx aShadowStretch(aBlockColor, aAlphaMask);
+            Bitmap aShadowStretch(aBlockColor, aAlphaMask);
 
             Point aRenderPt(r.TopLeft());
 
@@ -847,7 +847,7 @@ public:
             AlphaMask aWholeMask(aPageShadowMask.CreateColorBitmap());
             aBlockColor = Bitmap(aPageShadowMask.GetSizePixel(), 
vcl::PixelFormat::N24_BPP);
             aBlockColor.Erase(COL_GREEN);
-            BitmapEx aWhole(aBlockColor, aWholeMask);
+            Bitmap aWhole(aBlockColor, aWholeMask);
 
             aRenderPt = r.Center();
             aRenderPt.Move(nSlice+1, 0);
@@ -879,11 +879,11 @@ public:
         {
             maCheckered.RenderRegion(rDev, r, rCtx);
 
-            BitmapEx aBitmap(rCtx.mpDemoRenderer->maIntro);
+            Bitmap aBitmap(rCtx.mpDemoRenderer->maIntro);
             aBitmap.Scale(r.GetSize(), BmpScaleFlag::BestQuality);
             AlphaMask aSemiTransp(aBitmap.GetSizePixel());
             aSemiTransp.Erase(64);
-            rDev.DrawBitmapEx(r.TopLeft(), BitmapEx(aBitmap.GetBitmap(),
+            rDev.DrawBitmapEx(r.TopLeft(), Bitmap(aBitmap.CreateColorBitmap(),
                                                     aSemiTransp));
         }
     };
@@ -1077,7 +1077,7 @@ public:
             }
             else if (eType == RENDER_AS_BITMAPEX)
             {
-                BitmapEx 
aBitmapEx(pNested->GetBitmap(Point(0,0),aWhole.GetSize()));
+                Bitmap 
aBitmapEx(pNested->GetBitmap(Point(0,0),aWhole.GetSize()));
                 rDev.DrawBitmapEx(r.TopLeft(), aBitmapEx);
             }
             else if (eType == RENDER_AS_OUTDEV ||
@@ -1253,7 +1253,7 @@ public:
             }
         }
 
-        static BitmapEx AlphaRecovery(OutputDevice &rDev, Point aPt, BitmapEx 
const &aSrc)
+        static Bitmap AlphaRecovery(OutputDevice &rDev, Point aPt, Bitmap 
const &aSrc)
         {
             // Compositing onto 2x colors beyond our control
             ScopedVclPtrInstance< VirtualDevice > aWhite;
@@ -1330,7 +1330,7 @@ public:
             rDev.DrawBitmap(aPt, aMask.GetBitmap());
             aPt.Move(aSrc.GetSizePixel().Width(), 0);
 
-            return BitmapEx(aRecovered, aMask);
+            return Bitmap(aRecovered, aMask);
         }
 
         virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
@@ -1343,7 +1343,7 @@ public:
                 Point aLocation(0,maIcons[0].GetSizePixel().Height() + 8);
                 for (size_t i = 0; i < maIcons.size(); i++)
                 {
-                    BitmapEx aSrc(maIcons[i]);
+                    Bitmap aSrc(maIcons[i]);
 
                     // original above
                     Point aAbove(aLocation);
@@ -1351,12 +1351,12 @@ public:
                     rDev.DrawBitmapEx(aAbove, aSrc);
                     aAbove.Move(aSrc.GetSizePixel().Width(),0);
                     aAbove.Move(aSrc.GetSizePixel().Width(),0);
-                    rDev.DrawBitmap(aAbove, aSrc.GetBitmap());
+                    rDev.DrawBitmap(aAbove, aSrc.CreateColorBitmap());
                     aAbove.Move(aSrc.GetSizePixel().Width(),0);
-                    rDev.DrawBitmap(aAbove, aSrc.GetAlphaMask().GetBitmap());
+                    rDev.DrawBitmap(aAbove, 
aSrc.CreateAlphaMask().GetBitmap());
 
                     // intermediates middle
-                    BitmapEx aResult = AlphaRecovery(rDev, aLocation, aSrc);
+                    Bitmap aResult = AlphaRecovery(rDev, aLocation, aSrc);
 
                     // result below
                     Point aBelow(aLocation);
@@ -1367,7 +1367,7 @@ public:
                     aBelow.Move(aResult.GetSizePixel().Width()+4,0);
                     rDev.DrawBitmapEx(aBelow, aResult);
 
-                    Bitmap aGrey = aSrc.GetBitmap();
+                    Bitmap aGrey = aSrc.CreateColorBitmap();
                     aGrey.Convert(BmpConversion::N8BitGreys);
                     rDev.DrawBitmap(aBelow, aGrey);
 

Reply via email to