/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/services/java/com/android/server/wm/ |
D | Watermark.java | 42 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() 167 c.drawText(mText, x, y, mTextPaint); in drawIfNeeded()
|
/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/android/widget/ |
D | Switch.java | 103 private TextPaint mTextPaint; field in Switch 148 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in Switch() 150 mTextPaint.density = res.getDisplayMetrics().density; in Switch() 151 mTextPaint.setCompatibilityScaling(res.getCompatibilityInfo().applicationScale); in Switch() 209 if (ts != mTextPaint.getTextSize()) { in setSwitchTextAppearance() 210 mTextPaint.setTextSize(ts); in setSwitchTextAppearance() 273 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setSwitchTypeface() 274 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setSwitchTypeface() 276 mTextPaint.setFakeBoldText(false); in setSwitchTypeface() 277 mTextPaint.setTextSkewX(0); in setSwitchTypeface() [all …]
|
D | TextView.java | 499 private final TextPaint mTextPaint; field in TextView 618 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in TextView() 619 mTextPaint.density = res.getDisplayMetrics().density; in TextView() 620 mTextPaint.setCompatibilityScaling(compat.applicationScale); in TextView() 1423 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setTypeface() 1424 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setTypeface() 1426 mTextPaint.setFakeBoldText(false); in setTypeface() 1427 mTextPaint.setTextSkewX(0); in setTypeface() 1486 return FastMath.round(mTextPaint.getFontMetricsInt(null) * mSpacingMult + mSpacingAdd); in getLineHeight() 2415 return mTextPaint.getTextLocale(); in getTextLocale() [all …]
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | PointerLocationView.java | 105 private final Paint mTextPaint; field in PointerLocationView 134 mTextPaint = new Paint(); in PointerLocationView() 135 mTextPaint.setAntiAlias(true); in PointerLocationView() 136 mTextPaint.setTextSize(10 in PointerLocationView() 138 mTextPaint.setARGB(255, 0, 0, 0); in PointerLocationView() 181 mTextPaint.getFontMetricsInt(mTextMetrics); in onMeasure() 224 .toString(), 1, base, mTextPaint); in onDraw() local 231 .toString(), 1 + itemW, base, mTextPaint); in onDraw() local 235 .toString(), 1 + itemW * 2, base, mTextPaint); in onDraw() local 244 .toString(), 1 + itemW, base, mTextPaint); in onDraw() local [all …]
|
/frameworks/base/docs/html/training/custom-views/ |
D | custom-drawing.jd | 86 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 87 mTextPaint.setColor(mTextColor); 89 mTextHeight = mTextPaint.getTextSize(); 91 mTextPaint.setTextSize(mTextHeight); 268 canvas.drawText(mData.get(mCurrentItem).mLabel, mTextX, mTextY, mTextPaint); 281 canvas.drawLine(mTextX, mPointerY, mPointerX, mPointerY, mTextPaint); 282 canvas.drawCircle(mPointerX, mPointerY, mPointerSize, mTextPaint);
|