Defining new color constat for transparent color
Review URL: https://codereview.appspot.com/6901044
git-svn-id: http://skia.googlecode.com/svn/trunk@6696 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleRegion.cpp b/samplecode/SampleRegion.cpp
index 269fc6a..8b3a03c 100644
--- a/samplecode/SampleRegion.cpp
+++ b/samplecode/SampleRegion.cpp
@@ -22,7 +22,7 @@
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kA8_Config, width*2, height*2);
bitmap.allocPixels();
- bitmap.eraseColor(0);
+ bitmap.eraseColor(SK_ColorTRANSPARENT);
SkScalar dx = 20;
SkScalar dy = 20;
@@ -41,12 +41,12 @@
paint.setStrokeWidth(1);
// use the rect
- c.clear(0);
+ c.clear(SK_ColorTRANSPARENT);
c.drawRect(r, paint);
canvas->drawBitmap(bitmap, 0, 0, NULL);
// use the path
- c.clear(0);
+ c.clear(SK_ColorTRANSPARENT);
c.drawPath(path, paint);
canvas->drawBitmap(bitmap, SkIntToScalar(2*width), 0, NULL);
}