diff options
author | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-10-16 14:48:38 +0000 |
---|---|---|
committer | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-10-16 14:48:38 +0000 |
commit | 878999965b977c4ed771c3d655f9e23ef9b5adb1 (patch) | |
tree | 99f5eb66cf5a3b7cdc955c3ff687d16109968d59 /samplecode/SampleBitmapRect.cpp | |
parent | fead49e3c43e67cf9648ec1999b34da959e1e36b (diff) |
clean up fix to drawBitmapRect
git-svn-id: http://skia.googlecode.com/svn/trunk@388 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleBitmapRect.cpp')
-rw-r--r-- | samplecode/SampleBitmapRect.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/samplecode/SampleBitmapRect.cpp b/samplecode/SampleBitmapRect.cpp index 842dfc4904..0d981d6a4a 100644 --- a/samplecode/SampleBitmapRect.cpp +++ b/samplecode/SampleBitmapRect.cpp @@ -60,7 +60,7 @@ protected: const SkIRect src[] = { { 0, 0, 32, 32 }, - { -8, -8, 80, 80 }, + { 0, 0, 80, 80 }, { 32, 32, 96, 96 }, { -32, -32, 32, 32, } }; @@ -73,11 +73,12 @@ protected: canvas->translate(16, 40); for (size_t i = 0; i < SK_ARRAY_COUNT(src); i++) { + SkRect srcR; + srcR.set(src[i]); + canvas->drawBitmap(fBitmap, 0, 0, &paint); canvas->drawBitmapRect(fBitmap, &src[i], dstR, &paint); - SkRect srcR; - srcR.set(src[i]); canvas->drawRect(srcR, paint); canvas->drawRect(dstR, paint); |