Home
last modified time | relevance | path

Searched refs:measureText (Results 1 – 25 of 46) sorted by relevance

12

/frameworks/base/core/tests/coretests/src/android/graphics/
DTypefaceSystemFallbackTest.java99 GLYPH_3EM_WIDTH = paint.measureText("a");
100 GLYPH_1EM_WIDTH = paint.measureText("b");
103 GLYPH_2EM_WIDTH = paint.measureText("a");
271 assertEquals(GLYPH_3EM_WIDTH, paint.measureText("a"), 0.0f); in testBuildSystemFallback_NamedFamily()
272 assertEquals(GLYPH_1EM_WIDTH, paint.measureText("b"), 0.0f); in testBuildSystemFallback_NamedFamily()
273 assertEquals(GLYPH_1EM_WIDTH, paint.measureText("c"), 0.0f); in testBuildSystemFallback_NamedFamily()
278 assertEquals(GLYPH_1EM_WIDTH, paint.measureText("a"), 0.0f); in testBuildSystemFallback_NamedFamily()
279 assertEquals(GLYPH_3EM_WIDTH, paint.measureText("b"), 0.0f); in testBuildSystemFallback_NamedFamily()
280 assertEquals(GLYPH_1EM_WIDTH, paint.measureText("c"), 0.0f); in testBuildSystemFallback_NamedFamily()
285 assertEquals(GLYPH_1EM_WIDTH, paint.measureText("a"), 0.0f); in testBuildSystemFallback_NamedFamily()
[all …]
DPaintTest.java208 assertEquals(advance, p.measureText(str, start, end), 1.0f); in assertGetTextRunAdvances()
279 float width = p.measureText(bidiText, 0, 4); in testMeasureTextBidi()
281 width += p.measureText(bidiText, 4, 7); in testMeasureTextBidi()
283 width += p.measureText(bidiText, 7, bidiText.length()); in testMeasureTextBidi()
284 assertEquals(width, p.measureText(bidiText), 1.0f); in testMeasureTextBidi()
289 float width = p.measureText(bidiText, 0, 4); in testMeasureTextBidi()
290 width += p.measureText(bidiText, 4, 7); in testMeasureTextBidi()
291 width += p.measureText(bidiText, 7, bidiText.length()); in testMeasureTextBidi()
292 assertEquals(width, p.measureText(bidiText), 1.0f); in testMeasureTextBidi()
297 float width = p.measureText(bidiText, 0, 4); in testMeasureTextBidi()
[all …]
DTypefaceTest.java214 assertEquals(measureText(original, "hello"), measureText(copied, "hello"), 1e-6); in testSerialize()
252 private static float measureText(Typeface typeface, String text) { in measureText() method in TypefaceTest
255 return paint.measureText(text); in measureText()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ongoingcall/
DOngoingCallChronometerTest.kt59 val initialTextLength = textView.paint.measureText(INITIAL_TEXT) in verifyTextSizes()
60 val largeTextLength = textView.paint.measureText(LARGE_TEXT) in verifyTextSizes()
61 val xlTextLength = textView.paint.measureText(XL_TEXT) in verifyTextSizes()
67 assertThat(textView.paint.measureText(doesNotFitText)).isGreaterThan(TEXT_VIEW_MAX_WIDTH) in verifyTextSizes()
174 while (textView.paint.measureText(currentText) <= TEXT_VIEW_MAX_WIDTH) { in calculateDoesNotFixText()
/frameworks/base/apct-tests/perftests/core/src/android/text/
DPaintMeasureDrawPerfTest.java82 if (mCached) mTextPaint.measureText(text); in timeMeasure()
90 mTextPaint.measureText(text); in timeMeasure()
105 if (mCached) mTextPaint.measureText(text); in timeDraw()
/frameworks/base/apct-tests/perftests/core/src/android/graphics/perftests/
DPaintMeasureTextTest.java78 paint.measureText(mText); in testMeasureTextPerf()
90 paint.measureText(mText); in testMeasureTextPerf()
/frameworks/layoutlib/bridge/src/android/graphics/text/
DMeasuredText_Builder_Delegate.java105 private static float measureText(long nativePaint, char[] text, int index, int count, in measureText() method in MeasuredText_Builder_Delegate
127 measureText(mNativePaint, builder.mText, mStart, mEnd - mStart, builder.mWidths, in addTo()
/frameworks/base/core/java/android/text/
DGraphicsOperations.java45 float measureText(int start, int end, Paint p); in measureText() method
/frameworks/base/libs/hwui/hwui/
DMinikinUtils.cpp85 float MinikinUtils::measureText(const Paint* paint, minikin::Bidi bidiFlags, in measureText() function in android::MinikinUtils
94 return minikin::Layout::measureText(textBuf, range, bidiFlags, minikinPaint, startHyphen, in measureText()
DMinikinUtils.h54 static float measureText(const Paint* paint, minikin::Bidi bidiFlags,
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
DQSDualTileLabel.java162 float width = mFirstLine.getPaint().measureText(mText); in updateText()
174 width = mFirstLine.getPaint().measureText(mText.substring(0, i)); in updateText()
/frameworks/base/graphics/java/android/graphics/
DPaint.java2213 public float measureText(char[] text, int index, int count) { in measureText() method in Paint
2245 public float measureText(String text, int start, int end) { in measureText() method in Paint
2274 public float measureText(String text) { in measureText() method in Paint
2278 return measureText(text, 0, text.length()); in measureText()
2289 public float measureText(CharSequence text, int start, int end) { in measureText() method in Paint
2301 return measureText((String)text, start, end); in measureText()
2305 return measureText(text.toString(), start, end); in measureText()
2308 return ((GraphicsOperations)text).measureText(start, end, this); in measureText()
2313 float result = measureText(buf, 0, end - start); in measureText()
/frameworks/base/core/tests/coretests/src/android/widget/
DLabelView.java140 result = (int) mTextPaint.measureText(mText) + mPaddingLeft in measureWidth()
DTextViewTest.java114 float wordWidth = paint.measureText(word, 0, word.length()); in testHyphenationWidth()
146 float withoutHyphenLength = paint.measureText(sb, start, end); in testHyphenationWidth()
DTextViewFallbackLineSpacingTest.java105 final int em = (int) Math.ceil(textView.getPaint().measureText("a")); in testFallbackLineSpacing()
/frameworks/rs/
DrsScriptC_LibGL.cpp247 rsc->mStateFont.measureText(text, textLen, &metrics); in rsrMeasureTextAlloc()
256 rsc->mStateFont.measureText(text, textLen, &metrics); in rsrMeasureText()
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/app/
DPerfTimeline.java105 mTextWidth = mTextPaint.measureText(mExampleString); in invalidateTextPaintAndMeasurements()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DScaledTextActivity.java132 float width = mPaint.measureText(TEXT); in onDraw()
/frameworks/minikin/include/minikin/
DLayout.h79 static float measureText(const U16StringPiece& str, const Range& range, Bidi bidiFlags,
/frameworks/layoutlib/bridge/src/android/graphics/
DPaint_Delegate.java662 RectF bounds = delegate.measureText(text, start, end - start + 1, null, 0, bidiFlags); in nBreakText()
967 RectF bounds = delegate.measureText(text, index, count, advances, advancesIndex, bidiFlags); in nGetTextAdvances()
1034 delegate.measureText(text, index, count, null, 0, bidiFlags).roundOut(bounds); in nGetCharArrayBounds()
1325 /*package*/ RectF measureText(char[] text, int index, int count, float[] advances, in measureText() method in Paint_Delegate
1331 /*package*/ RectF measureText(char[] text, int index, int count, float[] advances, in measureText() method in Paint_Delegate
/frameworks/base/core/tests/coretests/src/android/text/
DTextUtilsTest.java340 assertTrue("wid " + i + " pass " + j, p.measureText(out1) <= i); in testEllipsize()
343 assertTrue("wid " + i + " pass " + j, p.measureText(keep1) == p.measureText(out1)); in testEllipsize()
351 final float wordWidth = paint.measureText("MMMM"); in testEllipsize_multiCodepoint()
DStaticLayoutTest.java558 final float textWidth = mDefaultPaint.measureText(text); in testEllipsis_singleLine()
593 final float textWidth = mDefaultPaint.measureText(text); in testEllipsis_singleLine()
608 final float textWidth = mDefaultPaint.measureText(text); in testEllipsis_singleLine()
736 final float wordWidth = paint.measureText(longWord); in testLocaleSpanAffectsHyphenation()
/frameworks/base/tests/SurfaceComposition/src/android/surfacecomposition/
DCustomSurfaceView.java138 int textWidth = (int)(paint.measureText(mName) + 0.5f); in invalidateSurface()
/frameworks/minikin/tests/unittest/
DLayoutTest.cpp451 EXPECT_EQ(1.0f, Layout::measureText(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
461 EXPECT_EQ(6.0f, Layout::measureText(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
473 Layout::measureText(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
/frameworks/base/libs/hwui/jni/
DPaint.cpp107 MinikinUtils::measureText(&paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, in breakText()
198 const float advance = MinikinUtils::measureText(paint, in doTextAdvances()
237 MinikinUtils::measureText(paint, bidiFlags, typeface, text, start, count, start + count, in doTextRunCursor()
503 return MinikinUtils::measureText(paint, bidiFlags, typeface, buf, start, count, in doRunAdvance()
507 MinikinUtils::measureText(paint, bidiFlags, typeface, buf, start, count, bufSize, in doRunAdvance()
527 MinikinUtils::measureText(paint, bidiFlags, typeface, buf, start, count, bufSize, in doOffsetForAdvance()

12