summaryrefslogtreecommitdiff
path: root/vcl/workben/vcldemo.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2016-02-08 22:25:59 +0100
committerMichael Meeks <michael.meeks@collabora.com>2016-02-09 11:46:22 +0000
commitbf546575116f7f67fe12a735bf8c8689a65bfdc1 (patch)
treec2686e9eb2ebf7fcf96baeead0ed7b09882b3fb8 /vcl/workben/vcldemo.cxx
parent22b852788d94ecacde533e3961a3535ef2a89f7d (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> Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/workben/vcldemo.cxx')
-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 3a91d44263f1..00a1181c8194 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1070,6 +1070,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);