* commit 'c3784c4d6140517a6927685f552fa8719353e46f': Add offset method to Outline
This commit is contained in:
@@ -10933,6 +10933,7 @@ package android.graphics {
|
|||||||
method public boolean canClip();
|
method public boolean canClip();
|
||||||
method public float getAlpha();
|
method public float getAlpha();
|
||||||
method public boolean isEmpty();
|
method public boolean isEmpty();
|
||||||
|
method public void offset(int, int);
|
||||||
method public void set(android.graphics.Outline);
|
method public void set(android.graphics.Outline);
|
||||||
method public void setAlpha(float);
|
method public void setAlpha(float);
|
||||||
method public void setConvexPath(android.graphics.Path);
|
method public void setConvexPath(android.graphics.Path);
|
||||||
|
|||||||
@@ -221,4 +221,15 @@ public final class Outline {
|
|||||||
mRect = null;
|
mRect = null;
|
||||||
mRadius = -1.0f;
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 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
|
* @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 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
|
* @param dy The amount in the Y direction to offset the entire path
|
||||||
|
|||||||
Reference in New Issue
Block a user