summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/Rect.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/Rect.java b/graphics/java/android/graphics/Rect.java
index 2005344..dda37e5 100644
--- a/graphics/java/android/graphics/Rect.java
+++ b/graphics/java/android/graphics/Rect.java
@@ -517,4 +517,17 @@ public final class Rect implements Parcelable {
right = in.readInt();
bottom = in.readInt();
}
+
+ /**
+ * Scales up the rect by the given scale.
+ * @hide
+ */
+ public void scale(float scale) {
+ if (scale != 1.0f) {
+ left *= scale;
+ top *= scale;
+ right *= scale;
+ bottom*= scale;
+ }
+ }
}