Home
last modified time | relevance | path

Searched refs:mTextPaint (Results 1 – 20 of 20) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/widget/
DLabelView.java75 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 …]
DInternalSelectionView.java53 private Paint mTextPaint = new Paint(); field in InternalSelectionView
81 mTextPaint.setAntiAlias(true); in init()
82 mTextPaint.setTextSize(10); in init()
83 mTextPaint.setColor(Color.WHITE); in init()
162 mTextPaint.setAlpha(0xFF); in onDraw()
166 mTextPaint.setAlpha(0xF0); in onDraw()
176 rectTop + 2 - (int) mTextPaint.ascent(), in onDraw()
177 mTextPaint); in onDraw() local
/frameworks/base/core/tests/coretests/src/android/text/
DLayoutTest.java83 private TextPaint mTextPaint; field in LayoutTest
87 mTextPaint = new TextPaint(); in setup()
98 new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, mAlign, mSpacingMult, mSpacingAdd); in testConstructor()
109 Layout layout = new MockLayout(text, mTextPaint, mWidth, in testGetText()
113 layout = new MockLayout(null, mTextPaint, mWidth, mAlign, mSpacingMult, mSpacingAdd); in testGetText()
119 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testGetPaint()
122 assertSame(mTextPaint, layout.getPaint()); in testGetPaint()
130 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 10, in testGetWidth()
134 layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 0, mAlign, mSpacingMult, mSpacingAdd); in testGetWidth()
140 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 15, in testGetEllipsizedWidth()
[all …]
DLayoutBidiCursorPathTest.java46 private TextPaint mTextPaint; field in LayoutBidiCursorPathTest
53 mTextPaint = new TextPaint(); in setup()
54 mTextPaint.setTypeface( in setup()
56 mTextPaint.setTextSize(BIDI_TEXT_SIZE); in setup()
161 mBidiText, 0, mBidiText.length(), mTextPaint, Integer.MAX_VALUE) in setupLayoutAndGetCursorPath()
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/app/
DPerfTimeline.java37 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/
DPaintMeasureDrawPerfTest.java62 private final TextPaint mTextPaint; field in PaintMeasureDrawPerfTest
68 mTextPaint = new TextPaint(); in PaintMeasureDrawPerfTest()
69 mTextPaint.setTextSize(10); in PaintMeasureDrawPerfTest()
82 if (mCached) mTextPaint.measureText(text); in timeMeasure()
90 mTextPaint.measureText(text); in timeMeasure()
105 if (mCached) mTextPaint.measureText(text); in timeDraw()
116 canvas.drawText(text, 0 /*x*/, 100 /*y*/, mTextPaint); in timeDraw()
DBoringLayoutIsBoringPerfTest.java69 private final TextPaint mTextPaint; field in BoringLayoutIsBoringPerfTest
77 mTextPaint = new TextPaint(); in BoringLayoutIsBoringPerfTest()
78 mTextPaint.setTextSize(10); in BoringLayoutIsBoringPerfTest()
91 if (mCached) BoringLayout.isBoring(text, mTextPaint); in timeIsBoring()
99 BoringLayout.isBoring(text, mTextPaint); in timeIsBoring()
DBoringLayoutCreateDrawPerfTest.java70 private final TextPaint mTextPaint; field in BoringLayoutCreateDrawPerfTest
77 mTextPaint = new TextPaint(); in BoringLayoutCreateDrawPerfTest()
78 mTextPaint.setTextSize(10); in BoringLayoutCreateDrawPerfTest()
93 final BoringLayout.Metrics metrics = BoringLayout.isBoring(text, mTextPaint); in timeCreate()
117 final BoringLayout.Metrics metrics = BoringLayout.isBoring(text, mTextPaint); in timeDraw()
148 return BoringLayout.make(text, mTextPaint, Integer.MAX_VALUE /*width*/, in createLayout()
DStaticLayoutCreateDrawPerfTest.java72 private final TextPaint mTextPaint; field in StaticLayoutCreateDrawPerfTest
79 mTextPaint = new TextPaint(); in StaticLayoutCreateDrawPerfTest()
80 mTextPaint.setTextSize(10); in StaticLayoutCreateDrawPerfTest()
138 return StaticLayout.Builder.obtain(text, 0 /*start*/, text.length() /*end*/, mTextPaint, in createLayout()
DTextViewSetTextMeasurePerfTest.java75 private final TextPaint mTextPaint; field in TextViewSetTextMeasurePerfTest
82 mTextPaint = new TextPaint(); in TextViewSetTextMeasurePerfTest()
83 mTextPaint.setTextSize(10); in TextViewSetTextMeasurePerfTest()
/frameworks/base/services/core/java/com/android/server/wm/
DWatermark.java43 private final Paint mTextPaint; field in Watermark
87 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in Watermark()
88 mTextPaint.setTextSize(fontSize); in Watermark()
89 mTextPaint.setTypeface(Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD)); in Watermark()
91 FontMetricsInt fm = mTextPaint.getFontMetricsInt(); in Watermark()
92 mTextWidth = (int)mTextPaint.measureText(mText); in Watermark()
110 mTextPaint.setColor(color); in Watermark()
111 mTextPaint.setShadowLayer(shadowRadius, shadowDx, shadowDy, shadowColor); in Watermark()
176 c.drawText(mText, x, y, mTextPaint); in drawIfNeeded()
/frameworks/base/tests/WallpaperTest/src/com/example/wallpapertest/
DTestWallpaper.java79 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/java/com/android/internal/widget/
DSubtitleView.java62 private TextPaint mTextPaint; field in SubtitleView
129 mTextPaint = new TextPaint(); in SubtitleView()
130 mTextPaint.setAntiAlias(true); in SubtitleView()
131 mTextPaint.setSubpixelText(true); in SubtitleView()
186 if (mTextPaint.getTextSize() != size) { in setTextSize()
187 mTextPaint.setTextSize(size); in setTextSize()
198 if (mTextPaint.getTypeface() != typeface) { in setTypeface()
199 mTextPaint.setTypeface(typeface); in setTypeface()
260 mLayout = StaticLayout.Builder.obtain(mText, 0, mText.length(), mTextPaint, maxWidth) in computeMeasurements()
306 final Paint textPaint = mTextPaint; in onDraw()
DPeopleHelper.java64 private Paint mTextPaint = new Paint(); field in PeopleHelper
72 mTextPaint.setTextAlign(Paint.Align.CENTER); in init()
73 mTextPaint.setAntiAlias(true); in init()
126 mTextPaint.setColor(needDarkText ? Color.BLACK : Color.WHITE); in createAvatarSymbol()
127 mTextPaint.setTextSize(symbol.length() == 1 ? mAvatarSize * 0.5f : mAvatarSize * 0.3f); in createAvatarSymbol()
128 int yPos = (int) (radius - ((mTextPaint.descent() + mTextPaint.ascent()) / 2)); in createAvatarSymbol()
129 canvas.drawText(symbol, radius, yPos, mTextPaint); in createAvatarSymbol()
DPointerLocationView.java130 private final Paint mTextPaint; field in PointerLocationView
175 mTextPaint = new Paint(); in PointerLocationView()
176 mTextPaint.setAntiAlias(true); in PointerLocationView()
177 mTextPaint.setARGB(255, 0, 0, 0); in PointerLocationView()
258 mTextPaint.getFontMetricsInt(mTextMetrics); in onMeasure()
425 .toString(), 1, base, mTextPaint); in drawLabels() local
433 .toString(), 1 + itemW, base, mTextPaint); in drawLabels() local
438 .toString(), 1 + itemW * 2, base, mTextPaint); in drawLabels() local
447 .toString(), 1 + itemW, base, mTextPaint); in drawLabels() local
453 .toString(), 1 + itemW * 2, base, mTextPaint); in drawLabels() local
[all …]
/frameworks/base/tests/TouchLatency/app/src/main/java/com/prefabulated/touchlatency/
DTouchLatencyView.java58 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in TouchLatencyView()
59 mTextPaint.setColor(0xFFFFFFFF); in TouchLatencyView()
60 mTextPaint.setTextSize(100); in TouchLatencyView()
61 mTextPaint.setTextAlign(Paint.Align.RIGHT); in TouchLatencyView()
181 canvas.drawText(mDf.format(mFps), width, 100, mTextPaint); in drawBall() local
209 private final Paint mBluePaint, mGreenPaint, mYellowPaint, mRedPaint, mTextPaint; field in TouchLatencyView
/frameworks/base/core/java/android/widget/
DSwitch.java179 private TextPaint mTextPaint; field in Switch
249 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in Switch()
252 mTextPaint.density = res.getDisplayMetrics().density; in Switch()
253 mTextPaint.setCompatibilityScaling(res.getCompatibilityInfo().applicationScale); in Switch()
359 if (ts != mTextPaint.getTextSize()) { in setSwitchTextAppearance()
360 mTextPaint.setTextSize(ts); in setSwitchTextAppearance()
423 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setSwitchTypeface()
424 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setSwitchTypeface()
426 mTextPaint.setFakeBoldText(false); in setSwitchTypeface()
427 mTextPaint.setTextSkewX(0); in setSwitchTypeface()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/graph/
DBatteryMeterDrawableBase.java52 protected final Paint mTextPaint; field in BatteryMeterDrawableBase
141 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in BatteryMeterDrawableBase()
143 mTextPaint.setTypeface(font); in BatteryMeterDrawableBase()
144 mTextPaint.setTextAlign(Paint.Align.CENTER); in BatteryMeterDrawableBase()
433 mTextPaint.setColor(getColorForLevel(level)); in draw()
434 mTextPaint.setTextSize(height * in draw()
437 mTextHeight = -mTextPaint.getFontMetrics().ascent; in draw()
444 mTextPaint.getTextPath(pctText, 0, pctText.length(), pctX, pctY, mTextPath); in draw()
468 c.drawText(pctText, pctX, pctY, mTextPaint); in draw()
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/
DBaseIconFactory.java620 private final Paint mTextPaint = new Paint(ANTI_ALIAS_FLAG | FILTER_BITMAP_FLAG); field in BaseIconFactory.CenterTextDrawable
627 mTextPaint.setColor(color); in CenterTextDrawable()
633 mTextPaint.setTextSize(bounds.height() / 3f); in draw()
634 mTextPaint.getTextBounds(mText, 0, mText.length(), mTextBounds); in draw()
638 mTextPaint); in draw()
/frameworks/base/boot/hiddenapi/
Dhiddenapi-max-target-o.txt69475 Landroid/widget/Switch;->mTextPaint:Landroid/text/TextPaint;
86028 Lcom/android/internal/widget/SubtitleView;->mTextPaint:Landroid/text/TextPaint;