diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2013-01-16 17:47:54 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2013-01-16 19:51:01 +0900 |
| commit | 84ce64f2c0255c25d8e697473b3c026d62cbe74d (patch) | |
| tree | 670704ca291713dafdf132100154d23e6c638535 /java/src/com/android/inputmethod/keyboard/internal/RoundedLine.java | |
| parent | 9579936bcf6bc5cecee315c5e40a30af77f47dfd (diff) | |
Fix bounding rectangle of gesture preview trail
Bug: 7917443
Bug: 7987585
Change-Id: I99e6db1fe43d3a9b497e92330a6857e0454c428c
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/internal/RoundedLine.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/RoundedLine.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/internal/RoundedLine.java b/java/src/com/android/inputmethod/keyboard/internal/RoundedLine.java index 1f5252077..cd6efc4b7 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/RoundedLine.java +++ b/java/src/com/android/inputmethod/keyboard/internal/RoundedLine.java @@ -15,6 +15,7 @@ package com.android.inputmethod.keyboard.internal; import android.graphics.Path; +import android.graphics.Rect; import android.graphics.RectF; public final class RoundedLine { @@ -100,4 +101,10 @@ public final class RoundedLine { mPath.close(); return mPath; } + + public void getBounds(final Rect outBounds) { + // Reuse mArc1 as working variable + mPath.computeBounds(mArc1, true /* unused */); + mArc1.roundOut(outBounds); + } } |
