Home
last modified time | relevance | path

Searched refs:mPaint (Results 1 – 25 of 35) sorted by relevance

12

/development/samples/ApiDemos/src/com/example/android/apis/graphics/
DMeasureText.java51 private Paint mPaint; field in MeasureText.SampleView
59 mPaint = new Paint(); in SampleView()
60 mPaint.setAntiAlias(true); in SampleView()
61 mPaint.setStrokeWidth(5); in SampleView()
62 mPaint.setStrokeCap(Paint.Cap.ROUND); in SampleView()
63 mPaint.setTextSize(64); in SampleView()
64 mPaint.setTypeface(Typeface.create(Typeface.SERIF, in SampleView()
74 int count = mPaint.getTextWidths(text, 0, text.length(), widths); in showText()
75 float w = mPaint.measureText(text, 0, text.length()); in showText()
76 mPaint.getTextBounds(text, 0, text.length(), bounds); in showText()
[all …]
DFingerPaint.java35 mPaint = new Paint(); in onCreate()
36 mPaint.setAntiAlias(true); in onCreate()
37 mPaint.setDither(true); in onCreate()
38 mPaint.setColor(0xFFFF0000); in onCreate()
39 mPaint.setStyle(Paint.Style.STROKE); in onCreate()
40 mPaint.setStrokeJoin(Paint.Join.ROUND); in onCreate()
41 mPaint.setStrokeCap(Paint.Cap.ROUND); in onCreate()
42 mPaint.setStrokeWidth(12); in onCreate()
50 private Paint mPaint; field in FingerPaint
55 mPaint.setColor(color); in colorChanged()
[all …]
DRegions.java33 private final Paint mPaint = new Paint(); field in Regions.SampleView
41 mPaint.setAntiAlias(true); in SampleView()
42 mPaint.setTextSize(16); in SampleView()
43 mPaint.setTextAlign(Paint.Align.CENTER); in SampleView()
50 mPaint.setStyle(Paint.Style.STROKE); in drawOriginalRects()
51 mPaint.setColor(Color.RED); in drawOriginalRects()
52 mPaint.setAlpha(alpha); in drawOriginalRects()
53 drawCentered(canvas, mRect1, mPaint); in drawOriginalRects()
54 mPaint.setColor(Color.BLUE); in drawOriginalRects()
55 mPaint.setAlpha(alpha); in drawOriginalRects()
[all …]
DClipping.java33 private Paint mPaint; field in Clipping.SampleView
40 mPaint = new Paint(); in SampleView()
41 mPaint.setAntiAlias(true); in SampleView()
42 mPaint.setStrokeWidth(6); in SampleView()
43 mPaint.setTextSize(16); in SampleView()
44 mPaint.setTextAlign(Paint.Align.RIGHT); in SampleView()
54 mPaint.setColor(Color.RED); in drawScene()
55 canvas.drawLine(0, 0, 100, 100, mPaint); in drawScene()
57 mPaint.setColor(Color.GREEN); in drawScene()
58 canvas.drawCircle(30, 70, 30, mPaint); in drawScene()
[all …]
DPolyToPoly.java37 private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); field in PolyToPoly.SampleView
46 mPaint.setColor(Color.GRAY); in doDraw()
47 mPaint.setStyle(Paint.Style.STROKE); in doDraw()
48 canvas.drawRect(0, 0, 64, 64, mPaint); in doDraw()
49 canvas.drawLine(0, 0, 64, 64, mPaint); in doDraw()
50 canvas.drawLine(0, 64, 64, 0, mPaint); in doDraw()
52 mPaint.setColor(Color.RED); in doDraw()
53 mPaint.setStyle(Paint.Style.FILL); in doDraw()
59 canvas.drawText(src.length/2 + "", x, y, mPaint); in doDraw()
68 mPaint.setStrokeWidth(4); in SampleView()
[all …]
DTypefaces.java36 private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); field in Typefaces.SampleView
43 mPaint.setTextSize(64); in SampleView()
49 mPaint.setTypeface(null); in onDraw()
50 canvas.drawText("Draw with Default:", 10, 100, mPaint); in onDraw()
51 canvas.drawText(" SAMPLE TEXT", 10, 200, mPaint); in onDraw()
52 canvas.drawText("Draw with Custom Font", 10, 400, mPaint); in onDraw()
53 canvas.drawText("(Custom Font draws 'A' with solid triangle.)", 10, 500, mPaint); in onDraw()
54 mPaint.setTypeface(mFace); in onDraw()
55 canvas.drawText(" SAMPLE TEXT", 10, 600, mPaint); in onDraw()
DLayers.java33 private Paint mPaint; field in Layers.SampleView
39 mPaint = new Paint(); in SampleView()
40 mPaint.setAntiAlias(true); in SampleView()
50 mPaint.setColor(Color.RED); in onDraw()
51 canvas.drawCircle(75, 75, 75, mPaint); in onDraw()
52 mPaint.setColor(Color.BLUE); in onDraw()
53 canvas.drawCircle(125, 125, 75, mPaint); in onDraw()
DColorFilters.java41 private Paint mPaint; field in ColorFilters.SampleView
82 mPaint = new Paint(); in SampleView()
83 mPaint.setAntiAlias(true); in SampleView()
84 mPaint.setTextSize(16); in SampleView()
85 mPaint.setTextAlign(Paint.Align.CENTER); in SampleView()
87 mPaint2 = new Paint(mPaint); in SampleView()
90 Paint.FontMetrics fm = mPaint.getFontMetrics(); in SampleView()
113 if (mPaint.getColor() == 0xFF000000) { in swapPaintColors()
114 mPaint.setColor(0xFFFFFFFF); in swapPaintColors()
117 mPaint.setColor(0xFF000000); in swapPaintColors()
[all …]
DSweep.java34 private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); field in Sweep.SampleView
51 mPaint.setShader(mShader); in SampleView()
55 Paint paint = mPaint; in onDraw()
63 mPaint.setShader(mShader); in onDraw()
86 mPaint.setDither(!mPaint.isDither()); in onKeyDown()
DPathEffects.java34 private Paint mPaint; field in PathEffects.SampleView
59 mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in SampleView()
60 mPaint.setStyle(Paint.Style.STROKE); in SampleView()
61 mPaint.setStrokeWidth(6); in SampleView()
84 mPaint.setPathEffect(mEffects[i]); in onDraw()
85 mPaint.setColor(mColors[i]); in onDraw()
86 canvas.drawPath(mPath, mPaint); in onDraw()
DTouchPaint.java236 private final Paint mPaint = new Paint(); field in TouchPaint.PaintView
259 mPaint.setAntiAlias(true); in init()
267 mPaint.setColor(BACKGROUND_COLOR); in clear()
268 mCanvas.drawPaint(mPaint); in clear()
288 mPaint.setColor(COLORS[mColorIndex]); in text()
289 mPaint.setAlpha(255); in text()
291 mPaint.setTextSize(size); in text()
293 mPaint.getTextBounds(text, 0, text.length(), bounds); in text()
298 mPaint.setTextSize(size); in text()
299 mPaint.getTextBounds(text, 0, text.length(), bounds); in text()
[all …]
DPatterns.java56 private final Paint mPaint; field in Patterns.SampleView
83 mPaint = new Paint(Paint.FILTER_BITMAP_FLAG); in SampleView()
89 mPaint.setShader(mShader1); in onDraw()
90 canvas.drawPaint(mPaint); in onDraw()
95 mPaint.setShader(mShader2); in onDraw()
96 canvas.drawPaint(mPaint); in onDraw()
DTextAlign.java33 private Paint mPaint; field in TextAlign.SampleView
71 mPaint = new Paint(); in SampleView()
72 mPaint.setAntiAlias(true); in SampleView()
73 mPaint.setTextSize(30); in SampleView()
74 mPaint.setTypeface(Typeface.SERIF); in SampleView()
76 mPos = buildTextPositions(POSTEXT, 0, mPaint); in SampleView()
90 Paint p = mPaint; in onDraw()
DVertices.java35 private final Paint mPaint = new Paint(); field in Vertices.SampleView
56 mPaint.setShader(s); in SampleView()
84 mTexs, 0, null, 0, null, 0, 0, mPaint); in onDraw()
88 mTexs, 0, null, 0, mIndices, 0, 6, mPaint); in onDraw()
DColorPickerDialog.java36 private Paint mPaint; field in ColorPickerDialog.ColorPickerView
50 mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in ColorPickerView()
51 mPaint.setShader(s); in ColorPickerView()
52 mPaint.setStyle(Paint.Style.STROKE); in ColorPickerView()
53 mPaint.setStrokeWidth(32); in ColorPickerView()
65 float r = CENTER_X - mPaint.getStrokeWidth()*0.5f; in onDraw()
69 canvas.drawOval(new RectF(-r, -r, r, r), mPaint); in onDraw()
DPurgeableBitmapView.java49 private final Paint mPaint = new Paint(); field in PurgeableBitmapView
63 mPaint.setTextSize(textSize); in PurgeableBitmapView()
64 mPaint.setColor(Color.GRAY); in PurgeableBitmapView()
106 HEIGHT / 2, mPaint); in onDraw() local
DCreateBitmap.java57 private Paint mPaint; field in CreateBitmap.SampleView
95 mPaint = new Paint(); in SampleView()
96 mPaint.setDither(true); in SampleView()
122 false, mPaint); in onDraw()
DCompass.java80 private Paint mPaint = new Paint(); field in Compass.SampleView
96 Paint paint = mPaint; in onDraw()
113 canvas.drawPath(mPath, mPaint); in onDraw()
DDrawPoints.java33 private Paint mPaint = new Paint(); field in DrawPoints.SampleView
63 Paint paint = mPaint; in onDraw()
/development/samples/devbytes/animation/ListViewCellInsertion/src/com/example/android/insertingcells/
DRoundView.java40 private Paint mPaint; field in RoundView
58 mPaint = new Paint(); in init()
59 mPaint.setAntiAlias(true); in init()
60 mPaint.setColor(Color.WHITE); in init()
61 mPaint.setStyle(Paint.Style.STROKE); in init()
62 mPaint.setStrokeWidth(STROKE_WIDTH); in init()
68 RADIUS, mPaint); in onDraw() local
/development/samples/browseable/WatchFace/Wearable/src/com.example.android.wearable.watchface/
DCardBoundsWatchFaceService.java46 final Paint mPaint = new Paint(); field in CardBoundsWatchFaceService.Engine
91 mPaint.setColor(Color.MAGENTA); in onDraw()
95 mCardBounds.bottom + BORDER_WIDTH_PX, mPaint); in onDraw()
99 mPaint.setColor(isInAmbientMode() ? Color.RED : Color.GREEN); in onDraw()
100 canvas.drawRect(mCardBounds, mPaint); in onDraw()
/development/samples/SoftKeyboard/src/com/example/android/softkeyboard/
DCandidateView.java59 private Paint mPaint; field in CandidateView
92 mPaint = new Paint(); in CandidateView()
93 mPaint.setColor(mColorNormal); in CandidateView()
94 mPaint.setAntiAlias(true); in CandidateView()
95 mPaint.setTextSize(r.getDimensionPixelSize(R.dimen.candidate_font_height)); in CandidateView()
96 mPaint.setStrokeWidth(0); in CandidateView()
144 final int desiredHeight = ((int)mPaint.getTextSize()) + mVerticalPadding in onMeasure()
174 final Paint paint = mPaint; in onDraw()
179 final int y = (int) (((height - mPaint.getTextSize()) / 2) - mPaint.ascent()); in onDraw()
/development/samples/MultiDisplay/src/com/example/android/multidisplay/wallpaper/
DSampleWallpaper.java52 private Paint mPaint = new Paint(); field in SampleWallpaper.MySampleEngine
141 canvas.drawBitmap(mTipImage, 0, 0, mPaint); in draw()
144 centerY - mTextBounds.exactCenterY(), mPaint); in draw()
147 20.0f + mCircleRadioShift, mPaint); in draw()
210 mPaint.setColor(mPaintColor);
239 mPaint.getTextBounds(mShowingText, 0, mShowingText.length(), mTextBounds);
247 mPaint.setAntiAlias(true);
248 mPaint.setStrokeWidth(1f);
249 mPaint.setTextSize(50f);
/development/samples/ApiDemos/src/com/example/android/apis/view/
DGameView.java597 private final Paint mPaint;
602 mPaint = new Paint();
603 mPaint.setStyle(Style.FILL);
689 setPaintARGBBlend(mPaint, mDestroyAnimProgress,
696 canvas.drawPath(mPath, mPaint);
713 private final Paint mPaint;
716 mPaint = new Paint();
717 mPaint.setStyle(Style.FILL);
731 setPaintARGBBlend(mPaint, mDestroyAnimProgress,
734 canvas.drawCircle(mPositionX, mPositionY, mSize, mPaint);
[all …]
DDraggableDot.java41 private Paint mPaint; field in DraggableDot
91 mPaint = new Paint(); in DraggableDot()
92 mPaint.setAntiAlias(true); in DraggableDot()
93 mPaint.setStrokeWidth(6); in DraggableDot()
94 mPaint.setColor(0xFFD00000); in DraggableDot()
154 canvas.drawCircle(cx, cy, rad, mPaint); in onDraw()

12