/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
D | MeasureText.java | 51 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 …]
|
D | FingerPaint.java | 35 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 …]
|
D | Regions.java | 33 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 …]
|
D | Clipping.java | 33 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 …]
|
D | PolyToPoly.java | 37 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 …]
|
D | Typefaces.java | 36 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()
|
D | Layers.java | 33 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()
|
D | ColorFilters.java | 41 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 …]
|
D | Sweep.java | 34 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()
|
D | PathEffects.java | 34 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()
|
D | TouchPaint.java | 236 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 …]
|
D | Patterns.java | 56 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()
|
D | TextAlign.java | 33 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()
|
D | Vertices.java | 35 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()
|
D | ColorPickerDialog.java | 36 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()
|
D | PurgeableBitmapView.java | 49 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
|
D | CreateBitmap.java | 57 private Paint mPaint; field in CreateBitmap.SampleView 95 mPaint = new Paint(); in SampleView() 96 mPaint.setDither(true); in SampleView() 122 false, mPaint); in onDraw()
|
D | Compass.java | 80 private Paint mPaint = new Paint(); field in Compass.SampleView 96 Paint paint = mPaint; in onDraw() 113 canvas.drawPath(mPath, mPaint); in onDraw()
|
D | DrawPoints.java | 33 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/ |
D | RoundView.java | 40 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/ |
D | CardBoundsWatchFaceService.java | 46 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/ |
D | CandidateView.java | 59 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/ |
D | SampleWallpaper.java | 52 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/ |
D | GameView.java | 597 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 …]
|
D | DraggableDot.java | 41 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()
|