diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-29 21:09:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-30 08:40:05 +0200 |
commit | 86555baa2b0e7af2e1ac9f2af40781de91708375 (patch) | |
tree | 468525116f88009c15c5ffeb80e16fa9a517b496 /vcl | |
parent | 7873bba6c1e5de580ef28d0ecf68d154dd57e726 (diff) |
Bitmap->BitmapEx in FixedBitmap
Change-Id: I0e409beb0d046d927b6a0c1987abec42df76727d
Reviewed-on: https://gerrit.libreoffice.org/55032
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/fixed.cxx | 12 | ||||
-rw-r--r-- | vcl/workben/icontest.cxx | 6 |
2 files changed, 8 insertions, 10 deletions
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index dac10a896278..2cf897c2fd82 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -692,17 +692,15 @@ FixedBitmap::FixedBitmap( vcl::Window* pParent, WinBits nStyle ) : void FixedBitmap::ImplDraw( OutputDevice* pDev, const Point& rPos, const Size& rSize ) { - Bitmap* pBitmap = &maBitmap; - // do we have a Bitmap? - if ( !(!(*pBitmap)) ) + if ( !!maBitmap ) { if ( GetStyle() & WB_SCALE ) - pDev->DrawBitmap( rPos, rSize, *pBitmap ); + pDev->DrawBitmapEx( rPos, rSize, maBitmap ); else { - Point aPos = ImplCalcPos( GetStyle(), rPos, pBitmap->GetSizePixel(), rSize ); - pDev->DrawBitmap( aPos, *pBitmap ); + Point aPos = ImplCalcPos( GetStyle(), rPos, maBitmap.GetSizePixel(), rSize ); + pDev->DrawBitmapEx( aPos, maBitmap ); } } } @@ -799,7 +797,7 @@ void FixedBitmap::DataChanged( const DataChangedEvent& rDCEvt ) } } -void FixedBitmap::SetBitmap( const Bitmap& rBitmap ) +void FixedBitmap::SetBitmap( const BitmapEx& rBitmap ) { maBitmap = rBitmap; CompatStateChanged( StateChangedType::Data ); diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx index 0806ddcaf98c..eac9f8c8d59e 100644 --- a/vcl/workben/icontest.cxx +++ b/vcl/workben/icontest.cxx @@ -65,7 +65,7 @@ class MyWorkWindow : public WorkWindow public: Graphic maGraphic; - Bitmap *mpBitmap; + BitmapEx *mpBitmap; VclPtr<FixedBitmap> mpFixedBitmap; MyWorkWindow( vcl::Window* pParent, WinBits nWinStyle ); @@ -112,10 +112,10 @@ void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan aSize.setWidth( aSize.Width() * (1 + (0.1*sin(mnPaintCount/60.))) ); aSize.setHeight( aSize.Height() * (1 + (0.1*sin(mnPaintCount/50.))) ); - Bitmap aEmpty; + BitmapEx aEmpty; mpFixedBitmap->SetBitmap( aEmpty ); GraphicConversionParameters aConv( aSize ); - mpBitmap = new Bitmap( maGraphic.GetBitmap( aConv ) ); + mpBitmap = new BitmapEx( maGraphic.GetBitmap( aConv ) ); mpFixedBitmap->SetBitmap( *mpBitmap ); mpFixedBitmap->SetSizePixel( aSize ); |