/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/support/design/src/android/support/design/widget/ |
D | CollapsingTextHelper.java | 99 private final TextPaint mTextPaint; 113 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG | Paint.SUBPIXEL_TEXT_FLAG); 361 mTextPaint.setColor(blendColors( in calculateOffsets() 364 mTextPaint.setColor(getCurrentCollapsedTextColor()); in calculateOffsets() 367 mTextPaint.setShadowLayer( in calculateOffsets() 400 mTextPaint.measureText(mTextToDraw, 0, mTextToDraw.length()) : 0; in calculateBaseOffsets() 408 mCollapsedDrawY = mCollapsedBounds.top - mTextPaint.ascent(); in calculateBaseOffsets() 412 float textHeight = mTextPaint.descent() - mTextPaint.ascent(); in calculateBaseOffsets() 413 float textOffset = (textHeight / 2) - mTextPaint.descent(); in calculateBaseOffsets() 432 ? mTextPaint.measureText(mTextToDraw, 0, mTextToDraw.length()) : 0; in calculateBaseOffsets() [all …]
|
/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() 169 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() 260 mText, mTextPaint, maxWidth, mAlignment, mSpacingMult, mSpacingAdd, true); in computeMeasurements() 302 final Paint textPaint = mTextPaint; in onDraw()
|
D | PointerLocationView.java | 113 private final Paint mTextPaint; field in PointerLocationView 143 mTextPaint = new Paint(); in PointerLocationView() 144 mTextPaint.setAntiAlias(true); in PointerLocationView() 145 mTextPaint.setTextSize(10 in PointerLocationView() 147 mTextPaint.setARGB(255, 0, 0, 0); in PointerLocationView() 195 mTextPaint.getFontMetricsInt(mTextMetrics); in onMeasure() 238 .toString(), 1, base, mTextPaint); in onDraw() local 245 .toString(), 1 + itemW, base, mTextPaint); in onDraw() local 249 .toString(), 1 + itemW * 2, base, mTextPaint); in onDraw() local 258 .toString(), 1 + itemW, base, mTextPaint); in onDraw() local [all …]
|
/frameworks/support/v7/appcompat/src/android/support/v7/widget/ |
D | SwitchCompat.java | 171 private final TextPaint mTextPaint; field in SwitchCompat 218 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in SwitchCompat() 221 mTextPaint.density = res.getDisplayMetrics().density; in SwitchCompat() 314 if (ts != mTextPaint.getTextSize()) { in setSwitchTextAppearance() 315 mTextPaint.setTextSize(ts); in setSwitchTextAppearance() 373 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setSwitchTypeface() 374 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setSwitchTypeface() 376 mTextPaint.setFakeBoldText(false); in setSwitchTypeface() 377 mTextPaint.setTextSkewX(0); in setSwitchTypeface() 390 if ((mTextPaint.getTypeface() != null && !mTextPaint.getTypeface().equals(typeface)) in setSwitchTypeface() [all …]
|
/frameworks/base/core/java/android/widget/ |
D | Switch.java | 154 private TextPaint mTextPaint; field in Switch 222 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in Switch() 225 mTextPaint.density = res.getDisplayMetrics().density; in Switch() 226 mTextPaint.setCompatibilityScaling(res.getCompatibilityInfo().applicationScale); in Switch() 323 if (ts != mTextPaint.getTextSize()) { in setSwitchTextAppearance() 324 mTextPaint.setTextSize(ts); in setSwitchTextAppearance() 387 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); in setSwitchTypeface() 388 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); in setSwitchTypeface() 390 mTextPaint.setFakeBoldText(false); in setSwitchTypeface() 391 mTextPaint.setTextSkewX(0); in setSwitchTypeface() [all …]
|
D | TextView.java | 632 private final TextPaint mTextPaint; 836 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); 837 mTextPaint.density = res.getDisplayMetrics().density; 838 mTextPaint.setCompatibilityScaling(compat.applicationScale); 2220 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); 2221 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); 2223 mTextPaint.setFakeBoldText(false); 2224 mTextPaint.setTextSkewX(0); 2287 return FastMath.round(mTextPaint.getFontMetricsInt(null) * mSpacingMult + mSpacingAdd); 3471 return mTextPaint.getTextLocale(); [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/graph/ |
D | BatteryMeterDrawableBase.java | 46 protected final Paint mTextPaint; field in BatteryMeterDrawableBase 131 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in BatteryMeterDrawableBase() 133 mTextPaint.setTypeface(font); in BatteryMeterDrawableBase() 134 mTextPaint.setTextAlign(Paint.Align.CENTER); in BatteryMeterDrawableBase() 385 mTextPaint.setColor(getColorForLevel(level)); in draw() 386 mTextPaint.setTextSize(height * in draw() 389 mTextHeight = -mTextPaint.getFontMetrics().ascent; in draw() 396 mTextPaint.getTextPath(pctText, 0, pctText.length(), pctX, pctY, mTextPath); in draw() 420 c.drawText(pctText, pctX, pctY, mTextPaint); in draw()
|
/frameworks/support/emoji/core/src/android/support/text/emoji/ |
D | EmojiProcessor.java | 745 private final TextPaint mTextPaint; field in EmojiProcessor.GlyphChecker 748 mTextPaint = new TextPaint(); in GlyphChecker() 749 mTextPaint.setTextSize(PAINT_TEXT_SIZE); in GlyphChecker() 770 return PaintCompat.hasGlyph(mTextPaint, builder.toString()); in hasGlyph()
|