/frameworks/base/core/tests/coretests/src/android/widget/ |
D | LabelView.java | 75 mTextPaint = new Paint(); in initLabelView() 76 mTextPaint.setAntiAlias(true); in initLabelView() 77 mTextPaint.setTextSize(16); in initLabelView() 78 mTextPaint.setColor(0xFF000000); in initLabelView() 101 mTextPaint.setTextSize(size); in setTextSize() 111 mTextPaint.setColor(color); in setTextColor() 140 result = (int) mTextPaint.measureText(mText) + mPaddingLeft in measureWidth() 161 mAscent = (int) mTextPaint.ascent(); in measureHeight() 167 result = (int) (-mAscent + mTextPaint.descent()) + mPaddingTop in measureHeight() 185 canvas.drawText(mText, mPaddingLeft, mPaddingTop - mAscent, mTextPaint); in onDraw() [all …]
|
/frameworks/base/core/tests/coretests/src/android/text/ |
D | LayoutTest.java | 61 private TextPaint mTextPaint; field in LayoutTest 65 mTextPaint = new TextPaint(); in setup() 76 new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, mAlign, mSpacingMult, mSpacingAdd); in testConstructor() 87 Layout layout = new MockLayout(text, mTextPaint, mWidth, in testGetText() 91 layout = new MockLayout(null, mTextPaint, mWidth, mAlign, mSpacingMult, mSpacingAdd); in testGetText() 97 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testGetPaint() 100 assertSame(mTextPaint, layout.getPaint()); in testGetPaint() 108 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 10, in testGetWidth() 112 layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 0, mAlign, mSpacingMult, mSpacingAdd); in testGetWidth() 118 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 15, in testGetEllipsizedWidth() [all …]
|
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/app/ |
D | PerfTimeline.java | 37 private TextPaint mTextPaint; field in PerfTimeline 81 mTextPaint = new TextPaint(); in init() 82 mTextPaint.setFlags(Paint.ANTI_ALIAS_FLAG); in init() 83 mTextPaint.setTextAlign(Paint.Align.LEFT); in init() 103 mTextPaint.setTextSize(mExampleDimension); in invalidateTextPaintAndMeasurements() 104 mTextPaint.setColor(mExampleColor); in invalidateTextPaintAndMeasurements() 105 mTextWidth = mTextPaint.measureText(mExampleString); in invalidateTextPaintAndMeasurements() 107 Paint.FontMetrics fontMetrics = mTextPaint.getFontMetrics(); in invalidateTextPaintAndMeasurements()
|
/frameworks/base/apct-tests/perftests/core/src/android/text/ |
D | PaintMeasureDrawPerfTest.java | 61 private final TextPaint mTextPaint; field in PaintMeasureDrawPerfTest 67 mTextPaint = new TextPaint(); in PaintMeasureDrawPerfTest() 68 mTextPaint.setTextSize(10); in PaintMeasureDrawPerfTest() 81 if (mCached) mTextPaint.measureText(text); in timeMeasure() 89 mTextPaint.measureText(text); in timeMeasure() 104 if (mCached) mTextPaint.measureText(text); in timeDraw() 115 canvas.drawText(text, 0 /*x*/, 100 /*y*/, mTextPaint); in timeDraw()
|
D | BoringLayoutIsBoringPerfTest.java | 68 private final TextPaint mTextPaint; field in BoringLayoutIsBoringPerfTest 76 mTextPaint = new TextPaint(); in BoringLayoutIsBoringPerfTest() 77 mTextPaint.setTextSize(10); in BoringLayoutIsBoringPerfTest() 90 if (mCached) BoringLayout.isBoring(text, mTextPaint); in timeIsBoring() 98 BoringLayout.isBoring(text, mTextPaint); in timeIsBoring()
|
D | BoringLayoutCreateDrawPerfTest.java | 69 private final TextPaint mTextPaint; field in BoringLayoutCreateDrawPerfTest 76 mTextPaint = new TextPaint(); in BoringLayoutCreateDrawPerfTest() 77 mTextPaint.setTextSize(10); in BoringLayoutCreateDrawPerfTest() 92 final BoringLayout.Metrics metrics = BoringLayout.isBoring(text, mTextPaint); in timeCreate() 116 final BoringLayout.Metrics metrics = BoringLayout.isBoring(text, mTextPaint); in timeDraw() 147 return BoringLayout.make(text, mTextPaint, Integer.MAX_VALUE /*width*/, in createLayout()
|
D | StaticLayoutCreateDrawPerfTest.java | 71 private final TextPaint mTextPaint; field in StaticLayoutCreateDrawPerfTest 78 mTextPaint = new TextPaint(); in StaticLayoutCreateDrawPerfTest() 79 mTextPaint.setTextSize(10); in StaticLayoutCreateDrawPerfTest() 137 return StaticLayout.Builder.obtain(text, 0 /*start*/, text.length() /*end*/, mTextPaint, in createLayout()
|
D | TextViewSetTextMeasurePerfTest.java | 72 private final TextPaint mTextPaint; field in TextViewSetTextMeasurePerfTest 79 mTextPaint = new TextPaint(); in TextViewSetTextMeasurePerfTest() 80 mTextPaint.setTextSize(10); in TextViewSetTextMeasurePerfTest()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | Watermark.java | 44 private final Paint mTextPaint; field in Watermark 89 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in Watermark() 90 mTextPaint.setTextSize(fontSize); in Watermark() 91 mTextPaint.setTypeface(Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD)); in Watermark() 93 FontMetricsInt fm = mTextPaint.getFontMetricsInt(); in Watermark() 94 mTextWidth = (int)mTextPaint.measureText(mText); in Watermark() 112 mTextPaint.setColor(color); in Watermark() 113 mTextPaint.setShadowLayer(shadowRadius, shadowDx, shadowDy, shadowColor); in Watermark() 172 c.drawText(mText, x, y, mTextPaint); in drawIfNeeded()
|
/frameworks/base/tests/WallpaperTest/src/com/example/wallpapertest/ |
D | TestWallpaper.java | 79 private final TextPaint mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); field in TestWallpaper.ClockEngine 106 TextPaint tpaint = mTextPaint; in onCreate() 113 mTextPaint.getFontMetrics(mTextMetrics); in onCreate() 231 x, y, mTextPaint); in drawFrame() 234 x, y, mTextPaint); in drawFrame() 237 x, y, mTextPaint); in drawFrame() 240 x, y, mTextPaint); in drawFrame() 243 x, y, mTextPaint); in drawFrame() 247 x, y, mTextPaint); in drawFrame() 251 x, y, mTextPaint); in drawFrame()
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | InternalSelectionView.java | 55 private Paint mTextPaint = new Paint(); field in InternalSelectionView 83 mTextPaint.setAntiAlias(true); in init() 84 mTextPaint.setTextSize(10); in init() 85 mTextPaint.setColor(Color.WHITE); in init() 164 mTextPaint.setAlpha(0xFF); in onDraw() 168 mTextPaint.setAlpha(0xF0); in onDraw() 178 rectTop + 2 - (int) mTextPaint.ascent(), in onDraw() 179 mTextPaint); in onDraw() local
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | SubtitleView.java | 62 private TextPaint mTextPaint; field in SubtitleView 128 mTextPaint = new TextPaint(); in SubtitleView() 129 mTextPaint.setAntiAlias(true); in SubtitleView() 130 mTextPaint.setSubpixelText(true); in SubtitleView() 185 if (mTextPaint.getTextSize() != size) { in setTextSize() 186 mTextPaint.setTextSize(size); in setTextSize() 197 if (mTextPaint.getTypeface() != typeface) { in setTypeface() 198 mTextPaint.setTypeface(typeface); in setTypeface() 259 mLayout = StaticLayout.Builder.obtain(mText, 0, mText.length(), mTextPaint, maxWidth) in computeMeasurements() 305 final Paint textPaint = mTextPaint; in onDraw()
|
D | PointerLocationView.java | 114 private final Paint mTextPaint; field in PointerLocationView 144 mTextPaint = new Paint(); in PointerLocationView() 145 mTextPaint.setAntiAlias(true); in PointerLocationView() 146 mTextPaint.setTextSize(10 in PointerLocationView() 148 mTextPaint.setARGB(255, 0, 0, 0); in PointerLocationView() 196 mTextPaint.getFontMetricsInt(mTextMetrics); in onMeasure() 239 .toString(), 1, base, mTextPaint); in onDraw() local 246 .toString(), 1 + itemW, base, mTextPaint); in onDraw() local 250 .toString(), 1 + itemW * 2, base, mTextPaint); in onDraw() local 259 .toString(), 1 + itemW, base, mTextPaint); in onDraw() local [all …]
|
D | MessagingLayout.java | 83 private Paint mTextPaint = new Paint(); field in MessagingLayout 123 mTextPaint.setTextAlign(Paint.Align.CENTER); in onFinishInflate() 124 mTextPaint.setAntiAlias(true); in onFinishInflate() 309 mTextPaint.setColor(needDarkText ? Color.BLACK : Color.WHITE); in createAvatarSymbol() 310 mTextPaint.setTextSize(symbol.length() == 1 ? mAvatarSize * 0.5f : mAvatarSize * 0.3f); in createAvatarSymbol() 311 int yPos = (int) (radius - ((mTextPaint.descent() + mTextPaint.ascent()) / 2)); in createAvatarSymbol() 312 canvas.drawText(symbol, radius, yPos, mTextPaint); in createAvatarSymbol()
|
/frameworks/support/v7/appcompat/src/main/java/androidx/appcompat/widget/ |
D | SwitchCompat.java | 170 private final TextPaint mTextPaint; field in SwitchCompat 217 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in SwitchCompat() 220 mTextPaint.density = res.getDisplayMetrics().density; in SwitchCompat() 313 if (ts != mTextPaint.getTextSize()) { in setSwitchTextAppearance() 314 mTextPaint.setTextSize(ts); in setSwitchTextAppearance() 372 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setSwitchTypeface() 373 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setSwitchTypeface() 375 mTextPaint.setFakeBoldText(false); in setSwitchTypeface() 376 mTextPaint.setTextSkewX(0); in setSwitchTypeface() 389 if ((mTextPaint.getTypeface() != null && !mTextPaint.getTypeface().equals(typeface)) in setSwitchTypeface() [all …]
|
/frameworks/base/core/java/android/widget/ |
D | Switch.java | 156 private TextPaint mTextPaint; field in Switch 224 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in Switch() 227 mTextPaint.density = res.getDisplayMetrics().density; in Switch() 228 mTextPaint.setCompatibilityScaling(res.getCompatibilityInfo().applicationScale); in Switch() 327 if (ts != mTextPaint.getTextSize()) { in setSwitchTextAppearance() 328 mTextPaint.setTextSize(ts); in setSwitchTextAppearance() 391 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setSwitchTypeface() 392 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setSwitchTypeface() 394 mTextPaint.setFakeBoldText(false); in setSwitchTypeface() 395 mTextPaint.setTextSkewX(0); in setSwitchTypeface() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/graph/ |
D | BatteryMeterDrawableBase.java | 51 protected final Paint mTextPaint; field in BatteryMeterDrawableBase 139 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in BatteryMeterDrawableBase() 141 mTextPaint.setTypeface(font); in BatteryMeterDrawableBase() 142 mTextPaint.setTextAlign(Paint.Align.CENTER); in BatteryMeterDrawableBase() 425 mTextPaint.setColor(getColorForLevel(level)); in draw() 426 mTextPaint.setTextSize(height * in draw() 429 mTextHeight = -mTextPaint.getFontMetrics().ascent; in draw() 436 mTextPaint.getTextPath(pctText, 0, pctText.length(), pctX, pctY, mTextPath); in draw() 460 c.drawText(pctText, pctX, pctY, mTextPaint); in draw()
|
/frameworks/support/emoji/core/src/main/java/androidx/emoji/text/ |
D | EmojiProcessor.java | 804 private final TextPaint mTextPaint; field in EmojiProcessor.GlyphChecker 807 mTextPaint = new TextPaint(); in GlyphChecker() 808 mTextPaint.setTextSize(PAINT_TEXT_SIZE); in GlyphChecker() 829 return PaintCompat.hasGlyph(mTextPaint, builder.toString()); in hasGlyph()
|
/frameworks/base/config/ |
D | hiddenapi-light-greylist.txt | 7348 Landroid/widget/TextView;->mTextPaint:Landroid/text/TextPaint;
|