summaryrefslogtreecommitdiffstats
path: root/core/jni/android/graphics
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-09-28 17:33:54 -0700
committerDianne Hackborn <hackbod@google.com>2009-09-28 17:33:54 -0700
commitafa78967b8553443aa32579d78970a076d7581f6 (patch)
tree5ba752438ef737e3b2a140b6fb42bd0bd6661091 /core/jni/android/graphics
parentebd45e5ca9690110ecb50c26b0b791054ee4c0ef (diff)
downloadframeworks_base-afa78967b8553443aa32579d78970a076d7581f6.zip
frameworks_base-afa78967b8553443aa32579d78970a076d7581f6.tar.gz
frameworks_base-afa78967b8553443aa32579d78970a076d7581f6.tar.bz2
Hack to fix issue #2125365: Sports Trivia compatability with Eclair
Adds a mechanism to tell Paint the scaling factor its target canvas will have, for it to compute font metrics based on the correct font size. Only TextView uses this, but that is enough for the large majority of apps. Change-Id: I6cacaa0dd26d40ee3ad959bed0028678d6e9016e
Diffstat (limited to 'core/jni/android/graphics')
-rw-r--r--core/jni/android/graphics/Paint.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp
index 6b7f045..780badc 100644
--- a/core/jni/android/graphics/Paint.cpp
+++ b/core/jni/android/graphics/Paint.cpp
@@ -569,11 +569,11 @@ static JNINativeMethod methods[] = {
{"descent","()F", (void*) SkPaintGlue::descent},
{"getFontMetrics", "(Landroid/graphics/Paint$FontMetrics;)F", (void*)SkPaintGlue::getFontMetrics},
{"getFontMetricsInt", "(Landroid/graphics/Paint$FontMetricsInt;)I", (void*)SkPaintGlue::getFontMetricsInt},
- {"measureText","([CII)F", (void*) SkPaintGlue::measureText_CII},
- {"measureText","(Ljava/lang/String;)F", (void*) SkPaintGlue::measureText_String},
- {"measureText","(Ljava/lang/String;II)F", (void*) SkPaintGlue::measureText_StringII},
- {"breakText","([CIIF[F)I", (void*) SkPaintGlue::breakTextC},
- {"breakText","(Ljava/lang/String;ZF[F)I", (void*) SkPaintGlue::breakTextS},
+ {"native_measureText","([CII)F", (void*) SkPaintGlue::measureText_CII},
+ {"native_measureText","(Ljava/lang/String;)F", (void*) SkPaintGlue::measureText_String},
+ {"native_measureText","(Ljava/lang/String;II)F", (void*) SkPaintGlue::measureText_StringII},
+ {"native_breakText","([CIIF[F)I", (void*) SkPaintGlue::breakTextC},
+ {"native_breakText","(Ljava/lang/String;ZF[F)I", (void*) SkPaintGlue::breakTextS},
{"native_getTextWidths","(I[CII[F)I", (void*) SkPaintGlue::getTextWidths___CII_F},
{"native_getTextWidths","(ILjava/lang/String;II[F)I", (void*) SkPaintGlue::getTextWidths__StringII_F},
{"native_getTextPath","(I[CIIFFI)V", (void*) SkPaintGlue::getTextPath___CIIFFPath},