Move the rotation information from path to group.

Also update the 3rd test to correctly testing clipping.

Removing some naive tests which rotate 360 or 0.

bug:15288554

Change-Id: I436e8e494cb78fc665a3890171a1af87367db419
This commit is contained in:
ztenghui
2014-05-27 10:42:15 -07:00
parent 69170a56c6
commit 63cfd85bcc
13 changed files with 202 additions and 228 deletions

View File

@@ -4780,6 +4780,18 @@
<attr name="height" />
</declare-styleable>
<!-- Defines the group used in Vector Drawables. -->
<declare-styleable name="VectorDrawableGroup">
<!-- The Name of this group -->
<attr name="name" />
<!-- The amount to rotate the group -->
<attr name="rotation" />
<!-- The X coordinate of the center of rotation of a group -->
<attr name="pivotX" />
<!-- The Y coordinate of the center of rotation of a group -->
<attr name="pivotY" />
</declare-styleable>
<!-- Defines the path used in Vector Drawables. -->
<declare-styleable name="VectorDrawablePath">
<!-- The Name of this path -->
@@ -4788,12 +4800,6 @@
<attr name="strokeWidth" format="float" />
<!-- The opacity of a path stroke -->
<attr name="strokeOpacity" format="float" />
<!-- The amount to rotate the path stroke -->
<attr name="rotation" />
<!-- The X coordinate of the center of rotation of a path -->
<attr name="pivotX" />
<!-- The Y coordinate of the center of rotation of a path -->
<attr name="pivotY" />
<!-- The color to stroke the path if not defined implies no stroke-->
<attr name="stroke" format="color" />
<!-- The color to fill the path if not defined implies no fill-->

View File

@@ -39,7 +39,6 @@ import org.xmlpull.v1.XmlPullParserFactory;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
/**
@@ -289,6 +288,7 @@ public class VectorDrawable extends Drawable {
noViewportTag = false;
} else if (SHAPE_GROUP.equals(tagName)) {
currentGroup = new VGroup();
currentGroup.inflate(res, attrs, theme);
pathRenderer.mGroupList.add(currentGroup);
noGroupTag = false;
}
@@ -325,8 +325,6 @@ public class VectorDrawable extends Drawable {
throw new XmlPullParserException("no " + tag + " defined");
}
// post parse cleanup
pathRenderer.parseFinish();
return pathRenderer;
}
@@ -373,7 +371,6 @@ public class VectorDrawable extends Drawable {
private final Path mRenderPath = new Path();
private final Matrix mMatrix = new Matrix();
private VPath[] mCurrentPaths;
private Paint mStrokePaint;
private Paint mFillPaint;
private ColorFilter mColorFilter;
@@ -391,12 +388,6 @@ public class VectorDrawable extends Drawable {
public VPathRenderer(VPathRenderer copy) {
mGroupList.addAll(copy.mGroupList);
if (copy.mCurrentPaths != null) {
mCurrentPaths = new VPath[copy.mCurrentPaths.length];
for (int i = 0; i < mCurrentPaths.length; i++) {
mCurrentPaths[i] = new VPath(copy.mCurrentPaths[i]);
}
}
mBaseWidth = copy.mBaseWidth;
mBaseHeight = copy.mBaseHeight;
@@ -422,7 +413,9 @@ public class VectorDrawable extends Drawable {
public void applyTheme(Theme t) {
final ArrayList<VGroup> groups = mGroupList;
for (int i = groups.size() - 1; i >= 0; i--) {
final ArrayList<VPath> paths = groups.get(i).mVGList;
VGroup currentGroup = groups.get(i);
currentGroup.applyTheme(t);
final ArrayList<VPath> paths = currentGroup.mVGList;
for (int j = paths.size() - 1; j >= 0; j--) {
final VPath path = paths.get(j);
if (path.canApplyTheme()) {
@@ -446,104 +439,98 @@ public class VectorDrawable extends Drawable {
}
public void draw(Canvas canvas, int w, int h) {
if (mCurrentPaths == null) {
Log.e(LOGTAG,"mCurrentPaths == null");
if (mGroupList == null || mGroupList.size() == 0) {
Log.e(LOGTAG,"There is no group to draw");
return;
}
for (int i = 0; i < mCurrentPaths.length; i++) {
if (mCurrentPaths[i] != null) {
drawPath(mCurrentPaths[i], canvas, w, h);
for (int i = 0; i < mGroupList.size(); i++) {
VGroup currentGroup = mGroupList.get(i);
if (currentGroup != null) {
drawPath(currentGroup, canvas, w, h);
}
}
}
private void drawPath(VPath vPath, Canvas canvas, int w, int h) {
private void drawPath(VGroup vGroup, Canvas canvas, int w, int h) {
final float scale = Math.min(h / mViewportHeight, w / mViewportWidth);
vPath.toPath(mPath);
final Path path = mPath;
if (vPath.mTrimPathStart != 0.0f || vPath.mTrimPathEnd != 1.0f) {
float start = (vPath.mTrimPathStart + vPath.mTrimPathOffset) % 1.0f;
float end = (vPath.mTrimPathEnd + vPath.mTrimPathOffset) % 1.0f;
if (mPathMeasure == null) {
mPathMeasure = new PathMeasure();
}
mPathMeasure.setPath(mPath, false);
float len = mPathMeasure.getLength();
start = start * len;
end = end * len;
path.reset();
if (start > end) {
mPathMeasure.getSegment(start, len, path, true);
mPathMeasure.getSegment(0f, end, path, true);
} else {
mPathMeasure.getSegment(start, end, path, true);
}
path.rLineTo(0, 0); // fix bug in measure
}
mRenderPath.reset();
mMatrix.reset();
mMatrix.postRotate(vPath.mRotate, vPath.mPivotX, vPath.mPivotY);
mMatrix.postRotate(vGroup.mRotate, vGroup.mPivotX, vGroup.mPivotY);
mMatrix.postScale(scale, scale, mViewportWidth / 2f, mViewportHeight / 2f);
mMatrix.postTranslate(w / 2f - mViewportWidth / 2f, h / 2f - mViewportHeight / 2f);
mRenderPath.addPath(path, mMatrix);
ArrayList<VPath> paths = vGroup.getPaths();
for (int i = 0; i < paths.size(); i++) {
VPath vPath = paths.get(i);
vPath.toPath(mPath);
final Path path = mPath;
if (vPath.mClip) {
canvas.clipPath(mRenderPath, Region.Op.REPLACE);
}
if (vPath.mTrimPathStart != 0.0f || vPath.mTrimPathEnd != 1.0f) {
float start = (vPath.mTrimPathStart + vPath.mTrimPathOffset) % 1.0f;
float end = (vPath.mTrimPathEnd + vPath.mTrimPathOffset) % 1.0f;
if (vPath.mFillColor != 0) {
if (mFillPaint == null) {
mFillPaint = new Paint();
mFillPaint.setColorFilter(mColorFilter);
mFillPaint.setStyle(Paint.Style.FILL);
mFillPaint.setAntiAlias(true);
if (mPathMeasure == null) {
mPathMeasure = new PathMeasure();
}
mPathMeasure.setPath(mPath, false);
float len = mPathMeasure.getLength();
start = start * len;
end = end * len;
path.reset();
if (start > end) {
mPathMeasure.getSegment(start, len, path, true);
mPathMeasure.getSegment(0f, end, path, true);
} else {
mPathMeasure.getSegment(start, end, path, true);
}
path.rLineTo(0, 0); // fix bug in measure
}
mFillPaint.setColor(vPath.mFillColor);
canvas.drawPath(mRenderPath, mFillPaint);
}
mRenderPath.reset();
if (vPath.mStrokeColor != 0) {
if (mStrokePaint == null) {
mStrokePaint = new Paint();
mStrokePaint.setColorFilter(mColorFilter);
mStrokePaint.setStyle(Paint.Style.STROKE);
mStrokePaint.setAntiAlias(true);
mRenderPath.addPath(path, mMatrix);
if (vPath.mClip) {
canvas.clipPath(mRenderPath, Region.Op.REPLACE);
}
final Paint strokePaint = mStrokePaint;
if (vPath.mStrokeLineJoin != null) {
strokePaint.setStrokeJoin(vPath.mStrokeLineJoin);
if (vPath.mFillColor != 0) {
if (mFillPaint == null) {
mFillPaint = new Paint();
mFillPaint.setColorFilter(mColorFilter);
mFillPaint.setStyle(Paint.Style.FILL);
mFillPaint.setAntiAlias(true);
}
mFillPaint.setColor(vPath.mFillColor);
canvas.drawPath(mRenderPath, mFillPaint);
}
if (vPath.mStrokeLineCap != null) {
strokePaint.setStrokeCap(vPath.mStrokeLineCap);
if (vPath.mStrokeColor != 0) {
if (mStrokePaint == null) {
mStrokePaint = new Paint();
mStrokePaint.setColorFilter(mColorFilter);
mStrokePaint.setStyle(Paint.Style.STROKE);
mStrokePaint.setAntiAlias(true);
}
final Paint strokePaint = mStrokePaint;
if (vPath.mStrokeLineJoin != null) {
strokePaint.setStrokeJoin(vPath.mStrokeLineJoin);
}
if (vPath.mStrokeLineCap != null) {
strokePaint.setStrokeCap(vPath.mStrokeLineCap);
}
strokePaint.setStrokeMiter(vPath.mStrokeMiterlimit * scale);
strokePaint.setColor(vPath.mStrokeColor);
strokePaint.setStrokeWidth(vPath.mStrokeWidth * scale);
canvas.drawPath(mRenderPath, strokePaint);
}
strokePaint.setStrokeMiter(vPath.mStrokeMiterlimit * scale);
strokePaint.setColor(vPath.mStrokeColor);
strokePaint.setStrokeWidth(vPath.mStrokeWidth * scale);
canvas.drawPath(mRenderPath, strokePaint);
}
}
/**
* Build the "current" path based on the current group
* TODO: improve memory use & performance or move to C++
*/
public void parseFinish() {
final Collection<VPath> paths = mGroupList.get(0).getPaths();
mCurrentPaths = paths.toArray(new VPath[paths.size()]);
for (int i = 0; i < mCurrentPaths.length; i++) {
mCurrentPaths[i] = new VPath(mCurrentPaths[i]);
}
}
@@ -587,17 +574,60 @@ public class VectorDrawable extends Drawable {
private final HashMap<String, VPath> mVGPathMap = new HashMap<String, VPath>();
private final ArrayList<VPath> mVGList = new ArrayList<VPath>();
private float mRotate = 0;
private float mPivotX = 0;
private float mPivotY = 0;
private int[] mThemeAttrs;
public void add(VPath path) {
String id = path.getID();
mVGPathMap.put(id, path);
mVGList.add(path);
}
public void applyTheme(Theme t) {
if (mThemeAttrs == null) {
return;
}
final TypedArray a = t.resolveAttributes(
mThemeAttrs, R.styleable.VectorDrawablePath);
mRotate = a.getFloat(R.styleable.VectorDrawableGroup_rotation, mRotate);
mPivotX = a.getFloat(R.styleable.VectorDrawableGroup_pivotX, mPivotX);
mPivotY = a.getFloat(R.styleable.VectorDrawableGroup_pivotY, mPivotY);
a.recycle();
}
public void inflate(Resources res, AttributeSet attrs, Theme theme) {
final TypedArray a = obtainAttributes(res, theme, attrs, R.styleable.VectorDrawableGroup);
final int[] themeAttrs = a.extractThemeAttrs();
mThemeAttrs = themeAttrs;
// NOTE: The set of attributes loaded here MUST match the
// set of attributes loaded in applyTheme.
if (themeAttrs == null || themeAttrs[R.styleable.VectorDrawableGroup_rotation] == 0) {
mRotate = a.getFloat(R.styleable.VectorDrawableGroup_rotation, mRotate);
}
if (themeAttrs == null || themeAttrs[R.styleable.VectorDrawableGroup_pivotX] == 0) {
mPivotX = a.getFloat(R.styleable.VectorDrawableGroup_pivotX, mPivotX);
}
if (themeAttrs == null || themeAttrs[R.styleable.VectorDrawableGroup_pivotY] == 0) {
mPivotY = a.getFloat(R.styleable.VectorDrawableGroup_pivotY, mPivotY);
}
a.recycle();
}
/**
* Must return in order of adding
* @return ordered list of paths
*/
public Collection<VPath> getPaths() {
public ArrayList<VPath> getPaths() {
return mVGList;
}
@@ -616,10 +646,6 @@ public class VectorDrawable extends Drawable {
int mFillRule;
float mFillOpacity = Float.NaN;
float mRotate = 0;
float mPivotX = 0;
float mPivotY = 0;
float mTrimPathStart = 0;
float mTrimPathEnd = 1;
float mTrimPathOffset = 0;
@@ -631,18 +657,11 @@ public class VectorDrawable extends Drawable {
private VNode[] mNode = null;
private String mId;
private int[] mCheckState = new int[MAX_STATES];
private boolean[] mCheckValue = new boolean[MAX_STATES];
private int mNumberOfStates = 0;
public VPath() {
// Empty constructor.
}
public VPath(VPath p) {
copyFrom(p);
}
public void toPath(Path path) {
path.reset();
if (mNode != null) {
@@ -707,18 +726,6 @@ public class VectorDrawable extends Drawable {
mFillOpacity = a.getFloat(R.styleable.VectorDrawablePath_fillOpacity, mFillOpacity);
}
if (themeAttrs == null || themeAttrs[R.styleable.VectorDrawablePath_rotation] == 0) {
mRotate = a.getFloat(R.styleable.VectorDrawablePath_rotation, mRotate);
}
if (themeAttrs == null || themeAttrs[R.styleable.VectorDrawablePath_pivotX] == 0) {
mPivotX = a.getFloat(R.styleable.VectorDrawablePath_pivotX, mPivotX);
}
if (themeAttrs == null || themeAttrs[R.styleable.VectorDrawablePath_pivotY] == 0) {
mPivotY = a.getFloat(R.styleable.VectorDrawablePath_pivotY, mPivotY);
}
if (themeAttrs == null
|| themeAttrs[R.styleable.VectorDrawablePath_strokeLineCap] == 0) {
mStrokeLineCap = getStrokeLineCap(
@@ -797,10 +804,6 @@ public class VectorDrawable extends Drawable {
mFillColor = a.getColor(R.styleable.VectorDrawablePath_fill, mFillColor);
mFillOpacity = a.getFloat(R.styleable.VectorDrawablePath_fillOpacity, mFillOpacity);
mRotate = a.getFloat(R.styleable.VectorDrawablePath_rotation, mRotate);
mPivotX = a.getFloat(R.styleable.VectorDrawablePath_pivotX, mPivotX);
mPivotY = a.getFloat(R.styleable.VectorDrawablePath_pivotY, mPivotY);
mStrokeLineCap = getStrokeLineCap(a.getInt(
R.styleable.VectorDrawablePath_strokeLineCap, -1), mStrokeLineCap);
mStrokeLineJoin = getStrokeLineJoin(a.getInt(
@@ -819,6 +822,7 @@ public class VectorDrawable extends Drawable {
R.styleable.VectorDrawablePath_trimPathStart, mTrimPathStart);
updateColorAlphas();
a.recycle();
}
private void updateColorAlphas() {
@@ -921,33 +925,6 @@ public class VectorDrawable extends Drawable {
}
return list.toArray(new VectorDrawable.VNode[list.size()]);
}
public void copyFrom(VPath p1) {
mNode = new VNode[p1.mNode.length];
for (int i = 0; i < mNode.length; i++) {
mNode[i] = new VNode(p1.mNode[i]);
}
mId = p1.mId;
mStrokeColor = p1.mStrokeColor;
mFillColor = p1.mFillColor;
mStrokeWidth = p1.mStrokeWidth;
mRotate = p1.mRotate;
mPivotX = p1.mPivotX;
mPivotY = p1.mPivotY;
mTrimPathStart = p1.mTrimPathStart;
mTrimPathEnd = p1.mTrimPathEnd;
mTrimPathOffset = p1.mTrimPathOffset;
mStrokeLineCap = p1.mStrokeLineCap;
mStrokeLineJoin = p1.mStrokeLineJoin;
mStrokeMiterlimit = p1.mStrokeMiterlimit;
mNumberOfStates = p1.mNumberOfStates;
for (int i = 0; i < mNumberOfStates; i++) {
mCheckState[i] = p1.mCheckState[i];
mCheckValue[i] = p1.mCheckValue[i];
}
mFillRule = p1.mFillRule;
}
}
private static class VNode {

View File

@@ -15,21 +15,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" >
<size
android:width="64dp"
android:height="64dp"/>
android:width="64dp"
android:height="64dp"/>
<viewport android:viewportWidth="320"
android:viewportHeight="320"/>
<path
<group
android:rotation="180"
android:pivotX="70"
android:pivotY="120">
<path
android:name="house"
android:pathData="M 130,225 L 130,115 L 130,115 L 70,15 L 10,115 L 10,115 L 10,225 z"
android:fill="#ff440000"
android:stroke="#FF00FF00"
android:strokeWidth="10"
android:rotation="180"
android:pivotX="70"
android:pivotY="120"
android:trimPathStart=".1"
android:trimPathEnd=".9"/>
</group>
</vector>

View File

@@ -1,4 +1,5 @@
<!-- Copyright (C) 2014 The Android Open Source Project
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,57 +16,62 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" >
<size
android:width="64dp"
android:height="64dp"/>
android:height="64dp"
android:width="64dp" />
<viewport
android:viewportWidth="7.30625"
android:viewportHeight="12.25"/>
android:viewportHeight="12.25"
android:viewportWidth="7.30625" />
<path
<group
android:pivotX="3.65"
android:pivotY="6.125"
android:rotation="-30" >
<path
android:name="clip1"
android:pathData="
M 0, 0
l 7.3, 0
l 0, 0
l -7.3, 0
z"
android:clipToPath="true"
android:rotation="-30"
android:pivotX="3.65"
android:pivotY="6.125"
/>
<path
android:pathData="
M 0, 6.125
l 7.3, 0
l 0, 12.25
l -7.3, 0
z" />
</group>
<group>
<path
android:name="one"
android:fill="#ff88ff"
android:pathData="M 1.215625,9.5l 1.9375,0.0 0.0,-6.671875 -2.109375,0.421875 0.0,-1.078125
l 2.09375,-0.421875 1.1874998,0.0 0.0,7.75 1.9375,0.0 0.0,1.0
l -5.046875,0.0 0.0,-1.0Z"
android:fill="#ff88ff"
/>
<path
l 2.09375,-0.421875 1.1874998,0.0 0.0,7.75 1.9375,0.0 0.0,1.0
l -5.046875,0.0 0.0,-1.0Z" />
</group>
<group
android:pivotX="3.65"
android:pivotY="6.125"
android:rotation="-30" >
<path
android:name="clip2"
android:pathData="
M 0, 0
l 7.3, 0
l 0, 12.25
l -7.3, 0
z"
android:clipToPath="true"
android:rotation="-30"
android:pivotX="3.65"
android:pivotY="6.125"
/>
<path
android:pathData="
M 0, 0
l 7.3, 0
l 0, 6.125
l -7.3, 0
z" />
</group>
<group>
<path
android:name="two"
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
q -0.484375,-0.4375 -1.2656252,-0.4375 -0.5625,0.0 -1.1875,0.1875
q -0.609375,0.1875 -1.3125,0.59375l 0.0,-1.203125q 0.71875,-0.28125 1.328125,-0.421875
q 0.625,-0.15625 1.140625,-0.15625 1.3593752,0.0 2.1718752,0.6875
q 0.8125,0.671875 0.8125,1.8125 0.0,0.53125 -0.203125,1.015625
q -0.203125,0.484375 -0.734375,1.140625 -0.15625,0.171875 -0.9375,0.984375
q -0.78125024,0.8125 -2.2187502,2.265625Z"
android:fill="#ff88ff"
/>
</vector>
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
q -0.484375,-0.4375 -1.2656252,-0.4375 -0.5625,0.0 -1.1875,0.1875
q -0.609375,0.1875 -1.3125,0.59375l 0.0,-1.203125q 0.71875,-0.28125 1.328125,-0.421875
q 0.625,-0.15625 1.140625,-0.15625 1.3593752,0.0 2.1718752,0.6875
q 0.8125,0.671875 0.8125,1.8125 0.0,0.53125 -0.203125,1.015625
q -0.203125,0.484375 -0.734375,1.140625 -0.15625,0.171875 -0.9375,0.984375
q -0.78125024,0.8125 -2.2187502,2.265625Z" />
</group>
</vector>

View File

@@ -23,14 +23,14 @@
android:viewportHeight="200"
android:viewportWidth="200" />
<group>
<group
android:pivotX="100"
android:pivotY="100"
android:rotation="90">
<path
android:name="house"
android:fill="#ffffffff"
android:pathData="M 100,20 l 0,0 0,140 -80,0 z M 100,20 l 0,0 80,140 -80,0 z"
android:pivotX="100"
android:pivotY="100"
android:rotation="90" />
android:pathData="M 100,20 l 0,0 0,140 -80,0 z M 100,20 l 0,0 80,140 -80,0 z"/>
</group>
</vector>

View File

@@ -28,7 +28,6 @@
android:name="battery"
android:fill="#3388ff"
android:pathData="M 20.28125,2.0000002 C 17.352748,2.0000002 15,4.3527485 15,7.2812502 L 15,8.0000002 L 13.15625,8.0000002 C 9.7507553,8.0000002 7,10.750759 7,14.15625 L 7,39.84375 C 7,43.24924 9.7507558,46 13.15625,46 L 33.84375,46 C 37.249245,46 39.999999,43.24924 40,39.84375 L 40,14.15625 C 40,10.75076 37.249243,8.0000002 33.84375,8.0000002 L 32,8.0000002 L 32,7.2812502 C 32,4.3527485 29.647252,2.0000002 26.71875,2.0000002 L 20.28125,2.0000002 z"
android:rotation="0"
android:stroke="#ff8833"
android:strokeWidth="1" />
<path

View File

@@ -35,10 +35,7 @@
<path
android:name="v"
android:fill="#FF00FF00"
android:pathData="M300,70 l 0,-70 70,70 -70,70z"
android:pivotX="300"
android:pivotY="300"
android:rotation="0" />
android:pathData="M300,70 l 0,-70 70,70 -70,70z"/>
</group>
</vector>

View File

@@ -34,9 +34,6 @@
android:name="half"
android:fill="#FFFF0000"
android:pathData="M275,175 v-150 a150,150 0 0,0 -150,150 z"
android:pivotX="300"
android:pivotY="200"
android:rotation="0"
android:stroke="#FF0000FF"
android:strokeWidth="5" />
</group>

View File

@@ -23,7 +23,10 @@
android:viewportHeight="500"
android:viewportWidth="800" />
<group>
<group
android:pivotX="90"
android:pivotY="100"
android:rotation="20">
<path
android:name="pie2"
android:pathData="M200,350 l 50,-25
@@ -31,9 +34,6 @@
a25,25 -30 0,1 100,-50 l 50,-25
a25,37 -30 0,1 100,-50 l 50,-25
a25,50 -30 0,1 100,-50 l 50,-25"
android:pivotX="90"
android:pivotY="100"
android:rotation="20"
android:stroke="#FF00FF00"
android:strokeWidth="10" />
</group>

View File

@@ -23,14 +23,14 @@
android:viewportHeight="400"
android:viewportWidth="500" />
<group>
<group
android:pivotX="250"
android:pivotY="200"
android:rotation="180">
<path
android:name="house"
android:fill="#ff440000"
android:pathData="M100,200 C100,100 250,100 250,200 S400,300 400,200"
android:pivotX="250"
android:pivotY="200"
android:rotation="180"
android:stroke="#FFFF0000"
android:strokeWidth="10" />
</group>

View File

@@ -27,9 +27,6 @@
<path
android:name="house"
android:pathData="M 100,10 v 90 M 10,100 h 90"
android:pivotX="100"
android:pivotY="100"
android:rotation="360"
android:stroke="#FF00FF00"
android:strokeWidth="10" />
</group>

View File

@@ -26,10 +26,7 @@
android:name="house"
android:pathData="M200,300 Q400,50 600,300 T1000,300"
android:stroke="#FFFF0000"
android:strokeWidth="10"
android:rotation="360"
android:pivotX="600"
android:pivotY="300"/>
android:strokeWidth="10"/>
</group>
</vector>

View File

@@ -27,9 +27,6 @@
<path
android:name="house"
android:pathData="M100,200 C100,100 250,100 250,200 S400,300 400,200"
android:pivotX="250"
android:pivotY="200"
android:rotation="360"
android:stroke="#FFFFFF00"
android:strokeWidth="10" />
</group>