Home
last modified time | relevance | path

Searched refs:mTextPaint (Results 1 – 22 of 22) 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 …]
/frameworks/base/core/tests/coretests/src/android/text/
DLayoutTest.java63 private TextPaint mTextPaint; field in LayoutTest
67 mTextPaint = new TextPaint(); in setup()
78 new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, mAlign, mSpacingMult, mSpacingAdd); in testConstructor()
89 Layout layout = new MockLayout(text, mTextPaint, mWidth, in testGetText()
93 layout = new MockLayout(null, mTextPaint, mWidth, mAlign, mSpacingMult, mSpacingAdd); in testGetText()
99 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testGetPaint()
102 assertSame(mTextPaint, layout.getPaint()); in testGetPaint()
110 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 10, in testGetWidth()
114 layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 0, mAlign, mSpacingMult, mSpacingAdd); in testGetWidth()
120 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.java73 private final TextPaint mTextPaint; field in TextViewSetTextMeasurePerfTest
80 mTextPaint = new TextPaint(); in TextViewSetTextMeasurePerfTest()
81 mTextPaint.setTextSize(10); in TextViewSetTextMeasurePerfTest()
/frameworks/base/services/core/java/com/android/server/wm/
DWatermark.java42 private final Paint mTextPaint; field in Watermark
86 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in Watermark()
87 mTextPaint.setTextSize(fontSize); in Watermark()
88 mTextPaint.setTypeface(Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD)); in Watermark()
90 FontMetricsInt fm = mTextPaint.getFontMetricsInt(); in Watermark()
91 mTextWidth = (int)mTextPaint.measureText(mText); in Watermark()
109 mTextPaint.setColor(color); in Watermark()
110 mTextPaint.setShadowLayer(shadowRadius, shadowDx, shadowDy, shadowColor); in Watermark()
175 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/tests/coretests/src/android/util/
DInternalSelectionView.java52 private Paint mTextPaint = new Paint(); field in InternalSelectionView
80 mTextPaint.setAntiAlias(true); in init()
81 mTextPaint.setTextSize(10); in init()
82 mTextPaint.setColor(Color.WHITE); in init()
161 mTextPaint.setAlpha(0xFF); in onDraw()
165 mTextPaint.setAlpha(0xF0); in onDraw()
175 rectTop + 2 - (int) mTextPaint.ascent(), in onDraw()
176 mTextPaint); in onDraw() local
/frameworks/base/core/java/com/android/internal/widget/
DPeopleHelper.java62 private Paint mTextPaint = new Paint(); field in PeopleHelper
70 mTextPaint.setTextAlign(Paint.Align.CENTER); in init()
71 mTextPaint.setAntiAlias(true); in init()
124 mTextPaint.setColor(needDarkText ? Color.BLACK : Color.WHITE); in createAvatarSymbol()
125 mTextPaint.setTextSize(symbol.length() == 1 ? mAvatarSize * 0.5f : mAvatarSize * 0.3f); in createAvatarSymbol()
126 int yPos = (int) (radius - ((mTextPaint.descent() + mTextPaint.ascent()) / 2)); in createAvatarSymbol()
127 canvas.drawText(symbol, radius, yPos, mTextPaint); in createAvatarSymbol()
DSubtitleView.java62 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()
DPointerLocationView.java129 private final Paint mTextPaint; field in PointerLocationView
171 mTextPaint = new Paint(); in PointerLocationView()
172 mTextPaint.setAntiAlias(true); in PointerLocationView()
173 mTextPaint.setTextSize(10 in PointerLocationView()
175 mTextPaint.setARGB(255, 0, 0, 0); in PointerLocationView()
241 mTextPaint.getFontMetricsInt(mTextMetrics); in onMeasure()
296 .toString(), 1, base, mTextPaint); in onDraw() local
304 .toString(), 1 + itemW, base, mTextPaint); in onDraw() local
309 .toString(), 1 + itemW * 2, base, mTextPaint); in onDraw() local
318 .toString(), 1 + itemW, base, mTextPaint); in onDraw() local
[all …]
/frameworks/base/tests/TouchLatency/app/src/main/java/com/prefabulated/touchlatency/
DTouchLatencyActivity.java65 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in TouchLatencyView()
66 mTextPaint.setColor(0xFFFFFFFF); in TouchLatencyView()
67 mTextPaint.setTextSize(100); in TouchLatencyView()
68 mTextPaint.setTextAlign(Align.RIGHT); in TouchLatencyView()
188 canvas.drawText(mDf.format(mFps), width, 100, mTextPaint); in drawBall() local
216 private final Paint mBluePaint, mGreenPaint, mYellowPaint, mRedPaint, mTextPaint; field in TouchLatencyView
/frameworks/base/core/java/android/widget/
DSwitch.java169 private TextPaint mTextPaint; field in Switch
239 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in Switch()
242 mTextPaint.density = res.getDisplayMetrics().density; in Switch()
243 mTextPaint.setCompatibilityScaling(res.getCompatibilityInfo().applicationScale); in Switch()
349 if (ts != mTextPaint.getTextSize()) { in setSwitchTextAppearance()
350 mTextPaint.setTextSize(ts); in setSwitchTextAppearance()
413 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setSwitchTypeface()
414 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setSwitchTypeface()
416 mTextPaint.setFakeBoldText(false); in setSwitchTypeface()
417 mTextPaint.setTextSkewX(0); in setSwitchTypeface()
[all …]
DTextView.java751 private final TextPaint mTextPaint;
1047 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
1048 mTextPaint.density = res.getDisplayMetrics().density;
1049 mTextPaint.setCompatibilityScaling(compat.applicationScale);
2337 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setTypeface()
2338 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setTypeface()
2340 mTextPaint.setFakeBoldText(false); in setTypeface()
2341 mTextPaint.setTextSkewX(0); in setTypeface()
2425 return FastMath.round(mTextPaint.getFontMetricsInt(null) * mSpacingMult + mSpacingAdd); in getLineHeight()
4212 return mTextPaint.getTextLocale(); in getTextLocale()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/graph/
DBatteryMeterDrawableBase.java51 protected final Paint mTextPaint; field in BatteryMeterDrawableBase
140 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in BatteryMeterDrawableBase()
142 mTextPaint.setTypeface(font); in BatteryMeterDrawableBase()
143 mTextPaint.setTextAlign(Paint.Align.CENTER); in BatteryMeterDrawableBase()
432 mTextPaint.setColor(getColorForLevel(level)); in draw()
433 mTextPaint.setTextSize(height * in draw()
436 mTextHeight = -mTextPaint.getFontMetrics().ascent; in draw()
443 mTextPaint.getTextPath(pctText, 0, pctText.length(), pctX, pctY, mTextPath); in draw()
467 c.drawText(pctText, pctX, pctY, mTextPaint); in draw()
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/
DBaseIconFactory.java64 private final Paint mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG); field in BaseIconFactory
80 mTextPaint.setTextAlign(Paint.Align.CENTER); in BaseIconFactory()
81 mTextPaint.setColor(PLACEHOLDER_BACKGROUND_COLOR); in BaseIconFactory()
82 mTextPaint.setTextSize(context.getResources().getDisplayMetrics().density * in BaseIconFactory()
141 mTextPaint.setColor(color); in createIconBitmap()
143 canvas.drawText(placeholder, mIconBitmapSize / 2, mIconBitmapSize * 5 / 8, mTextPaint); in createIconBitmap()
/frameworks/base/core/java/com/android/internal/app/
DChooserActivity.java4138 private Paint mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
4166 mTextPaint.setColor(Color.WHITE);
4167 mTextPaint.setTextSize(context.getResources()
4169 mTextPaint.setTextAlign(Paint.Align.CENTER);
4225 - ((mTextPaint.descent() + mTextPaint.ascent()) / 2.0f));
4227 canvas.drawText(mExtraImageCount, xPos, yPos, mTextPaint);
/frameworks/base/boot/hiddenapi/
Dhiddenapi-max-target-o.txt73441 Landroid/widget/Switch;->mTextPaint:Landroid/text/TextPaint;
89994 Lcom/android/internal/widget/SubtitleView;->mTextPaint:Landroid/text/TextPaint;