From a70b4742a7a0b2edc57cbbbf83d2c6d43ebc300d Mon Sep 17 00:00:00 2001 From: ztenghui Date: Mon, 25 Aug 2014 11:12:34 -0700 Subject: VD: Update the fillColor default as transparent b/17208473 Change-Id: I52ff3d335094f0a95f138640eb24ef5dba2ef864 --- graphics/java/android/graphics/drawable/VectorDrawable.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'graphics/java') diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java index 9ac6927ca6aa..042da5b250d5 100644 --- a/graphics/java/android/graphics/drawable/VectorDrawable.java +++ b/graphics/java/android/graphics/drawable/VectorDrawable.java @@ -119,7 +119,7 @@ import java.util.Stack; *
Defines path string. This is using exactly same format as "d" attribute * in the SVG's path data. This is defined in the viewport space.
*
android:fillColor
- *
Defines the color to fill the path (black if not present).
+ *
Defines the color to fill the path (none if not present).
*
android:strokeColor
*
Defines the color to draw the path outline (none if not present).
*
android:strokeWidth
@@ -862,7 +862,7 @@ public class VectorDrawable extends Drawable { } mRenderPath.addPath(path, mFinalPathMatrix); - if (fullPath.mFillColor != 0) { + if (fullPath.mFillColor != Color.TRANSPARENT) { if (mFillPaint == null) { mFillPaint = new Paint(); mFillPaint.setColorFilter(mColorFilter); @@ -873,7 +873,7 @@ public class VectorDrawable extends Drawable { canvas.drawPath(mRenderPath, mFillPaint); } - if (fullPath.mStrokeColor != 0) { + if (fullPath.mStrokeColor != Color.TRANSPARENT) { if (mStrokePaint == null) { mStrokePaint = new Paint(); mStrokePaint.setColorFilter(mColorFilter); @@ -1237,9 +1237,9 @@ public class VectorDrawable extends Drawable { // Variables below need to be copied (deep copy if applicable) for mutation. private int[] mThemeAttrs; - int mStrokeColor = 0; + int mStrokeColor = Color.TRANSPARENT; float mStrokeWidth = 0; - int mFillColor = Color.BLACK; + int mFillColor = Color.TRANSPARENT; int mFillRule; float mTrimPathStart = 0; float mTrimPathEnd = 1; -- cgit v1.2.3-59-g8ed1b