diff options
author | ztenghui <ztenghui@google.com> | 2015-01-09 23:16:21 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-01-09 23:16:23 +0000 |
commit | 5a880611cce5276dfb3138b6360a5c69994718be (patch) | |
tree | ad7a77e63a7652747caae4b7b73ff6ad681c6377 /graphics | |
parent | 96798efe991981f4bbeed3c63785f59e125e1b7e (diff) | |
parent | 054a17caaa7cd36f4f4ba644088c4ccf5b9c06fb (diff) | |
download | frameworks_base-5a880611cce5276dfb3138b6360a5c69994718be.zip frameworks_base-5a880611cce5276dfb3138b6360a5c69994718be.tar.gz frameworks_base-5a880611cce5276dfb3138b6360a5c69994718be.tar.bz2 |
Merge "Limit the scope of clip path to the group, not global"
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/drawable/VectorDrawable.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java index 21dba43..f937ddb 100644 --- a/graphics/java/android/graphics/drawable/VectorDrawable.java +++ b/graphics/java/android/graphics/drawable/VectorDrawable.java @@ -926,9 +926,10 @@ public class VectorDrawable extends Drawable { // Basically the Mfinal = Mviewport * M0 * M1 * M2; // Mi the local matrix at level i of the group tree. currentGroup.mStackedMatrix.set(currentMatrix); - currentGroup.mStackedMatrix.preConcat(currentGroup.mLocalMatrix); + // Save the current clip information, which is local to this group. + canvas.save(); // Draw the group tree in the same order as the XML file. for (int i = 0; i < currentGroup.mChildren.size(); i++) { Object child = currentGroup.mChildren.get(i); @@ -941,6 +942,7 @@ public class VectorDrawable extends Drawable { drawPath(currentGroup, childPath, canvas, w, h, filter); } } + canvas.restore(); } public void draw(Canvas canvas, int w, int h, ColorFilter filter) { |