summaryrefslogtreecommitdiff
path: root/vcl/workben
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2016-02-08 22:25:59 +0100
committerTor Lillqvist <tml@collabora.com>2016-02-09 08:41:03 +0000
commitad8d6d9ef53717e072005fe518ba8ded61e96711 (patch)
tree9681383d67e4ec4169ade0d91d413e0bb0dd9084 /vcl/workben
parent8455fe462a5a0e82ed2f98d303d36623b5920f9d (diff)
tdf#97666 -opengl: convert the bitmap to 8bit grays using GL shader
Change-Id: I4d48d29ab752814f71c697a201e70a26ae937775 Reviewed-on: https://gerrit.libreoffice.org/22223 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl/workben')
-rw-r--r--vcl/workben/vcldemo.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 889db52d08a9..3726e00b7dd1 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1215,6 +1215,19 @@ public:
aBelow.Move(0,aResult.GetSizePixel().Height());
rDev.DrawBitmapEx(aBelow, aResult);
+ // mini convert test.
+ aBelow.Move(aResult.GetSizePixel().Width()+4,0);
+ rDev.DrawBitmapEx(aBelow, aResult);
+
+ Bitmap aGrey = aSrc.GetBitmap();
+ aGrey.Convert(BMP_CONVERSION_8BIT_GREYS);
+ rDev.DrawBitmap(aBelow, aGrey);
+
+ aBelow.Move(aGrey.GetSizePixel().Width(),0);
+ BitmapEx aGreyMask(aSrc.GetBitmap(),
+ AlphaMask(aSrc.GetMask()));
+ rDev.DrawBitmapEx(aBelow, aGreyMask);
+
aLocation.Move(aSrc.GetSizePixel().Width()*6,0);
if (aLocation.X() > r.Right())
aLocation = Point(0,aLocation.Y()+aSrc.GetSizePixel().Height()*3+4);