/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
ShapesActivity.java | 21 import android.graphics.Canvas; 71 protected void onDraw(Canvas canvas) { 72 super.onDraw(canvas); 74 canvas.save(); 75 canvas.translate(50.0f, 50.0f); 76 canvas.drawRoundRect(mRect, 6.0f, 6.0f, mNormalPaint); 78 canvas.translate(0.0f, 110.0f); 79 canvas.drawRoundRect(mRect, 6.0f, 6.0f, mStrokePaint); 81 canvas.translate(0.0f, 110.0f) [all...] |
PathsActivity.java | 24 import android.graphics.Canvas; 101 Canvas canvas = new Canvas(mBitmap); local 102 canvas.translate(-mPathBounds.left + mOffset * 1.5f, -mPathBounds.top + mOffset * 1.5f); 103 canvas.drawPath(mPath, mMediumPaint); 104 canvas.setBitmap(null); 108 protected void onDraw(Canvas canvas) { 109 super.onDraw(canvas); [all...] |
QuickRejectActivity.java | 23 import android.graphics.Canvas; 52 protected void onDraw(Canvas canvas) { 53 super.onDraw(canvas); 55 int count = canvas.getSaveCount(); 57 count = canvas.save(); 59 count = canvas.getSaveCount(); 61 canvas.restore(); 62 count = canvas.getSaveCount(); 64 canvas.save() [all...] |
ClearActivity.java | 23 import android.graphics.Canvas; 67 protected void onDraw(Canvas canvas) { 68 super.onDraw(canvas); 70 canvas.save(); { 71 canvas.drawARGB(255, 255, 255, 255); 72 canvas.drawRect(100.0f, 100.0f, 200.0f, 200.0f, mClearPaint); 73 canvas.drawCircle(150.0f, 400.0f, 100.0f, mClearPaint); 74 canvas.drawBitmap(mBitmap1, 400.0f, 100.0f, mClearPaint); 75 canvas.save(); [all...] |
RotationActivity.java | 21 import android.graphics.Canvas; 52 protected void onDraw(Canvas canvas) { 53 canvas.save(); 54 canvas.translate(dipToPx(getContext(), 400), dipToPx(getContext(), 200)); 55 canvas.rotate(45.0f); 56 canvas.drawRGB(255, 255, 255); 58 canvas.drawRect(-80.0f, -80.0f, 80.0f, 80.0f, mPaint); 59 canvas.drawRect(0.0f, 0.0f, 220.0f, 220.0f, mPaint); 60 canvas.restore() [all...] |
SimplePatchActivity.java | 21 import android.graphics.Canvas; 45 protected void onDraw(Canvas canvas) { 46 super.onDraw(canvas); 47 canvas.save(); 48 canvas.translate(200, 200); 50 mDrawable.draw(canvas); 52 mDrawable.draw(canvas); 53 canvas.restore();
|
Bitmaps3dActivity.java | 23 import android.graphics.Canvas; 60 protected void onDraw(Canvas canvas) { 61 super.onDraw(canvas); 63 canvas.drawColor(0xffffffff); 65 canvas.save(); 66 canvas.translate(120.0f, 50.0f); 68 canvas.concat(mMatrix); 69 canvas.drawBitmap(mBitmap1, 0.0f, 0.0f, mBitmapPaint); 71 canvas.restore() [all...] |
ColorFiltersActivity.java | 23 import android.graphics.Canvas; 69 protected void onDraw(Canvas canvas) { 70 super.onDraw(canvas); 72 canvas.drawARGB(255, 255, 255, 255); 74 canvas.save(); 75 canvas.translate(120.0f, 50.0f); 76 canvas.drawBitmap(mBitmap1, 0.0f, 0.0f, mColorMatrixPaint); 78 canvas.translate(0.0f, 50.0f + mBitmap1.getHeight()); 79 canvas.drawBitmap(mBitmap1, 0.0f, 0.0f, mLightingPaint) [all...] |
FramebufferBlendActivity.java | 24 import android.graphics.Canvas; 64 protected void onDraw(Canvas canvas) { 65 super.onDraw(canvas); 66 canvas.drawRGB(255, 255, 255); 68 canvas.save(); 69 canvas.translate(40.0f, 40.0f); 71 drawBlendedBitmap(canvas, PorterDuff.Mode.DARKEN); 72 drawBlendedBitmap(canvas, PorterDuff.Mode.LIGHTEN); 73 drawBlendedBitmap(canvas, PorterDuff.Mode.MULTIPLY) [all...] |
Transform3dActivity.java | 24 import android.graphics.Canvas; 52 protected void onDraw(Canvas canvas) { 53 super.onDraw(canvas); 55 canvas.drawARGB(255, 255, 255, 255); 64 drawBitmap(canvas, centerX, centerY, 0.0f, matrix); 67 drawBitmap(canvas, centerX, centerY, -mBitmap1.getWidth(), matrix); 70 drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth(), matrix); 73 drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth() * 2.0f, matrix); 77 private void drawBitmap(Canvas canvas, float centerX, float centerY, float offset [all...] |
AdvancedGradientsActivity.java | 21 import android.graphics.Canvas; 69 protected void onDraw(Canvas canvas) { 70 super.onDraw(canvas); 71 canvas.drawRGB(255, 255, 255); 73 canvas.save(); 74 canvas.translate(130.0f, 100.0f); 78 canvas.drawRect(0.0f, 0.0f, 200.0f, 200.0f, mPaint); 80 canvas.translate(400.0f, 000.0f); 84 canvas.drawRect(0.0f, 0.0f, 200.0f, 200.0f, mPaint); [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
PathFillTypes.java | 50 private void showPath(Canvas canvas, int x, int y, Path.FillType ft, 52 canvas.save(); 53 canvas.translate(x, y); 54 canvas.clipRect(0, 0, 120, 120); 55 canvas.drawColor(Color.WHITE); 57 canvas.drawPath(mPath, paint); 58 canvas.restore(); 61 @Override protected void onDraw(Canvas canvas) { [all...] |
Clipping.java | 49 private void drawScene(Canvas canvas) { 50 canvas.clipRect(0, 0, 100, 100); 52 canvas.drawColor(Color.WHITE); 55 canvas.drawLine(0, 0, 100, 100, mPaint); 58 canvas.drawCircle(30, 70, 30, mPaint); 61 canvas.drawText("Clipping", 100, 30, mPaint); 64 @Override protected void onDraw(Canvas canvas) { 65 canvas.drawColor(Color.GRAY) [all...] |
Regions.java | 49 private void drawOriginalRects(Canvas canvas, int alpha) { 53 drawCentered(canvas, mRect1, mPaint); 56 drawCentered(canvas, mRect2, mPaint); 62 private void drawRgn(Canvas canvas, int color, String str, Region.Op op) { 65 canvas.drawText(str, 80, 24, mPaint); 76 canvas.translate(0, 30); 79 canvas.drawRect(r, mPaint); 81 drawOriginalRects(canvas, 0x80) [all...] |
Xfermodes.java | 22 import android.graphics.Canvas; 39 Canvas c = new Canvas(bm); 50 Canvas c = new Canvas(bm); 117 @Override protected void onDraw(Canvas canvas) { 118 canvas.drawColor(Color.WHITE); 126 canvas.translate(15, 35); 134 canvas.drawRect(x - 0.5f, y - 0.5f [all...] |
/development/samples/CrossCompatibility/src/com/example/android/touchexample/ |
TouchExampleView.java | 19 import android.graphics.Canvas; 56 public void onDraw(Canvas canvas) { 57 super.onDraw(canvas); 59 canvas.save(); 60 canvas.translate(mPosX, mPosY); 61 canvas.scale(mScaleFactor, mScaleFactor); 62 mIcon.draw(canvas); 63 canvas.restore();
|
/frameworks/base/graphics/java/android/graphics/drawable/shapes/ |
PathShape.java | 19 import android.graphics.Canvas; 25 * The path can be drawn to a Canvas with its own draw() method, 55 public void draw(Canvas canvas, Paint paint) { 56 canvas.save(); 57 canvas.scale(mScaleX, mScaleY); 58 canvas.drawPath(mPath, paint); 59 canvas.restore();
|
/frameworks/base/core/java/android/text/style/ |
DynamicDrawableSpan.java | 19 import android.graphics.Canvas; 95 public void draw(Canvas canvas, CharSequence text, 99 canvas.save(); 106 canvas.translate(x, transY); 107 b.draw(canvas); 108 canvas.restore();
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
PictureDrawable.java | 20 import android.graphics.Canvas; 67 public void draw(Canvas canvas) { 70 canvas.save(); 71 canvas.clipRect(bounds); 72 canvas.translate(bounds.left, bounds.top); 73 canvas.drawPicture(mPicture); 74 canvas.restore();
|
/packages/apps/Gallery2/src/com/android/gallery3d/gadget/ |
WidgetUtils.java | 26 import android.graphics.Canvas; 72 Canvas canvas = new Canvas(target); local 73 canvas.translate(sStackPhotoWidth / 2, sStackPhotoHeight / 2); 74 canvas.rotate(rotation); 75 canvas.scale(scale, scale); 77 canvas.drawBitmap(bitmap, -w / 2, -h / 2, paint);
|
/external/webkit/LayoutTests/fast/js/resources/ |
getOwnPropertyDescriptor.js | 53 var canvas = document.createElement("canvas"); variable 54 var canvasPixelArray = canvas.getContext("2d").createImageData(10,10).data;
|
/external/webkit/Source/WebKit/android/jni/ |
WebFrameView.cpp | 64 SkCanvas* canvas = ctx->platformContext()->mCanvas; local 65 canvas->drawColor(SK_ColorWHITE); 74 SkCanvas* canvas = ctx->platformContext() ? ctx->platformContext()->mCanvas : NULL; local 75 if (canvas) { 86 // Translate the canvas, add a clip. 87 canvas->save(); 88 canvas->translate(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y())); 89 canvas->clipRect(transRect); 92 if (canvas) 93 canvas->restore() [all...] |
/cts/tests/tests/graphics/src/android/graphics/cts/ |
PorterDuffColorFilterTest.java | 19 import android.graphics.Canvas; 50 Canvas canvas = new Canvas(target); local 55 canvas.drawBitmap(b1, 0, 0, p); 57 canvas.drawBitmap(b2, 0, height / 2, p); 68 canvas.drawBitmap(b1, 0, 0, p); 70 canvas.drawBitmap(b2, 0, height / 2, p); 78 canvas.drawBitmap(b1, 0, 0, p); 80 canvas.drawBitmap(b2, 0, height / 2, p) [all...] |
PorterDuffXfermodeTest.java | 23 import android.graphics.Canvas; 51 Canvas canvas = new Canvas(target); local 53 canvas.drawBitmap(b1, 0, 0, p); 55 canvas.drawBitmap(b2, 0, HEIGHT / 2, p); 62 canvas.drawBitmap(b1, 0, 0, p); 64 canvas.drawBitmap(b2, 0, HEIGHT / 2, p); 71 canvas.drawBitmap(b1, 0, 0, p); 73 canvas.drawBitmap(b2, 0, HEIGHT / 2, p) [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/os/ |
Sensors.java | 28 import android.graphics.Canvas; 58 private Canvas mCanvas = new Canvas(); 106 protected void onDraw(Canvas canvas) { 116 final Canvas cavas = mCanvas; 126 canvas.drawBitmap(mBitmap, 0, 0, null); 134 canvas.save(Canvas.MATRIX_SAVE_FLAG); 135 canvas.translate(x, w*0.5f + 4.0f) 177 final Canvas canvas = mCanvas; local [all...] |