aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gm/ninepatchstretch.cpp11
-rw-r--r--samplecode/SampleNinePatch.cpp11
-rw-r--r--samplecode/SampleSlides.cpp1
-rw-r--r--samplecode/SampleVertices.cpp1
4 files changed, 2 insertions, 22 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);
}
}
}
diff --git a/samplecode/SampleNinePatch.cpp b/samplecode/SampleNinePatch.cpp
index f62a58cf57..bab7b232cc 100644
--- a/samplecode/SampleNinePatch.cpp
+++ b/samplecode/SampleNinePatch.cpp
@@ -7,7 +7,6 @@
*/
#include "SampleCode.h"
#include "SkCanvas.h"
-#include "SkNinePatch.h"
#include "SkPaint.h"
#include "SkGpuDevice.h"
@@ -65,14 +64,6 @@ protected:
return this->INHERITED::onQuery(evt);
}
- 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 onDrawContent(SkCanvas* canvas) {
SkBitmap bm;
SkIRect center;
@@ -101,7 +92,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);
}
}
}
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp
index fc26016a3b..d39cee02b5 100644
--- a/samplecode/SampleSlides.cpp
+++ b/samplecode/SampleSlides.cpp
@@ -314,7 +314,6 @@ static void textonpath_slide(SkCanvas* canvas) {
#include "SkOSFile.h"
#include "SkRandom.h"
#include "SkStream.h"
-#include "SkNinePatch.h"
static SkShader* make_shader0(SkIPoint* size) {
SkBitmap bm;
diff --git a/samplecode/SampleVertices.cpp b/samplecode/SampleVertices.cpp
index 427c183ece..b59442d203 100644
--- a/samplecode/SampleVertices.cpp
+++ b/samplecode/SampleVertices.cpp
@@ -24,7 +24,6 @@
#include "SkOSFile.h"
#include "SkStream.h"
-#include "SkNinePatch.h"
static SkShader* make_shader0(SkIPoint* size) {
SkBitmap bm;