diff options
author | Louis-Francis Ratté-Boulianne <lfrb@collabora.com> | 2014-11-18 12:34:53 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-11-22 20:14:16 +0100 |
commit | 4b6feefa51405e1313de62e1a19c4c213e79c22f (patch) | |
tree | 13796bcb39957f93c01bf338fc605204027bee48 /vcl/win/source | |
parent | 121b8487f13b4ac3e3a9517a02000c9fe55afd68 (diff) |
vcl: Add support for backend-dependent blending of bitmaps (mask and alpha)
Change-Id: Iba64eb42965c86ca5655b9a105ef3f397e033ecf
Diffstat (limited to 'vcl/win/source')
-rw-r--r-- | vcl/win/source/gdi/gdiimpl.cxx | 16 | ||||
-rw-r--r-- | vcl/win/source/gdi/gdiimpl.hxx | 10 | ||||
-rw-r--r-- | vcl/win/source/gdi/salgdi_gdiplus.cxx | 16 |
3 files changed, 42 insertions, 0 deletions
diff --git a/vcl/win/source/gdi/gdiimpl.cxx b/vcl/win/source/gdi/gdiimpl.cxx index 03ad55465fd2..8a4b39062363 100644 --- a/vcl/win/source/gdi/gdiimpl.cxx +++ b/vcl/win/source/gdi/gdiimpl.cxx @@ -2252,6 +2252,22 @@ bool WinSalGraphicsImpl::tryDrawBitmapGdiPlus(const SalTwoRect& rTR, const SalBi return false; } +bool WinSalGraphicsImpl::blendBitmap( + const SalTwoRect&, + const SalBitmap&) +{ + return false; +} + +bool WinSalGraphicsImpl::blendAlphaBitmap( + const SalTwoRect&, + const SalBitmap&, + const SalBitmap&, + const SalBitmap&) +{ + return false; +} + bool WinSalGraphicsImpl::drawAlphaBitmap( const SalTwoRect& rTR, const SalBitmap& rSrcBitmap, diff --git a/vcl/win/source/gdi/gdiimpl.hxx b/vcl/win/source/gdi/gdiimpl.hxx index a1c781a36676..ded35ac85041 100644 --- a/vcl/win/source/gdi/gdiimpl.hxx +++ b/vcl/win/source/gdi/gdiimpl.hxx @@ -172,6 +172,16 @@ public: void* pPtr, sal_uLong nSize ) SAL_OVERRIDE; + virtual bool blendBitmap( + const SalTwoRect&, + const SalBitmap& rBitmap ) SAL_OVERRIDE; + + virtual bool blendAlphaBitmap( + const SalTwoRect&, + const SalBitmap& rSrcBitmap, + const SalBitmap& rMaskBitmap, + const SalBitmap& rAlphaBitmap ) SAL_OVERRIDE; + /** Render bitmap with alpha channel @param rSourceBitmap diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx index 65dbdd84acec..094a05c62b16 100644 --- a/vcl/win/source/gdi/salgdi_gdiplus.cxx +++ b/vcl/win/source/gdi/salgdi_gdiplus.cxx @@ -43,6 +43,22 @@ bool WinSalGraphics::drawPolyLine( eLineJoin, eLineCap); } +bool WinSalGraphics::blendBitmap( + const SalTwoRect& rTR, + const SalBitmap& rBmp) +{ + return mpImpl->blendBitmap(rTR, rBmp); +} + +bool WinSalGraphics::blendAlphaBitmap( + const SalTwoRect& rTR, + const SalBitmap& rSrcBmp, + const SalBitmap& rMaskBmp, + const SalBitmap& rAlphaBmp) +{ + return mpImpl->blendAlphaBitmap(rTR, rSrcBmp, rMaskBmp, rAlphaBmp); +} + bool WinSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, const SalBitmap& rSrcBitmap, |