am 8598b11f: am 1acf763b: am b236c8b1: Removing fill and stroke opacity

* commit '8598b11f4b9b7c0b57d83dbe01c839cf41874e09':
  Removing fill and stroke opacity
This commit is contained in:
ztenghui
2014-08-08 02:25:18 +00:00
committed by Android Git Automerger
6 changed files with 12 additions and 59 deletions

View File

@@ -590,7 +590,6 @@ package android {
field public static final int fillBefore = 16843196; // 0x10101bc
field public static final int fillColor = 16843807; // 0x101041f
field public static final int fillEnabled = 16843343; // 0x101024f
field public static final int fillOpacity = 16843806; // 0x101041e
field public static final int fillViewport = 16843130; // 0x101017a
field public static final int filter = 16843035; // 0x101011b
field public static final int filterTouchesWhenObscured = 16843460; // 0x10102c4
@@ -1190,7 +1189,6 @@ package android {
field public static final int strokeLineCap = 16843815; // 0x1010427
field public static final int strokeLineJoin = 16843816; // 0x1010428
field public static final int strokeMiterLimit = 16843817; // 0x1010429
field public static final int strokeOpacity = 16843810; // 0x1010422
field public static final int strokeWidth = 16843811; // 0x1010423
field public static final int submitBackground = 16843914; // 0x101048a
field public static final int subtitle = 16843473; // 0x10102d1

View File

@@ -20,13 +20,11 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportHeight="64.0">
<path
android:fillColor="#FF000000"
android:pathData="M49.062,50.0m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"
android:fillOpacity="0.2"/>
android:fillColor="#33000000"
android:pathData="M49.062,50.0m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"/>
<path
android:fillColor="#FF000000"
android:pathData="M49.0,49.5m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"
android:fillOpacity="0.2"/>
android:fillColor="#33000000"
android:pathData="M49.0,49.5m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"/>
<path
android:pathData="M49.0,49.0m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"
android:fillColor="#FF5722"/>

View File

@@ -5208,13 +5208,13 @@
<attr name="name" />
<!-- The width a path stroke -->
<attr name="strokeWidth" format="float" />
<!-- The opacity of a path stroke -->
<!-- The opacity of a path stroke @hide-->
<attr name="strokeOpacity" format="float" />
<!-- The color to stroke the path if not defined implies no stroke-->
<attr name="strokeColor" format="color" />
<!-- The color to fill the path if not defined implies no fill-->
<attr name="fillColor" format="color" />
<!-- The level of opacity of the filled area of the path -->
<!-- The level of opacity of the filled area of the path @hide-->
<attr name="fillOpacity" format="float" />
<!-- The specification of the operations that define the path -->
<attr name="pathData" format="string" />

View File

@@ -104,6 +104,8 @@ import java.util.Stack;
* <dt><code>android:translateY</code></dt>
* <dd>The amount of translation on the Y coordinate.
* This is defined in the viewport space.</dd>
* <dt><code>android:alpha</code></dt>
* <dd>The amount of transparency.</dd>
* </dl></dd>
* </dl>
*
@@ -117,15 +119,11 @@ import java.util.Stack;
* <dd>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.</dd>
* <dt><code>android:fillColor</code></dt>
* <dd>Defines the color to fill the path (none if not present).</dd>
* <dd>Defines the color to fill the path (black if not present).</dd>
* <dt><code>android:strokeColor</code></dt>
* <dd>Defines the color to draw the path outline (none if not present).</dd>
* <dt><code>android:strokeWidth</code></dt>
* <dd>The width a path stroke.</dd>
* <dt><code>android:strokeOpacity</code></dt>
* <dd>The opacity of a path stroke.</dd>
* <dt><code>android:fillOpacity</code></dt>
* <dd>The opacity to fill the path with.</dd>
* <dt><code>android:trimPathStart</code></dt>
* <dd>The fraction of the path to trim from the start, in the range from 0 to 1.</dd>
* <dt><code>android:trimPathEnd</code></dt>
@@ -1241,10 +1239,8 @@ public class VectorDrawable extends Drawable {
int mStrokeColor = 0;
float mStrokeWidth = 0;
float mStrokeOpacity = Float.NaN;
int mFillColor = Color.BLACK;
int mFillRule;
float mFillOpacity = Float.NaN;
float mTrimPathStart = 0;
float mTrimPathEnd = 1;
float mTrimPathOffset = 0;
@@ -1263,10 +1259,8 @@ public class VectorDrawable extends Drawable {
mStrokeColor = copy.mStrokeColor;
mStrokeWidth = copy.mStrokeWidth;
mStrokeOpacity = copy.mStrokeOpacity;
mFillColor = copy.mFillColor;
mFillRule = copy.mFillRule;
mFillOpacity = copy.mFillOpacity;
mTrimPathStart = copy.mTrimPathStart;
mTrimPathEnd = copy.mTrimPathEnd;
mTrimPathOffset = copy.mTrimPathOffset;
@@ -1327,8 +1321,6 @@ public class VectorDrawable extends Drawable {
mFillColor = a.getColor(R.styleable.VectorDrawablePath_fillColor,
mFillColor);
mFillOpacity = a.getFloat(R.styleable.VectorDrawablePath_fillOpacity,
mFillOpacity);
mStrokeLineCap = getStrokeLineCap(a.getInt(
R.styleable.VectorDrawablePath_strokeLineCap, -1), mStrokeLineCap);
mStrokeLineJoin = getStrokeLineJoin(a.getInt(
@@ -1337,8 +1329,6 @@ public class VectorDrawable extends Drawable {
R.styleable.VectorDrawablePath_strokeMiterLimit, mStrokeMiterlimit);
mStrokeColor = a.getColor(R.styleable.VectorDrawablePath_strokeColor,
mStrokeColor);
mStrokeOpacity = a.getFloat(R.styleable.VectorDrawablePath_strokeOpacity,
mStrokeOpacity);
mStrokeWidth = a.getFloat(R.styleable.VectorDrawablePath_strokeWidth,
mStrokeWidth);
mTrimPathEnd = a.getFloat(R.styleable.VectorDrawablePath_trimPathEnd,
@@ -1347,8 +1337,6 @@ public class VectorDrawable extends Drawable {
R.styleable.VectorDrawablePath_trimPathOffset, mTrimPathOffset);
mTrimPathStart = a.getFloat(
R.styleable.VectorDrawablePath_trimPathStart, mTrimPathStart);
updateColorAlphas();
}
@Override
@@ -1363,16 +1351,6 @@ public class VectorDrawable extends Drawable {
a.recycle();
}
private void updateColorAlphas() {
if (!Float.isNaN(mFillOpacity)) {
mFillColor = applyAlpha(mFillColor, mFillOpacity);
}
if (!Float.isNaN(mStrokeOpacity)) {
mStrokeColor = applyAlpha(mStrokeColor, mStrokeOpacity);
}
}
/* Setters and Getters, used by animator from AnimatedVectorDrawable. */
@SuppressWarnings("unused")
int getStroke() {
@@ -1394,16 +1372,6 @@ public class VectorDrawable extends Drawable {
mStrokeWidth = strokeWidth;
}
@SuppressWarnings("unused")
float getStrokeOpacity() {
return mStrokeOpacity;
}
@SuppressWarnings("unused")
void setStrokeOpacity(float strokeOpacity) {
mStrokeOpacity = strokeOpacity;
}
@SuppressWarnings("unused")
int getFill() {
return mFillColor;
@@ -1414,16 +1382,6 @@ public class VectorDrawable extends Drawable {
mFillColor = fillColor;
}
@SuppressWarnings("unused")
float getFillOpacity() {
return mFillOpacity;
}
@SuppressWarnings("unused")
void setFillOpacity(float fillOpacity) {
mFillOpacity = fillOpacity;
}
@SuppressWarnings("unused")
float getTrimPathStart() {
return mTrimPathStart;

View File

@@ -28,8 +28,7 @@
l-5.046875,0.0 0.0-1.0Z" />
<path
android:name="two"
android:fillColor="#ffff00"
android:fillOpacity="0"
android:fillColor="#00ffff00"
android:pathData="M 2.534375,9.6875l 4.140625,0.0 0.0,1.0-5.5625,0.0 0.0-1.0q 0.671875-0.6875 1.828125-1.859375
q 1.1718752-1.1875 1.4687502-1.53125 0.578125-0.625 0.796875-1.0625
q 0.234375-0.453125 0.234375-0.875 0.0-0.703125-0.5-1.140625

View File

@@ -21,10 +21,10 @@ limitations under the License.
<group>
<path
android:fillOpacity="0.9"
android:fillColor="#E6000000"
android:pathData="M11.994999,2.0C6.4679985,2.0 2.0,6.4780006 2.0,12.0s4.468,10.0 9.995,10.0S22.0,17.522 22.0,12.0S17.521,2.0 11.994999,2.0zM12.0,20.0c-4.42,0.0 -8.0,-3.582 -8.0,-8.0s3.58,-8.0 8.0,-8.0s8.0,3.582 8.0,8.0S16.419998,20.0 12.0,20.0z" />
<path
android:fillOpacity="0.9"
android:fillColor="#E6000000"
android:pathData="M12.5,6.0l-1.5,0.0 0.0,7.0 5.3029995,3.1819992 0.75,-1.249999 -4.5529995,-2.7320004z" />
</group>