aboutsummaryrefslogtreecommitdiffstats
path: root/samplecode
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-02 22:54:30 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-02 22:54:30 -0800
commit463ef6721e6079555ca17ca6e40bcf6e45e54707 (patch)
tree059e9645510636ae148ba4594b3d6009918655e2 /samplecode
parent3f1a2840ec02c62cd19a80fef696accc9474c9d3 (diff)
downloadexternal_skia-463ef6721e6079555ca17ca6e40bcf6e45e54707.zip
external_skia-463ef6721e6079555ca17ca6e40bcf6e45e54707.tar.gz
external_skia-463ef6721e6079555ca17ca6e40bcf6e45e54707.tar.bz2
auto import from //depot/cupcake/@137055
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleRegion.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/samplecode/SampleRegion.cpp b/samplecode/SampleRegion.cpp
index d3fe062..fd20a81 100644
--- a/samplecode/SampleRegion.cpp
+++ b/samplecode/SampleRegion.cpp
@@ -219,6 +219,24 @@ protected:
}
this->drawBG(canvas);
+ if (false) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkBitmap bm;
+ bm.setConfig(SkBitmap::kA8_Config, 100, 100);
+ bm.allocPixels();
+ bm.eraseColor(0);
+ SkCanvas c(bm);
+ c.drawCircle(50, 50, 50, paint);
+
+ paint.setColor(SK_ColorBLUE);
+ canvas->drawBitmap(bm, 0, 0, &paint);
+ canvas->scale(SK_Scalar1/2, SK_Scalar1/2);
+ paint.setColor(SK_ColorRED);
+ canvas->drawBitmap(bm, 0, 0, &paint);
+ return;
+ }
+
#ifdef SK_DEBUG
if (true) {
SkRegion a, b, c;