summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/gdimetafiletools.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-19 13:54:12 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:10:43 +0100
commit820576af4fd6441a752742b43d804e9837839925 (patch)
tree205b0a04d1bd5063ad3005b9679c1facea2ca2c8 /vcl/source/gdi/gdimetafiletools.cxx
parentbf739995fc97ed61a586e949a868ac67fc3b7d95 (diff)
start wrapping OutputDevice in VclPtr
Change-Id: If3ecbb0599b50d50ce6b3997ca7892200c332ffe
Diffstat (limited to 'vcl/source/gdi/gdimetafiletools.cxx')
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index 3fa559a6abb8..32b7a839d451 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -161,23 +161,23 @@ namespace
// in pixel mode for alpha channel painting (black is transparent,
// white to paint 100% opacity)
const Size aSizePixel(rBitmapEx.GetSizePixel());
- VirtualDevice aVDev;
+ ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice;
- aVDev.SetOutputSizePixel(aSizePixel);
- aVDev.EnableMapMode(false);
- aVDev.SetFillColor(COL_WHITE);
- aVDev.SetLineColor();
+ aVDev->SetOutputSizePixel(aSizePixel);
+ aVDev->EnableMapMode(false);
+ aVDev->SetFillColor(COL_WHITE);
+ aVDev->SetLineColor();
if(rBitmapEx.IsTransparent())
{
// use given alpha channel
- aVDev.DrawBitmap(Point(0, 0), rBitmapEx.GetAlpha().GetBitmap());
+ aVDev->DrawBitmap(Point(0, 0), rBitmapEx.GetAlpha().GetBitmap());
}
else
{
// reset alpha channel
- aVDev.SetBackground(Wallpaper(Color(COL_BLACK)));
- aVDev.Erase();
+ aVDev->SetBackground(Wallpaper(Color(COL_BLACK)));
+ aVDev->Erase();
}
// transform polygon from clipping to pixel coordinates
@@ -203,11 +203,11 @@ namespace
aInvertPixelPoly.append(aPixelPoly);
// paint as alpha
- aVDev.DrawPolyPolygon(aInvertPixelPoly);
+ aVDev->DrawPolyPolygon(aInvertPixelPoly);
// get created alpha mask and set defaults
AlphaMask aAlpha(
- aVDev.GetBitmap(
+ aVDev->GetBitmap(
Point(0, 0),
aSizePixel));