diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-08 12:22:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-08 16:01:52 +0200 |
commit | 5a60a01af104b48aa9569ecb6204c865db74df9e (patch) | |
tree | 1dfa2ba3e5fdb56928c15fefe0fd69f09c5e6d36 /extensions | |
parent | f6b87a7d64cd7c979ebbe032166ef256d4f0d844 (diff) |
use BitmapEx in ScanPreview
Change-Id: Ief3dc627ad0e0096eb8d3ef4dc4e538fa34cb703
Reviewed-on: https://gerrit.libreoffice.org/75212
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 2f9d710a41e7..0a7bdb2565c3 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -75,7 +75,7 @@ private: enum DragDirection { TopLeft, Top, TopRight, Right, BottomRight, Bottom, BottomLeft, Left }; - Bitmap maPreviewBitmap; + BitmapEx maPreviewBitmapEx; tools::Rectangle maPreviewRect; Point maTopLeft, maBottomRight; Point maMinTopLeft, maMaxBottomRight; @@ -193,7 +193,7 @@ public: void UpdatePreviewBounds(); void SetBitmap(SvStream &rStream) { - ReadDIB(maPreviewBitmap, rStream, true); + ReadDIBBitmapEx(maPreviewBitmapEx, rStream, true); } virtual Size GetOptimalSize() const override { @@ -928,7 +928,7 @@ void ScanPreview::UpdatePreviewBounds() } else { - Size aBMSize( maPreviewBitmap.GetSizePixel() ); + Size aBMSize( maPreviewBitmapEx.GetSizePixel() ); if( aBMSize.Width() > aBMSize.Height() && aBMSize.Width() ) { int nVHeight = (maBottomRight.X() - maTopLeft.X()) * aBMSize.Height() / aBMSize.Width(); @@ -956,7 +956,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.DrawBitmap(maPreviewRect.TopLeft(), maPreviewRect.GetSize(), maPreviewBitmap); + rRenderContext.DrawBitmapEx(maPreviewRect.TopLeft(), maPreviewRect.GetSize(), maPreviewBitmapEx); mbDragDrawn = false; DrawDrag(rRenderContext); |