Loading graphics/java/android/graphics/Paint.java +8 −6 Original line number Diff line number Diff line Loading @@ -1197,14 +1197,14 @@ public class Paint { return 0f; } if (!mHasCompatScaling) { return native_measureText(text, index, count); return (float) Math.ceil(native_measureText(text, index, count)); } final float oldSize = getTextSize(); setTextSize(oldSize*mCompatScaling); float w = native_measureText(text, index, count); setTextSize(oldSize); return w*mInvCompatScaling; return (float) Math.ceil(w*mInvCompatScaling); } private native float native_measureText(char[] text, int index, int count); Loading @@ -1229,14 +1229,14 @@ public class Paint { return 0f; } if (!mHasCompatScaling) { return native_measureText(text, start, end); return (float) Math.ceil(native_measureText(text, start, end)); } final float oldSize = getTextSize(); setTextSize(oldSize*mCompatScaling); float w = native_measureText(text, start, end); setTextSize(oldSize); return w*mInvCompatScaling; return (float) Math.ceil(w*mInvCompatScaling); } private native float native_measureText(String text, int start, int end); Loading @@ -1256,12 +1256,14 @@ public class Paint { return 0f; } if (!mHasCompatScaling) return native_measureText(text); if (!mHasCompatScaling) { return (float) Math.ceil(native_measureText(text)); } final float oldSize = getTextSize(); setTextSize(oldSize*mCompatScaling); float w = native_measureText(text); setTextSize(oldSize); return w*mInvCompatScaling; return (float) Math.ceil(w*mInvCompatScaling); } private native float native_measureText(String text); Loading Loading
graphics/java/android/graphics/Paint.java +8 −6 Original line number Diff line number Diff line Loading @@ -1197,14 +1197,14 @@ public class Paint { return 0f; } if (!mHasCompatScaling) { return native_measureText(text, index, count); return (float) Math.ceil(native_measureText(text, index, count)); } final float oldSize = getTextSize(); setTextSize(oldSize*mCompatScaling); float w = native_measureText(text, index, count); setTextSize(oldSize); return w*mInvCompatScaling; return (float) Math.ceil(w*mInvCompatScaling); } private native float native_measureText(char[] text, int index, int count); Loading @@ -1229,14 +1229,14 @@ public class Paint { return 0f; } if (!mHasCompatScaling) { return native_measureText(text, start, end); return (float) Math.ceil(native_measureText(text, start, end)); } final float oldSize = getTextSize(); setTextSize(oldSize*mCompatScaling); float w = native_measureText(text, start, end); setTextSize(oldSize); return w*mInvCompatScaling; return (float) Math.ceil(w*mInvCompatScaling); } private native float native_measureText(String text, int start, int end); Loading @@ -1256,12 +1256,14 @@ public class Paint { return 0f; } if (!mHasCompatScaling) return native_measureText(text); if (!mHasCompatScaling) { return (float) Math.ceil(native_measureText(text)); } final float oldSize = getTextSize(); setTextSize(oldSize*mCompatScaling); float w = native_measureText(text); setTextSize(oldSize); return w*mInvCompatScaling; return (float) Math.ceil(w*mInvCompatScaling); } private native float native_measureText(String text); Loading