summaryrefslogtreecommitdiffstats
path: root/graphics/java
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-11-13 22:46:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-11-13 22:46:22 +0000
commit6b3bf0ceef92d1a627360c6502f52f0237f7e50a (patch)
treecde76cb60763cc64dee3c02ba7005e35bfb08da4 /graphics/java
parent24859ba016f740c16113e04271ebe6b3eb61a241 (diff)
parent0e12fa12cb2cd4e049e560bdad8f1cd654825f3b (diff)
downloadframeworks_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.java11
-rw-r--r--graphics/java/android/graphics/Path.java4
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