summaryrefslogtreecommitdiff
path: root/tests/VectorDrawableTest
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2016-07-01 11:34:25 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2016-07-01 15:35:57 -0700
commit2196d562d640b5894926080ac4cf04a60cebc8a6 (patch)
tree681046f7e6b834b62f5d594f1b5899e4c6aa9c1f /tests/VectorDrawableTest
parent88dece9144e4806ef54f41cc9273d7c07ee53371 (diff)
Add test for clip path grouping and intersection
b/29597018 Change-Id: Ib7b214376ab0089b3810e74bae60d4b8e666e13e
Diffstat (limited to 'tests/VectorDrawableTest')
-rw-r--r--tests/VectorDrawableTest/res/drawable/vector_drawable_group_clip.xml50
-rw-r--r--tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java1
2 files changed, 51 insertions, 0 deletions
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_group_clip.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable_group_clip.xml
new file mode 100644
index 000000000000..9574d7e524c3
--- /dev/null
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable_group_clip.xml
@@ -0,0 +1,50 @@
+<!--
+ Copyright (C) 2016 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="48dp"
+ android:width="48dp"
+ android:viewportHeight="48"
+ android:viewportWidth="48">
+
+ <group>
+ <clip-path
+ android:name="clip1"
+ android:pathData="M 0, 0 l 48, 0 l 0, 30 l -48, 0 z"/>
+
+ <group>
+ <clip-path
+ android:name="clip2"
+ android:pathData="M 0, 18 l 48, 0 l 0, 30 l -48, 0 z"/>
+
+ <path
+ android:name="plus1"
+ android:pathData="M20 16h-4v8h-8v4h8v8h4v-8h8v-4h-8zm9-3.84v3.64l5-1v21.2h4v-26z"
+ android:fillColor="#ff00ff00"/>
+ </group>
+
+
+ <group android:name="backgroundGroup" >
+ <path
+ android:name="background1"
+ android:fillColor="#80000000"
+ android:pathData="M 0,0 l 24,0 l 0,24 l -24, 0 z" />
+ <path
+ android:name="background2"
+ android:fillColor="#80000000"
+ android:pathData="M 24,24 l 24,0 l 0, 24 l -24, 0 z" />
+ </group>
+ </group>
+</vector>
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
index 5856f49da343..0d2d2e48e4c9 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
+++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
@@ -75,6 +75,7 @@ public class VectorDrawablePerformance extends Activity {
R.drawable.vector_drawable28,
R.drawable.vector_drawable29,
R.drawable.vector_drawable30,
+ R.drawable.vector_drawable_group_clip,
R.drawable.vector_drawable_scale0,
R.drawable.vector_drawable_scale1,
R.drawable.vector_drawable_scale2,