diff options
author | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-25 16:56:37 +0000 |
---|---|---|
committer | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-25 16:56:37 +0000 |
commit | 4067d7d5cdbf6d052cf1519c79db82bad9e47b7e (patch) | |
tree | bf25844a5ad0a3709e6ea3f2c07a7836819a6e7d | |
parent | d4af56c5f24a7bf0200e20a591d55f8c82fb9627 (diff) |
Slightly improve visuals of bitmapscroll test in gm
git-svn-id: http://skia.googlecode.com/svn/trunk@1949 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | gm/bitmapscroll.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gm/bitmapscroll.cpp b/gm/bitmapscroll.cpp index de7130d1e5..fff565fdb6 100644 --- a/gm/bitmapscroll.cpp +++ b/gm/bitmapscroll.cpp @@ -9,13 +9,14 @@ namespace skiagm { * @param bitmap the bitmap data is written into this object */ static void make_bitmap(int quarterWidth, int quarterHeight, SkBitmap *bitmap) { - SkPaint pRed, pWhite, pGreen, pBlue, pLine; + SkPaint pRed, pWhite, pGreen, pBlue, pLine, pAlphaGray; pRed.setColor(0xFFFF9999); pWhite.setColor(0xFFFFFFFF); pGreen.setColor(0xFF99FF99); pBlue.setColor(0xFF9999FF); pLine.setColor(0xFF000000); pLine.setStyle(SkPaint::kStroke_Style); + pAlphaGray.setColor(0x66888888); // Prepare bitmap, and a canvas that draws into it. bitmap->reset(); @@ -30,6 +31,7 @@ static void make_bitmap(int quarterWidth, int quarterHeight, SkBitmap *bitmap) { canvas.drawRectCoords(w*2, 0, w*4, h*2, pGreen); canvas.drawRectCoords( 0, h*2, w*2, h*4, pBlue); canvas.drawRectCoords(w*2, h*2, w*4, h*4, pWhite); + canvas.drawRectCoords(w, h, w*3, h*3, pAlphaGray); canvas.drawLine(w*2, 0, w*2, h*4, pLine); canvas.drawLine( 0, h*2, w*4, h*2, pLine); canvas.drawRectCoords(w, h, w*3, h*3, pLine); @@ -53,7 +55,7 @@ protected: virtual void onDraw(SkCanvas* canvas) { SkIRect scrollCenterRegion = SkIRect::MakeXYWH( - quarterWidth, quarterHeight, quarterWidth*2, quarterHeight*2); + quarterWidth, quarterHeight, quarterWidth*2+1, quarterHeight*2+1); int x = quarterWidth; int y = quarterHeight; int xSpacing = quarterWidth * 20; |