diff options
author | Chris Craik <ccraik@google.com> | 2014-11-13 22:46:20 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-13 22:46:22 +0000 |
commit | 6b3bf0ceef92d1a627360c6502f52f0237f7e50a (patch) | |
tree | cde76cb60763cc64dee3c02ba7005e35bfb08da4 /graphics/java | |
parent | 24859ba016f740c16113e04271ebe6b3eb61a241 (diff) | |
parent | 0e12fa12cb2cd4e049e560bdad8f1cd654825f3b (diff) | |
download | frameworks_base-6b3bf0ceef92d1a627360c6502f52f0237f7e50a.zip frameworks_base-6b3bf0ceef92d1a627360c6502f52f0237f7e50a.tar.gz frameworks_base-6b3bf0ceef92d1a627360c6502f52f0237f7e50a.tar.bz2 |
Merge "Add offset method to Outline" into lmp-mr1-dev
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/Outline.java | 11 | ||||
-rw-r--r-- | graphics/java/android/graphics/Path.java | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/Outline.java b/graphics/java/android/graphics/Outline.java index 4bf0b71..f76184f 100644 --- a/graphics/java/android/graphics/Outline.java +++ b/graphics/java/android/graphics/Outline.java @@ -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); + } + } } diff --git a/graphics/java/android/graphics/Path.java b/graphics/java/android/graphics/Path.java index c40a66d..0e9823d 100644 --- a/graphics/java/android/graphics/Path.java +++ b/graphics/java/android/graphics/Path.java @@ -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 |