summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui/StringTexture.java
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2012-02-11 07:19:47 +0800
committerChih-Chung Chang <chihchung@google.com>2012-02-11 10:21:58 +0800
commit4e05190c04eab6f4700c557ae488f3d7e344d29c (patch)
tree824dcc1b3ea982629a6d9e2e3517f0c7790fdd7f /src/com/android/gallery3d/ui/StringTexture.java
parent3d2225f6b0ff7f65620feaa283415a045718ffeb (diff)
downloadandroid_packages_apps_Snap-4e05190c04eab6f4700c557ae488f3d7e344d29c.tar.gz
android_packages_apps_Snap-4e05190c04eab6f4700c557ae488f3d7e344d29c.tar.bz2
android_packages_apps_Snap-4e05190c04eab6f4700c557ae488f3d7e344d29c.zip
Use FloatMath instead of Math.
Change-Id: I41661b231f6c034dbca6af26d5950eda6c5fc7da
Diffstat (limited to 'src/com/android/gallery3d/ui/StringTexture.java')
-rw-r--r--src/com/android/gallery3d/ui/StringTexture.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/ui/StringTexture.java b/src/com/android/gallery3d/ui/StringTexture.java
index f576c0172..935cd729e 100644
--- a/src/com/android/gallery3d/ui/StringTexture.java
+++ b/src/com/android/gallery3d/ui/StringTexture.java
@@ -21,6 +21,7 @@ import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint.FontMetricsInt;
import android.graphics.Typeface;
+import android.util.FloatMath;
import android.text.TextPaint;
import android.text.TextUtils;
@@ -69,7 +70,7 @@ class StringTexture extends CanvasTexture {
private static StringTexture newInstance(String text, TextPaint paint) {
FontMetricsInt metrics = paint.getFontMetricsInt();
- int width = (int) Math.ceil(paint.measureText(text));
+ int width = (int) FloatMath.ceil(paint.measureText(text));
int height = metrics.bottom - metrics.top;
// The texture size needs to be at least 1x1.
if (width <= 0) width = 1;