/frameworks/base/core/tests/coretests/src/android/widget/ |
LabelView.java | 75 mTextPaint = new Paint(); 76 mTextPaint.setAntiAlias(true); 77 mTextPaint.setTextSize(16); 78 mTextPaint.setColor(0xFF000000); 101 mTextPaint.setTextSize(size); 111 mTextPaint.setColor(color); 140 result = (int) mTextPaint.measureText(mText) + mPaddingLeft 161 mAscent = (int) mTextPaint.ascent(); 167 result = (int) (-mAscent + mTextPaint.descent()) + mPaddingTop 185 canvas.drawText(mText, mPaddingLeft, mPaddingTop - mAscent, mTextPaint); [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/view/ |
LabelView.java | 38 private Paint mTextPaint; 85 mTextPaint = new Paint(); 86 mTextPaint.setAntiAlias(true); 88 mTextPaint.setTextSize(16 * getResources().getDisplayMetrics().density); 89 mTextPaint.setColor(0xFF000000); 109 mTextPaint.setTextSize(size); 119 mTextPaint.setColor(color); 147 result = (int) mTextPaint.measureText(mText) + getPaddingLeft() 168 mAscent = (int) mTextPaint.ascent(); 174 result = (int) (-mAscent + mTextPaint.descent()) + getPaddingTop( [all...] |
InternalSelectionView.java | 47 private Paint mTextPaint = new Paint(); 76 mTextPaint.setAntiAlias(true); 77 mTextPaint.setTextSize(10); 78 mTextPaint.setColor(Color.WHITE); 158 mTextPaint.setAlpha(0xFF); 162 mTextPaint.setAlpha(0xF0); 172 rectTop + 2 - (int) mTextPaint.ascent(), 173 mTextPaint);
|
/cts/tests/tests/text/src/android/text/cts/ |
LayoutTest.java | 46 private TextPaint mTextPaint; 51 mTextPaint = new TextPaint(); 69 new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, mAlign, mSpacingmult, mSpacingadd); 85 Layout layout = new MockLayout(text, mTextPaint, mWidth, 89 layout = new MockLayout(null, mTextPaint, mWidth, mAlign, mSpacingmult, mSpacingadd); 99 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, 102 assertSame(mTextPaint, layout.getPaint()); 114 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 10, 118 layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 0, mAlign, mSpacingmult, mSpacingadd); 128 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 15 [all...] |
/packages/apps/VideoEditor/src/com/android/videoeditor/widgets/ |
PlayheadView.java | 39 private final Paint mTextPaint; 60 mTextPaint = new Paint(); 61 mTextPaint.setAntiAlias(true); 62 mTextPaint.setColor(resources.getColor(R.color.playhead_tick_color)); 64 mTextPaint.setTextSize(mTimeTextSize); 137 final int y = (int) -mTextPaint.getFontMetrics().top; 141 int x = (int) ((getWidth() - mTextPaint.measureText(timeText)) / 2); 142 canvas.drawText(timeText, x, y, mTextPaint); 177 final int x = (int) (i - mTextPaint.measureText(timeText) / 2); 178 canvas.drawText(timeText, x, y, mTextPaint); [all...] |
/frameworks/base/services/java/com/android/server/wm/ |
Watermark.java | 40 final Paint mTextPaint; 85 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 86 mTextPaint.setTextSize(fontSize); 87 mTextPaint.setTypeface(Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD)); 89 FontMetricsInt fm = mTextPaint.getFontMetricsInt(); 90 mTextWidth = (int)mTextPaint.measureText(mText); 110 mTextPaint.setColor(color); 111 mTextPaint.setShadowLayer(shadowRadius, shadowDx, shadowDy, shadowColor); 163 c.drawText(mText, x, y, mTextPaint);
|
/frameworks/base/core/tests/coretests/src/android/util/ |
InternalSelectionView.java | 50 private Paint mTextPaint = new Paint(); 78 mTextPaint.setAntiAlias(true); 79 mTextPaint.setTextSize(10); 80 mTextPaint.setColor(Color.WHITE); 160 mTextPaint.setAlpha(0xFF); 164 mTextPaint.setAlpha(0xF0); 174 rectTop + 2 - (int) mTextPaint.ascent(), 175 mTextPaint);
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
BatteryHistoryChart.java | 122 final TextPaint mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); 200 mTextPaint.density = getResources().getDisplayMetrics().density; 201 mTextPaint.setCompatibilityScaling( 291 mTextPaint.setColor(textColor.getDefaultColor()); 292 mTextPaint.setTextSize(textSize); 312 mTextPaint.setShadowLayer(r, dx, dy, shadowcolor); 324 mTextPaint.setTypeface(tf); 328 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); 329 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); 331 mTextPaint.setFakeBoldText(false) [all...] |
/frameworks/base/core/java/android/widget/ |
Switch.java | 89 private TextPaint mTextPaint; 133 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); 135 mTextPaint.density = res.getDisplayMetrics().density; 136 mTextPaint.setCompatibilityScaling(res.getCompatibilityInfo().applicationScale); 192 if (ts != mTextPaint.getTextSize()) { 193 mTextPaint.setTextSize(ts); 247 mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0); 248 mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0); 250 mTextPaint.setFakeBoldText(false); 251 mTextPaint.setTextSkewX(0) [all...] |
TextView.java | 455 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); 456 mTextPaint.density = res.getDisplayMetrics().density; 457 mTextPaint.setCompatibilityScaling(compat.applicationScale); 461 // mTextPaint.setTextAlign(Paint.Align.LEFT); [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/accessibility/ |
CustomViewAccessibilityActivity.java | 205 private TextPaint mTextPaint; 214 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); 220 mTextPaint.setTextSize(textSize); 224 mTextPaint.setColor(textColor); 265 return new StaticLayout(text, mTextPaint, 266 (int) Math.ceil(Layout.getDesiredWidth(text, mTextPaint)),
|
/frameworks/base/core/java/com/android/internal/widget/ |
PointerLocationView.java | 86 private final Paint mTextPaint; 112 mTextPaint = new Paint(); 113 mTextPaint.setAntiAlias(true); 114 mTextPaint.setTextSize(10 116 mTextPaint.setARGB(255, 0, 0, 0); 163 mTextPaint.getFontMetricsInt(mTextMetrics); 207 .toString(), 1, base, mTextPaint); 214 .toString(), 1 + itemW, base, mTextPaint); 218 .toString(), 1 + itemW * 2, base, mTextPaint); 227 .toString(), 1 + itemW, base, mTextPaint); [all...] |