BitmapEx->Bitmap in vcl
now that Bitmap supports transparency Change-Id: Iab5fe533a9669f6f536d43bc132d9bb55ac60ab9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190148 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -1598,7 +1598,7 @@ bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, Bitmap& rBm
|
||||
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
|
||||
Graphic aGraphic;
|
||||
if (rFilter.ImportGraphic(aGraphic, u"", *xStm) == ERRCODE_NONE)
|
||||
rBmp = Bitmap(aGraphic.GetBitmapEx());
|
||||
rBmp = aGraphic.GetBitmap();
|
||||
}
|
||||
|
||||
if(rBmp.IsEmpty())
|
||||
|
||||
@@ -54,7 +54,7 @@ class MyWorkWindow : public WorkWindow
|
||||
|
||||
public:
|
||||
Graphic maGraphic;
|
||||
BitmapEx *mpBitmap;
|
||||
Bitmap *mpBitmap;
|
||||
VclPtr<FixedBitmap> mpFixedBitmap;
|
||||
|
||||
MyWorkWindow( vcl::Window* pParent, WinBits nWinStyle );
|
||||
@@ -106,8 +106,8 @@ void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan
|
||||
Bitmap aEmpty;
|
||||
mpFixedBitmap->SetBitmap( aEmpty );
|
||||
GraphicConversionParameters aConv( aSize );
|
||||
mpBitmap = new BitmapEx(maGraphic.GetBitmapEx( aConv ));
|
||||
mpFixedBitmap->SetBitmap( Bitmap(*mpBitmap) );
|
||||
mpBitmap = new Bitmap(maGraphic.GetBitmap( aConv ));
|
||||
mpFixedBitmap->SetBitmap( *mpBitmap );
|
||||
mpFixedBitmap->SetSizePixel( aSize );
|
||||
|
||||
WorkWindow::Paint(rRenderContext, rRect);
|
||||
|
||||
@@ -269,7 +269,7 @@ IMPL_LINK_NOARG( MyWin, SelectHdl, ListBox&, void)
|
||||
GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
|
||||
rFilter.ImportGraphic( aGraphicResult, u"import", aStream );
|
||||
|
||||
BitmapEx aBitmap = aGraphicResult.GetBitmapEx();
|
||||
Bitmap aBitmap = aGraphicResult.GetBitmap();
|
||||
|
||||
SAL_INFO("vcl", "got bitmap of size " << aBitmap.GetSizePixel().Width() << "x" << aBitmap.GetSizePixel().Height());
|
||||
Size aFixedSize( aBitmap.GetSizePixel() );
|
||||
|
||||
Reference in New Issue
Block a user