Home
last modified time | relevance | path

Searched refs:mTextPaint (Results 1 – 6 of 6) 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/services/java/com/android/server/wm/
DWatermark.java40 final Paint mTextPaint; field in Watermark
85 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in Watermark()
86 mTextPaint.setTextSize(fontSize); in Watermark()
87 mTextPaint.setTypeface(Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD)); in Watermark()
89 FontMetricsInt fm = mTextPaint.getFontMetricsInt(); in Watermark()
90 mTextWidth = (int)mTextPaint.measureText(mText); in Watermark()
110 mTextPaint.setColor(color); in Watermark()
111 mTextPaint.setShadowLayer(shadowRadius, shadowDx, shadowDy, shadowColor); in Watermark()
163 c.drawText(mText, x, y, mTextPaint); in drawIfNeeded()
/frameworks/base/core/tests/coretests/src/android/util/
DInternalSelectionView.java50 private Paint mTextPaint = new Paint(); field in InternalSelectionView
78 mTextPaint.setAntiAlias(true); in init()
79 mTextPaint.setTextSize(10); in init()
80 mTextPaint.setColor(Color.WHITE); in init()
160 mTextPaint.setAlpha(0xFF); in onDraw()
164 mTextPaint.setAlpha(0xF0); in onDraw()
174 rectTop + 2 - (int) mTextPaint.ascent(), in onDraw()
175 mTextPaint); in onDraw() local
/frameworks/base/core/java/android/widget/
DSwitch.java89 private TextPaint mTextPaint; field in Switch
133 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in Switch()
135 mTextPaint.density = res.getDisplayMetrics().density; in Switch()
136 mTextPaint.setCompatibilityScaling(res.getCompatibilityInfo().applicationScale); in Switch()
192 if (ts != mTextPaint.getTextSize()) { in setSwitchTextAppearance()
193 mTextPaint.setTextSize(ts); in setSwitchTextAppearance()
247 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setSwitchTypeface()
248 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setSwitchTypeface()
250 mTextPaint.setFakeBoldText(false); in setSwitchTypeface()
251 mTextPaint.setTextSkewX(0); in setSwitchTypeface()
[all …]
DTextView.java448 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in TextView()
449 mTextPaint.density = getResources().getDisplayMetrics().density; in TextView()
450 mTextPaint.setCompatibilityScaling( in TextView()
1224 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setTypeface()
1225 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setTypeface()
1227 mTextPaint.setFakeBoldText(false); in setTypeface()
1228 mTextPaint.setTextSkewX(0); in setTypeface()
1285 return FastMath.round(mTextPaint.getFontMetricsInt(null) * mSpacingMult + mSpacingAdd); in getLineHeight()
2141 return mTextPaint.getTextSize(); in getTextSize()
2181 if (size != mTextPaint.getTextSize()) { in setRawTextSize()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DPointerLocationView.java86 private final Paint mTextPaint; field in PointerLocationView
112 mTextPaint = new Paint(); in PointerLocationView()
113 mTextPaint.setAntiAlias(true); in PointerLocationView()
114 mTextPaint.setTextSize(10 in PointerLocationView()
116 mTextPaint.setARGB(255, 0, 0, 0); in PointerLocationView()
163 mTextPaint.getFontMetricsInt(mTextMetrics); in onMeasure()
207 .toString(), 1, base, mTextPaint); in onDraw() local
214 .toString(), 1 + itemW, base, mTextPaint); in onDraw() local
218 .toString(), 1 + itemW * 2, base, mTextPaint); in onDraw() local
227 .toString(), 1 + itemW, base, mTextPaint); in onDraw() local
[all …]