diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2014-11-07 11:51:43 +0000 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-11-10 07:59:23 +0100 |
commit | eb25d2d9ccfcecbe3ed0967ff5072f711886341e (patch) | |
tree | 6934757ecba43f889bd071068e9343d2c779ea8b /vcl/workben | |
parent | 2ad355230836ab613831f2906bed70ed2244f33c (diff) |
vcldemo: cover more features.
Change-Id: I12341c28a5d8d8b1d9d5343eaff4a1a08700fadb
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/vcldemo.cxx | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 1fdd7517d3dc..65f143d657f7 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -24,6 +24,11 @@ #include <vcl/wrkwin.hxx> #include <vcl/graphicfilter.hxx> +#if 0 +# define FIXME_ALPHA_WORKING +# define FIXME_ROUNDED_RECT_WORKING +#endif + using namespace css; class DemoWin : public WorkWindow @@ -96,9 +101,9 @@ public: SetLineColor(Color(COL_RED)); // DrawPolyLine(aPoly); } - void drawPolyPoly(Rectangle r) + void drawEllipse(Rectangle r) { - (void)r; + DrawEllipse(r); } void drawCheckered(Rectangle r) { @@ -122,12 +127,22 @@ public: } void drawBitmapEx(Rectangle r) { + drawCheckered(r); + BitmapEx aBitmap(maIntro); aBitmap.Scale(r.GetSize(), BMP_SCALE_BESTQUALITY); +#ifdef FIXME_ALPHA_WORKING + AlphaMask aSemiTransp(aBitmap.GetSizePixel()); + aSemiTransp.Erase(64); + DrawBitmapEx(r.TopLeft(), BitmapEx(aBitmap.GetBitmap(), + aSemiTransp)); +#else DrawBitmapEx(r.TopLeft(), aBitmap); +#endif } void fetchDrawBitmap(Rectangle r) { + // FIXME: should work ... Bitmap aBitmap(GetBitmap(Point(0,0),GetSizePixel())); aBitmap.Scale(r.GetSize(), BMP_SCALE_BESTQUALITY); DrawBitmap(r.TopLeft(), aBitmap); @@ -158,9 +173,13 @@ std::vector<Rectangle> DemoWin::partitionAndClear(int nX, int nY) if ((x + y) % 2) DrawRect(r); else + { +#ifdef FIXME_ROUNDED_RECT_WORKING + DrawRect(r, nBorderSize, nBorderSize); +#else DrawRect(r); -// FIXME: rendering these guys doesn't work at all -// DrawRect(r, nBorderSize, nBorderSize); +#endif + } aRegions.push_back(r); } @@ -181,7 +200,7 @@ void DemoWin::Paint( const Rectangle& rRect ) drawRadialLines(aRegions[i++]); drawText(aRegions[i++]); drawPoly(aRegions[i++]); - drawPolyPoly(aRegions[i++]); + drawEllipse(aRegions[i++]); drawCheckered(aRegions[i++]); drawBitmapEx(aRegions[i++]); drawBitmap(aRegions[i++]); |