aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-09-07 12:27:43 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-09-07 12:27:43 +0000
commit9c9b8d90c822132e205af4c70363fe3a272d6c6f (patch)
tree9e35e3a8641fa739d10ae52080fcd6a25a64d137 /gm
parent55b5f4bd6a69e70feeaf6018171882ab9cd250ae (diff)
use drawBitmapNine instead of SkNinePatch utils
git-svn-id: http://skia.googlecode.com/svn/trunk@2237 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r--gm/ninepatchstretch.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/gm/ninepatchstretch.cpp b/gm/ninepatchstretch.cpp
index 02cfcab461..f18e5fcee5 100644
--- a/gm/ninepatchstretch.cpp
+++ b/gm/ninepatchstretch.cpp
@@ -8,7 +8,6 @@
#include "gm.h"
#include "SkGpuDevice.h"
-#include "SkNinePatch.h"
static void make_bitmap(SkBitmap* bitmap, GrContext* ctx, SkIRect* center) {
SkDevice* dev;
@@ -66,14 +65,6 @@ protected:
return make_isize(400, 400);
}
- static void drawNine(SkCanvas* canvas, const SkRect& dst, const SkBitmap& bm,
- const SkIRect& center, const SkPaint* paint) {
- SkIRect margin;
- margin.set(center.fLeft, center.fTop, bm.width() - center.fRight,
- bm.height() - center.fBottom);
- SkNinePatch::DrawNine(canvas, dst, bm, margin, paint);
- }
-
virtual void onDraw(SkCanvas* canvas) {
canvas->drawColor(SK_ColorWHITE);
@@ -104,7 +95,7 @@ protected:
int i = ix * 2 + iy;
SkRect r = SkRect::MakeXYWH(x + ix * fixed, y + iy * fixed,
size[i].width(), size[i].height());
- drawNine(canvas, r, bm, center, &paint);
+ canvas->drawBitmapNine(bm, center, r, &paint);
}
}
}