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

Commit 0e12fa12 authored by Chris Craik's avatar Chris Craik
Browse files

Add offset method to Outline

Also clean up offset docs in Path

Change-Id: Ieca02611d32acce726efba652ae1969340a55a76
parent 6c912b7d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10928,6 +10928,7 @@ package android.graphics {
    method public boolean canClip();
    method public float getAlpha();
    method public boolean isEmpty();
    method public void offset(int, int);
    method public void set(android.graphics.Outline);
    method public void setAlpha(float);
    method public void setConvexPath(android.graphics.Path);
+11 −0
Original line number Diff line number Diff line
@@ -221,4 +221,15 @@ public final class Outline {
        mRect = null;
        mRadius = -1.0f;
    }

    /**
     * Offsets the Outline by (dx,dy)
     */
    public void offset(int dx, int dy) {
        if (mRect != null) {
            mRect.offset(dx, dy);
        } else if (mPath != null) {
            mPath.offset(dx, dy);
        }
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -678,7 +678,7 @@ public class Path {
    }

    /**
     * Offset the path by (dx,dy), returning true on success
     * Offset the path by (dx,dy)
     *
     * @param dx  The amount in the X direction to offset the entire path
     * @param dy  The amount in the Y direction to offset the entire path
@@ -695,7 +695,7 @@ public class Path {
    }

    /**
     * Offset the path by (dx,dy), returning true on success
     * Offset the path by (dx,dy)
     *
     * @param dx The amount in the X direction to offset the entire path
     * @param dy The amount in the Y direction to offset the entire path