/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
D | Clipping.java | 49 private void drawScene(Canvas canvas) { in drawScene() argument 50 canvas.clipRect(0, 0, 100, 100); in drawScene() 52 canvas.drawColor(Color.WHITE); in drawScene() 55 canvas.drawLine(0, 0, 100, 100, mPaint); in drawScene() 58 canvas.drawCircle(30, 70, 30, mPaint); in drawScene() 61 canvas.drawText("Clipping", 100, 30, mPaint); in drawScene() 64 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 65 canvas.drawColor(Color.GRAY); in onDraw() 67 canvas.save(); in onDraw() 68 canvas.translate(10, 10); in onDraw() [all …]
|
D | PolyToPoly.java | 41 private void doDraw(Canvas canvas, float src[], float dst[]) { in doDraw() argument 42 canvas.save(); in doDraw() 44 canvas.concat(mMatrix); 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() 59 canvas.drawText(src.length/2 + "", x, y, mPaint); in doDraw() 61 canvas.restore(); in doDraw() 76 protected void onDraw(Canvas canvas) { in onDraw() argument 77 canvas.drawColor(Color.WHITE); in onDraw() [all …]
|
D | RoundRects.java | 60 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 66 canvas.save(); in onDraw() 67 canvas.translate(10, 10); in onDraw() 70 mDrawable.draw(canvas); in onDraw() 71 canvas.restore(); in onDraw() 73 canvas.save(); in onDraw() 74 canvas.translate(10 + mRect.width() + 10, 10); in onDraw() 77 mDrawable.draw(canvas); in onDraw() 78 canvas.restore(); in onDraw() 80 canvas.translate(0, mRect.height() + 10); in onDraw() [all …]
|
D | Regions.java | 49 private void drawOriginalRects(Canvas canvas, int alpha) { in drawOriginalRects() argument 53 drawCentered(canvas, mRect1, mPaint); in drawOriginalRects() 56 drawCentered(canvas, mRect2, mPaint); in drawOriginalRects() 62 private void drawRgn(Canvas canvas, int color, String str, Region.Op op) { in drawRgn() argument 65 canvas.drawText(str, 80, 24, mPaint); in drawRgn() 76 canvas.translate(0, 30); in drawRgn() 79 canvas.drawRect(r, mPaint); in drawRgn() 81 drawOriginalRects(canvas, 0x80); in drawRgn() 94 protected void onDraw(Canvas canvas) { in onDraw() argument 95 canvas.drawColor(Color.GRAY); in onDraw() [all …]
|
D | ScaleToFit.java | 76 private void drawSrcR(Canvas canvas, int index) { in drawSrcR() argument 78 canvas.drawOval(mSrcR, mPaint); in drawSrcR() 81 private void drawFit(Canvas canvas, int index, Matrix.ScaleToFit stf) { in drawFit() argument 82 canvas.save(); in drawFit() 86 canvas.concat(mMatrix); in drawFit() 87 drawSrcR(canvas, index); in drawFit() 89 canvas.restore(); in drawFit() 91 canvas.drawRect(mDstR, mHairPaint); in drawFit() 95 protected void onDraw(Canvas canvas) { in onDraw() argument 96 canvas.drawColor(Color.WHITE); in onDraw() [all …]
|
D | PathFillTypes.java | 50 private void showPath(Canvas canvas, int x, int y, Path.FillType ft, in showPath() argument 52 canvas.save(); in showPath() 53 canvas.translate(x, y); in showPath() 54 canvas.clipRect(0, 0, 120, 120); in showPath() 55 canvas.drawColor(Color.WHITE); in showPath() 57 canvas.drawPath(mPath, paint); in showPath() 58 canvas.restore(); in showPath() 61 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 64 canvas.drawColor(0xFFCCCCCC); in onDraw() 66 canvas.translate(20, 20); in onDraw() [all …]
|
D | TextAlign.java | 87 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 88 canvas.drawColor(Color.WHITE); in onDraw() 98 canvas.drawLine(x, y, x, y+DY*3, p); in onDraw() 101 canvas.translate(0, DY); in onDraw() 103 canvas.drawText(TEXT_L, x, y, p); in onDraw() 105 canvas.translate(0, DY); in onDraw() 107 canvas.drawText(TEXT_C, x, y, p); in onDraw() 109 canvas.translate(0, DY); in onDraw() 111 canvas.drawText(TEXT_R, x, y, p); in onDraw() 113 canvas.translate(100, DY*2); in onDraw() [all …]
|
D | Layers.java | 43 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 44 canvas.drawColor(Color.WHITE); in onDraw() 46 canvas.translate(10, 10); in onDraw() 48 canvas.saveLayerAlpha(0, 0, 200, 200, 0x88); in onDraw() 51 canvas.drawCircle(75, 75, 75, mPaint); in onDraw() 53 canvas.drawCircle(125, 125, 75, mPaint); in onDraw() 55 canvas.restore(); in onDraw()
|
D | MeasureText.java | 68 private void showText(Canvas canvas, String text, Paint.Align align) { in showText() argument 79 canvas.drawRect(bounds, mPaint); in showText() 81 canvas.drawText(text, 0, 0, mPaint); in showText() 95 canvas.drawLine(0, 0, w, 0, mPaint); in showText() 97 canvas.drawPoints(pts, 0, (count + 1) << 1, mPaint); in showText() 100 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 101 canvas.drawColor(Color.WHITE); in onDraw() 103 canvas.translate(mOriginX, mOriginY); in onDraw() 105 showText(canvas, "Measure", Paint.Align.LEFT); in onDraw() 106 canvas.translate(0, 80); in onDraw() [all …]
|
D | Pictures.java | 40 static void drawSomething(Canvas canvas) { in drawSomething() argument 44 canvas.drawCircle(50, 50, 40, p); in drawSomething() 48 canvas.drawText("Pictures", 60, 60, p); in drawSomething() 63 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 64 canvas.drawColor(Color.WHITE); in onDraw() 66 canvas.drawPicture(mPicture); in onDraw() 68 canvas.drawPicture(mPicture, new RectF(0, 100, getWidth(), 200)); in onDraw() 71 mDrawable.draw(canvas); in onDraw()
|
D | Typefaces.java | 47 protected void onDraw(Canvas canvas) { in onDraw() argument 48 canvas.drawColor(Color.WHITE); 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() 55 canvas.drawText(" SAMPLE TEXT", 10, 600, mPaint); in onDraw()
|
D | PictureLayout.java | 108 private void drawPict(Canvas canvas, int x, int y, int w, int h, in drawPict() argument 110 canvas.save(); in drawPict() 111 canvas.translate(x, y); in drawPict() 112 canvas.clipRect(0, 0, w, h); in drawPict() 113 canvas.scale(0.5f, 0.5f); in drawPict() 114 canvas.scale(sx, sy, w, h); in drawPict() 115 canvas.drawPicture(mPicture); in drawPict() 116 canvas.restore(); in drawPict() 120 protected void dispatchDraw(Canvas canvas) { in dispatchDraw() argument 128 canvas.drawPicture(mPicture); in dispatchDraw() [all …]
|
D | Vertices.java | 78 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 79 canvas.drawColor(0xFFCCCCCC); in onDraw() 80 canvas.save(); in onDraw() 81 canvas.concat(mMatrix); in onDraw() 83 canvas.drawVertices(Canvas.VertexMode.TRIANGLE_FAN, 10, mVerts, 0, in onDraw() 86 canvas.translate(0, 240); in onDraw() 87 canvas.drawVertices(Canvas.VertexMode.TRIANGLE_FAN, 10, mVerts, 0, in onDraw() 90 canvas.restore(); in onDraw()
|
D | UnicodeChart.java | 82 private void drawChart(Canvas canvas, int base) { in drawChart() argument 88 canvas.drawText(Integer.toHexString(unichar), in drawChart() 91 canvas.drawPosText(chars, 0, 256, mPos, mBigCharPaint); in drawChart() 94 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 95 canvas.drawColor(Color.WHITE); in onDraw() 97 canvas.translate(0, 1); in onDraw() 98 drawChart(canvas, mBase * 256); in onDraw()
|
D | Arcs.java | 89 private void drawArcs(Canvas canvas, RectF oval, boolean useCenter, in drawArcs() argument 91 canvas.drawRect(oval, mFramePaint); in drawArcs() 92 canvas.drawArc(oval, mStart, mSweep, useCenter, paint); in drawArcs() 95 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 96 canvas.drawColor(Color.WHITE); in onDraw() 98 drawArcs(canvas, mBigOval, mUseCenters[mBigIndex], in onDraw() 102 drawArcs(canvas, mOvals[i], mUseCenters[i], mPaints[i]); in onDraw()
|
D | AnimateDrawable.java | 56 public void draw(Canvas canvas) { in draw() argument 59 int sc = canvas.save(); in draw() 65 canvas.concat(mTransformation.getMatrix()); in draw() 67 dr.draw(canvas); in draw() 68 canvas.restoreToCount(sc); in draw()
|
D | WindowSurface.java | 209 Canvas canvas = mSurface.lockCanvas(); in run() local 210 if (canvas == null) { in run() 218 mPoint1.init(canvas.getWidth(), canvas.getHeight(), mMinStep); in run() 219 mPoint2.init(canvas.getWidth(), canvas.getHeight(), mMinStep); in run() 222 mPoint1.step(canvas.getWidth(), canvas.getHeight(), in run() 224 mPoint2.step(canvas.getWidth(), canvas.getHeight(), in run() 234 canvas.drawColor(mBackground.getColor()); in run() 241 canvas.drawLine(mOld[p], mOld[p+1], mOld[p+2], mOld[p+3], mForeground); in run() 251 canvas.drawLine(mPoint1.x, mPoint1.y, mPoint2.x, mPoint2.y, mForeground); in run() 266 mSurface.unlockCanvasAndPost(canvas); in run()
|
D | ColorFilters.java | 127 private void drawSample(Canvas canvas, ColorFilter filter) { in drawSample() argument 133 mDrawable.draw(canvas); in drawSample() 134 canvas.drawText("Label", x+1, y+1, mPaint2); in drawSample() 135 canvas.drawText("Label", x, y, mPaint); in drawSample() 139 dr.draw(canvas); in drawSample() 143 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 144 canvas.drawColor(0xFFCCCCCC); in onDraw() 146 canvas.translate(8, 12); in onDraw() 155 drawSample(canvas, filter); in onDraw() 156 canvas.translate(0, 55); in onDraw()
|
D | CreateBitmap.java | 107 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 108 canvas.drawColor(Color.WHITE); in onDraw() 111 canvas.drawBitmap(mBitmaps[i], 0, 0, null); in onDraw() 112 canvas.drawBitmap(mJPEG[i], 80, 0, null); in onDraw() 113 canvas.drawBitmap(mPNG[i], 160, 0, null); in onDraw() 114 canvas.translate(0, mBitmaps[i].getHeight()); in onDraw() 118 canvas.drawBitmap(mColors, 0, STRIDE, 0, 0, WIDTH, HEIGHT, in onDraw() 120 canvas.translate(0, HEIGHT); in onDraw() 121 canvas.drawBitmap(mColors, 0, STRIDE, 0, 0, WIDTH, HEIGHT, in onDraw()
|
D | DrawPoints.java | 62 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 65 canvas.translate(10, 10); in onDraw() 67 canvas.drawColor(Color.WHITE); in onDraw() 71 canvas.drawLines(mPts, paint); in onDraw() 75 canvas.drawPoints(mPts, paint); in onDraw()
|
D | Compass.java | 95 @Override protected void onDraw(Canvas canvas) { in onDraw() argument 98 canvas.drawColor(Color.WHITE); in onDraw() 104 int w = canvas.getWidth(); in onDraw() 105 int h = canvas.getHeight(); in onDraw() 109 canvas.translate(cx, cy); in onDraw() 111 canvas.rotate(-mValues[0]); in onDraw() 113 canvas.drawPath(mPath, mPaint); in onDraw()
|
/development/samples/CrossCompatibility/src/com/example/android/touchexample/ |
D | TouchExampleView.java | 56 public void onDraw(Canvas canvas) { in onDraw() argument 57 super.onDraw(canvas); in onDraw() 59 canvas.save(); in onDraw() 60 canvas.translate(mPosX, mPosY); in onDraw() 61 canvas.scale(mScaleFactor, mScaleFactor); in onDraw() 62 mIcon.draw(canvas); in onDraw() 63 canvas.restore(); in onDraw()
|
/development/samples/devbytes/animation/ListViewRemovalAnimation/src/com/example/android/listviewremovalanimation/ |
D | BackgroundContainer.java | 66 protected void onDraw(Canvas canvas) { in onDraw() argument 71 canvas.save(); in onDraw() 72 canvas.translate(0, mOpenAreaTop); in onDraw() 73 mShadowedBackground.draw(canvas); in onDraw() 74 canvas.restore(); in onDraw()
|
/development/samples/devbytes/animation/ListViewItemAnimations/src/com/example/android/listviewitemanimations/ |
D | BackgroundContainer.java | 65 protected void onDraw(Canvas canvas) { in onDraw() argument 70 canvas.save(); in onDraw() 71 canvas.translate(0, mOpenAreaTop); in onDraw() 72 mShadowedBackground.draw(canvas); in onDraw() 73 canvas.restore(); in onDraw()
|
/development/samples/devbytes/animation/ToonGame/src/com/example/android/toongame/ |
D | SkewableTextView.java | 49 protected void onDraw(Canvas canvas) { in onDraw() argument 51 canvas.translate(0, getHeight()); in onDraw() 52 canvas.skew(mSkewX, 0); in onDraw() 53 canvas.translate(0, -getHeight()); in onDraw() 55 super.onDraw(canvas); in onDraw()
|