diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2014-11-18 16:47:36 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2014-11-18 21:20:05 +0000 |
commit | 721fb11053327a557fc81f3ced4bf8af52e73c64 (patch) | |
tree | da0e5bc77bf8960eecf2cf69c2e8f4ed44ede51f /vcl | |
parent | 47659b4744467ffda504116a1284c7f096c1b326 (diff) |
vcldemo: render more small scaled page-border alikes
Change-Id: I2605175e7ee66d3da5e41497baa4178074830e99
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/workben/vcldemo.cxx | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 1be53517b42b..01ad9c9d6156 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -458,28 +458,19 @@ public: aBlockColor.Erase(COL_RED); BitmapEx aShadowStretch = BitmapEx(aBlockColor, aAlphaMask); -#ifdef DEBUG - { // before - the pristine <n>x1 image - SvFileStream aStream("/tmp/myshadow.png", STREAM_WRITE); - vcl::PNGWriter aWriter(aShadowStretch); - aWriter.Write(aStream); - } -#endif + Point aRenderPt(r.TopLeft()); + + long aSizes[] = { 200, 100, 200, 100, 50, 5, 2 }; + // and yes - we really do this in the page border rendering code ... - aShadowStretch.Scale(Size(aShadowStretch.GetSizePixel().Width(), 50), - BMP_SCALE_FAST); - aShadowStretch.Scale(Size(aShadowStretch.GetSizePixel().Width(), 800), - BMP_SCALE_FAST); -#ifdef DEBUG - { // after the corrupted image full of fluff ... - SvFileStream aStream("/tmp/myshadow-50.png", STREAM_WRITE); - vcl::PNGWriter aWriter(aShadowStretch); - aWriter.Write(aStream); + for (size_t i = 0; i < SAL_N_ELEMENTS(aSizes); i++) + { + aShadowStretch.Scale(Size(aShadowStretch.GetSizePixel().Width(), aSizes[i]), + BMP_SCALE_FAST); + + rDev.DrawBitmapEx(aRenderPt, aShadowStretch); + aRenderPt.Move(aShadowStretch.GetSizePixel().Width() + 4, 0); } -#endif - Point aRenderPt(r.Center()); - aRenderPt.Move(-nSlice-1, 0); - rDev.DrawBitmapEx(aRenderPt, aShadowStretch); AlphaMask aWholeMask(aPageShadowMask.GetBitmap()); aBlockColor = Bitmap(aPageShadowMask.GetSizePixel(), 24); |