Home
last modified time | relevance | path

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

12

/frameworks/base/core/tests/coretests/src/android/graphics/
DTypefaceSystemFallbackTest.java95 GLYPH_3EM_WIDTH = paint.measureText("a");
96 GLYPH_1EM_WIDTH = paint.measureText("b");
99 GLYPH_2EM_WIDTH = paint.measureText("a");
230 assertEquals(GLYPH_3EM_WIDTH, paint.measureText("a"), 0.0f); in testBuildSystemFallback_NamedFamily()
231 assertEquals(GLYPH_1EM_WIDTH, paint.measureText("b"), 0.0f); in testBuildSystemFallback_NamedFamily()
232 assertEquals(GLYPH_1EM_WIDTH, paint.measureText("c"), 0.0f); in testBuildSystemFallback_NamedFamily()
237 assertEquals(GLYPH_1EM_WIDTH, paint.measureText("a"), 0.0f); in testBuildSystemFallback_NamedFamily()
238 assertEquals(GLYPH_3EM_WIDTH, paint.measureText("b"), 0.0f); in testBuildSystemFallback_NamedFamily()
239 assertEquals(GLYPH_1EM_WIDTH, paint.measureText("c"), 0.0f); in testBuildSystemFallback_NamedFamily()
244 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 …]
/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/libs/hwui/hwui/
DMinikinUtils.cpp72 float MinikinUtils::measureText(const Paint* paint, minikin::Bidi bidiFlags, in measureText() function in android::MinikinUtils
81 return minikin::Layout::measureText(textBuf, range, bidiFlags, minikinPaint, startHyphen, in measureText()
DMinikinUtils.h51 ANDROID_API static float measureText(const Paint* paint, minikin::Bidi bidiFlags,
/frameworks/base/core/java/android/text/
DGraphicsOperations.java45 float measureText(int start, int end, Paint p); in measureText() method
/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.java2167 public float measureText(char[] text, int index, int count) { in measureText() method in Paint
2199 public float measureText(String text, int start, int end) { in measureText() method in Paint
2228 public float measureText(String text) { in measureText() method in Paint
2232 return measureText(text, 0, text.length()); in measureText()
2243 public float measureText(CharSequence text, int start, int end) { in measureText() method in Paint
2255 return measureText((String)text, start, end); in measureText()
2259 return measureText(text.toString(), start, end); in measureText()
2262 return ((GraphicsOperations)text).measureText(start, end, this); in measureText()
2267 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()
DTextViewFallbackLineSpacingTest.java105 final int em = (int) Math.ceil(textView.getPaint().measureText("a")); in testFallbackLineSpacing()
DTextViewTest.java189 float wordWidth = paint.measureText(word, 0, word.length()); in testHyphenationWidth()
221 float withoutHyphenLength = paint.measureText(sb, start, end); in testHyphenationWidth()
/frameworks/rs/
DrsScriptC_LibGL.cpp247 rsc->mStateFont.measureText(text, textLen, &metrics); in rsrMeasureTextAlloc()
256 rsc->mStateFont.measureText(text, textLen, &metrics); in rsrMeasureText()
/frameworks/minikin/tests/unittest/
DLayoutTest.cpp432 EXPECT_EQ(1.0f, Layout::measureText(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
442 EXPECT_EQ(6.0f, Layout::measureText(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
454 Layout::measureText(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/app/
DPerfTimeline.java105 mTextWidth = mTextPaint.measureText(mExampleString); in invalidateTextPaintAndMeasurements()
/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/tests/HwAccelerationTest/src/com/android/test/hwui/
DScaledTextActivity.java132 float width = mPaint.measureText(TEXT); in onDraw()
/frameworks/base/core/tests/coretests/src/android/text/
DTextUtilsTest.java338 assertTrue("wid " + i + " pass " + j, p.measureText(out1) <= i); in testEllipsize()
341 assertTrue("wid " + i + " pass " + j, p.measureText(keep1) == p.measureText(out1)); in testEllipsize()
349 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()
DStaticLayoutDirectionsTest.java138 float width = b.paint.measureText(b.text, 0, 5); // exclude 'c' in testTrailingWhitespace()
/frameworks/minikin/include/minikin/
DLayout.h79 static float measureText(const U16StringPiece& str, const Range& range, Bidi bidiFlags,
/frameworks/base/tests/SurfaceComposition/src/android/surfacecomposition/
DCustomSurfaceView.java138 int textWidth = (int)(paint.measureText(mName) + 0.5f); in invalidateSurface()
/frameworks/base/core/jni/android/graphics/
DPaint.cpp122 MinikinUtils::measureText(&paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, in breakText()
213 const float advance = MinikinUtils::measureText(paint, in doTextAdvances()
252 MinikinUtils::measureText(paint, bidiFlags, typeface, text, start, count, start + count, in doTextRunCursor()
523 return MinikinUtils::measureText(paint, bidiFlags, typeface, buf, start, count, in doRunAdvance()
527 MinikinUtils::measureText(paint, bidiFlags, typeface, buf, start, count, bufSize, in doRunAdvance()
547 MinikinUtils::measureText(paint, bidiFlags, typeface, buf, start, count, bufSize, in doOffsetForAdvance()
/frameworks/minikin/libs/minikin/
DLayout.cpp60 float Layout::measureText(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags, in measureText() function in minikin::Layout

12