extensions/source/scanner/grid.cxx    |   12 ++++++------
 extensions/source/scanner/sanedlg.cxx |    8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit e2779fa3d75277e876d5c7f31ccccaf2ae24432b
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Sep 1 09:17:08 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Sep 1 12:17:40 2025 +0200

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

diff --git a/extensions/source/scanner/grid.cxx 
b/extensions/source/scanner/grid.cxx
index 4c06634fa02d..03bb73ea9806 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -55,10 +55,10 @@ class GridWindow : public weld::CustomWidgetController
             return (maPos.X() < rComp.maPos.X());
         }
 
-        void draw(vcl::RenderContext& rRenderContext, const BitmapEx& 
rBitmapEx)
+        void draw(vcl::RenderContext& rRenderContext, const Bitmap& rBitmap)
         {
             const Point aOffset(rRenderContext.PixelToLogic(Point(mnOffX, 
mnOffY)));
-            rRenderContext.DrawBitmapEx(maPos - aOffset, rBitmapEx);
+            rRenderContext.DrawBitmapEx(maPos - aOffset, rBitmap);
         }
 
         bool isHit(OutputDevice const & rWin, const Point& rPos)
@@ -97,7 +97,7 @@ class GridWindow : public weld::CustomWidgetController
     Handles m_aHandles;
     Handles::size_type m_nDragIndex;
 
-    BitmapEx        m_aMarkerBitmap;
+    Bitmap          m_aMarkerBitmap;
 
     Point transform( double x, double y );
     void transform( const Point& rOriginal, double& x, double& y );
@@ -126,7 +126,7 @@ class GridWindow : public weld::CustomWidgetController
     void drawLine(vcl::RenderContext& rRenderContext, double x1, double y1, 
double x2, double y2);
 public:
     GridWindow();
-    void Init(double* pXValues, double* pYValues, int nValues, bool 
bCutValues, const BitmapEx &rMarkerBitmap);
+    void Init(double* pXValues, double* pYValues, int nValues, bool 
bCutValues, const Bitmap &rMarkerBitmap);
     virtual ~GridWindow() override;
 
     void setBoundings( double fMinX, double fMinY, double fMaxX, double fMaxY 
);
@@ -158,7 +158,7 @@ GridWindow::GridWindow()
 {
 }
 
-void GridWindow::Init(double* pXValues, double* pYValues, int nValues, bool 
bCutValues, const BitmapEx &rMarkerBitmap)
+void GridWindow::Init(double* pXValues, double* pYValues, int nValues, bool 
bCutValues, const Bitmap &rMarkerBitmap)
 {
     m_aMarkerBitmap = rMarkerBitmap;
     m_pXValues = pXValues;
@@ -211,7 +211,7 @@ GridDialog::GridDialog(weld::Window* pParent, double* 
pXValues, double* pYValues
     , m_xGridWindow(new GridWindow)
     , m_xGridWindowWND(new weld::CustomWeld(*m_xBuilder, u"gridwindow"_ustr, 
*m_xGridWindow))
 {
-    m_xGridWindow->Init(pXValues, pYValues, nValues, true/*bCutValues*/, 
BitmapEx(Bitmap(RID_SCANNER_HANDLE)));
+    m_xGridWindow->Init(pXValues, pYValues, nValues, true/*bCutValues*/, 
Bitmap(RID_SCANNER_HANDLE));
     m_xResetTypeBox->set_active(0);
     m_xResetButton->connect_clicked( LINK( this, GridDialog, ClickButtonHdl ) 
);
 }
diff --git a/extensions/source/scanner/sanedlg.cxx 
b/extensions/source/scanner/sanedlg.cxx
index 7c2af809a6ab..a5546610ebf5 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -100,7 +100,7 @@ private:
     enum DragDirection { TopLeft, Top, TopRight, Right, BottomRight, Bottom,
                          BottomLeft, Left };
 
-    BitmapEx  maPreviewBitmapEx;
+    Bitmap    maPreviewBitmap;
     tools::Rectangle maPreviewRect;
     Point     maTopLeft, maBottomRight;
     Point     maMinTopLeft, maMaxBottomRight;
@@ -206,7 +206,7 @@ public:
     void UpdatePreviewBounds();
     void SetBitmap(SvStream &rStream)
     {
-        ReadDIBBitmapEx(maPreviewBitmapEx, rStream, true);
+        ReadDIBBitmapEx(maPreviewBitmap, rStream, true);
     }
     virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
     {
@@ -917,7 +917,7 @@ void ScanPreview::UpdatePreviewBounds()
     }
     else
     {
-        Size aBMSize( maPreviewBitmapEx.GetSizePixel() );
+        Size aBMSize( maPreviewBitmap.GetSizePixel() );
         if( aBMSize.Width() > aBMSize.Height() && aBMSize.Width() )
         {
             int nVHeight = (maBottomRight.X() - maTopLeft.X()) * 
aBMSize.Height() / aBMSize.Width();
@@ -944,7 +944,7 @@ void ScanPreview::Paint(vcl::RenderContext& rRenderContext, 
const tools::Rectang
                                       Size(PREVIEW_WIDTH, PREVIEW_HEIGHT)));
     rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
     // check for sane values
-    rRenderContext.DrawBitmapEx(maPreviewRect.TopLeft(), 
maPreviewRect.GetSize(), maPreviewBitmapEx);
+    rRenderContext.DrawBitmapEx(maPreviewRect.TopLeft(), 
maPreviewRect.GetSize(), maPreviewBitmap);
 
     DrawDrag(rRenderContext);
 }

Reply via email to