Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a880611 authored by ztenghui's avatar ztenghui Committed by Android (Google) Code Review
Browse files

Merge "Limit the scope of clip path to the group, not global"

parents 96798efe 054a17ca
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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) {
+24 −16
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:height="64dp"
        android:width="64dp"
    android:viewportHeight="12.25"
        android:viewportWidth="7.30625" >
    android:viewportWidth="7.30625"
    android:width="64dp" >

    <group
        android:pivotX="3.65"
@@ -31,8 +31,11 @@
                l 0, 12.25
                l-7.3, 0
                z" />
    </group>
    <group>

        <group
            android:pivotX="3.65"
            android:pivotY="6.125"
            android:rotation="30" >
            <path
                android:name="one"
                android:fillColor="#ff88ff"
@@ -40,6 +43,7 @@
                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>
    <group
        android:pivotX="3.65"
        android:pivotY="6.125"
@@ -52,8 +56,11 @@
                l 0, 6.125
                l-7.3, 0
                z" />
    </group>
    <group>

        <group
            android:pivotX="3.65"
            android:pivotY="6.125"
            android:rotation="30" >
            <path
                android:name="two"
                android:fillColor="#ff88ff"
@@ -67,5 +74,6 @@
                        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>
    </group>

</vector>
 No newline at end of file