/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
GradientStopsActivity.java | 21 import android.graphics.Canvas; 44 protected void onDraw(Canvas canvas) { 53 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); 62 canvas.translate(0.0f, 75.0f); 63 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); 72 canvas.translate(0.0f, 75.0f); 73 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); 81 canvas.translate(0.0f, 75.0f); 82 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint) [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...] |
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...] |
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...] |
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...] |
PathsCacheActivity.java | 21 import android.graphics.Canvas; 89 protected void onDraw(Canvas canvas) { 90 super.onDraw(canvas); 92 canvas.drawARGB(255, 255, 255, 255); 94 canvas.save(); 95 canvas.translate(550.0f, 60.0f); 96 canvas.drawPath(mPath, mMediumPaint); 101 canvas.translate(30.0f, 30.0f); 102 canvas.drawPath(mPath, mMediumPaint) [all...] |
MipMapActivity.java | 23 import android.graphics.Canvas; 62 protected void onDraw(Canvas canvas) { 63 super.onDraw(canvas); 65 canvas.save(); 66 canvas.scale(0.3f, 0.3f); 67 canvas.drawBitmap(mBitmap1, 0, 0, mBitmapPaint); 68 canvas.restore(); 70 canvas.save(); 71 canvas.translate(mBitmap1.getWidth() * 0.3f + 96.0f, 0.0f) [all...] |
LinesActivity.java | 25 import android.graphics.Canvas; 115 protected void onDraw(Canvas canvas) { 116 super.onDraw(canvas); 118 canvas.save(); 119 canvas.translate(100.0f, 20.0f); 121 canvas.drawLine(0.0f, 0.0f, 40.0f, 400.0f, mSmallPaint); 122 canvas.drawLine(5.0f, 0.0f, 95.0f, 400.0f, mMediumPaint); 123 canvas.drawLine(22.0f, 0.0f, 162.0f, 400.0f, mLargePaint); 126 canvas.drawLine(42.0f, 0.0f, 222.0f, 400.0f, mLargePaint) [all...] |
/external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/ui/ |
LayoutManager.java | 82 public void draw(Canvas canvas) throws PlotRenderException {
84 drawSpacing(canvas, displayDims.canvasRect, displayDims.marginatedRect, marginPaint);
87 drawSpacing(canvas, displayDims.marginatedRect, displayDims.paddedRect, paddingPaint);
90 //int canvasState = canvas.save(Canvas.ALL_SAVE_FLAG); // preserve clipping etc
92 canvas.save(Canvas.ALL_SAVE_FLAG);
105 canvas.drawRect(dims.canvasRect, outlineShadowPaint);
113 //canvas.clipRect(clipRect, Region.Op.REPLACE); [all...] |
/frameworks/base/tools/layoutlib/bridge/src/android/view/ |
ViewGroup_Delegate.java | 24 import android.graphics.Canvas; 46 /*package*/ static boolean drawChild(ViewGroup thisVG, Canvas canvas, View child, 56 int restoreTo = transformCanvas(thisVG, canvas, child); 57 drawShadow(thisVG, canvas, child, outline); 58 canvas.restoreToCount(restoreTo); 61 return thisVG.drawChild_Original(canvas, child, drawingTime); 64 private static void drawShadow(ViewGroup parent, Canvas canvas, View child, 68 RectShadowPainter.paintShadow(outline, elevation, canvas); [all...] |
/cts/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/ |
CanvasClientView.java | 19 import android.graphics.Canvas; 48 public void onDraw(Canvas canvas) { 50 String s = canvas.isHardwareAccelerated() ? "HARDWARE" : "SOFTWARE"; 54 canvas.drawText(s, 200, 200, paint); 56 if (mCanvasClient == null) throw new IllegalStateException("Canvas client missing"); 58 canvas.save(); 59 canvas.clipRect(0, 0, ActivityTestBase.TEST_WIDTH, ActivityTestBase.TEST_HEIGHT); 60 mCanvasClient.draw(canvas, ActivityTestBase.TEST_WIDTH, ActivityTestBase.TEST_HEIGHT); 61 canvas.restore() [all...] |
/external/skia/gm/ |
alphagradients.cpp | 25 static void draw_grad(SkCanvas* canvas, const SkRect& r, 34 canvas->drawRect(r, paint); 38 canvas->drawRect(r, paint); 41 void onDraw(SkCanvas* canvas) override { 62 canvas->translate(10, 10); 65 canvas->save(); 67 draw_grad(canvas, r, gRec[i].fColor0, gRec[i].fColor1, SkToBool(doPreMul)); 68 canvas->translate(0, r.height() + 8); 70 canvas->restore(); 71 canvas->translate(r.width() + 10, 0) [all...] |
fatpathfill.cpp | 22 static void draw_pixel_centers(SkCanvas* canvas) { 29 canvas->drawCircle(x + 0.5f, y + 0.5f, 1.5f / ZOOM, paint); 34 static void draw_fatpath(SkCanvas* canvas, SkSurface* surface, 42 surface->draw(canvas, 0, 0, NULL); 48 canvas->drawPath(paths[j], paint); 51 draw_pixel_centers(canvas); 68 virtual void onDraw(SkCanvas* canvas) { 71 canvas->scale(ZOOM, ZOOM); 82 draw_fatpath(canvas, surface, &path, 1); 84 canvas->translate(0, SMALL_H) [all...] |
imagefiltersbase.cpp | 108 static void draw_paint(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { 112 canvas->save(); 113 canvas->clipRect(r); 114 canvas->drawPaint(paint); 115 canvas->restore(); 118 static void draw_line(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { 123 canvas->drawLine(r.fLeft, r.fTop, r.fRight, r.fBottom, paint); 126 static void draw_rect(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { 132 canvas->drawRect(rr, paint); 135 static void draw_path(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) [all...] |
multipicturedraw.cpp | 60 SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth), local 71 canvas->saveLayer(NULL, NULL); 72 canvas->translate(xPos, yPos + ((x % 2) ? kRoot3Over2 * kHexSide : 0)); 73 canvas->drawPath(hex, fill); 74 canvas->drawPath(hex, stroke); 75 canvas->restore(); 111 SkCanvas* canvas = recorder.beginRecording(kBig, kBig, &bbhFactory, local 114 canvas->saveLayer(NULL, NULL); 122 canvas->save(); 123 canvas->translate(xPos, yPos + ((x % 2) ? kRoot3Over2 * kHexSide : 0)) 166 SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth), local 186 SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth), local 221 SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth), local [all...] |
imagefilterscropexpand.cpp | 41 SkCanvas canvas(*bitmap); 42 canvas.clear(0xFFFF0000); 49 canvas.save(); 50 canvas.translate(SkIntToScalar(x), SkIntToScalar(y)); 51 canvas.drawRect(SkRect::MakeXYWH(0, 0, 8, 8), darkPaint); 52 canvas.drawRect(SkRect::MakeXYWH(8, 0, 8, 8), lightPaint); 53 canvas.drawRect(SkRect::MakeXYWH(0, 8, 8, 8), lightPaint); 54 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint); 55 canvas.restore(); 65 SkCanvas canvas(*bitmap) [all...] |
recordopts.cpp | 57 static void draw_save_layer_draw_rect_restore_sequence(SkCanvas* canvas, SkColor shapeColor, 62 canvas->saveLayer(&targetRect, &layerPaint); 66 canvas->drawRect(targetRect, drawPaint); 67 canvas->restore(); 72 static void draw_save_layer_draw_bitmap_restore_sequence(SkCanvas* canvas, SkColor shapeColor, 79 SkCanvas canvas(bitmap); 83 canvas.drawRect(SkRect::MakeWH(SkIntToScalar(7), SkIntToScalar(7)), p); 84 canvas.flush(); 90 canvas->saveLayer(&targetRect, &layerPaint); 93 canvas->drawBitmap(bitmap, SkIntToScalar(0), SkIntToScalar(0), &drawPaint) 106 SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kTestRectSize + 2), local [all...] |
colormatrix.cpp | 67 SkCanvas canvas(bm); 68 canvas.clear(0x0); 73 canvas.drawRect(SkRect::MakeXYWH(SkIntToScalar(x), 84 SkCanvas canvas(bm); 85 canvas.clear(0x0); 92 canvas.drawRect(SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)), paint); 96 virtual void onDraw(SkCanvas* canvas) { 108 canvas->drawBitmap(bmps[i], 0, 0, &paint); 112 canvas->drawBitmap(bmps[i], 80, 0, &paint); 116 canvas->drawBitmap(bmps[i], 160, 0, &paint) [all...] |
extractbitmap.cpp | 22 SkCanvas canvas(*bitmap); 23 canvas.drawColor(SK_ColorRED); 26 canvas.drawCircle(SkIntToScalar(W)/2, SkIntToScalar(H)/2, SkIntToScalar(W)/2, paint); 43 void onDraw(SkCanvas* canvas) override { 49 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); 51 canvas->drawBitmap(bitmap, 0, 0); 59 canvas->drawBitmap(subset, 0, 0); 62 canvas->drawBitmap(subset, SkIntToScalar(x), SkIntToScalar(y)); 66 SkAutoCanvasRestore autoRestore(canvas, true); 67 canvas->translate(0, SkIntToScalar(bitmap.height() + 20)) [all...] |
hairmodes.cpp | 36 static SkScalar drawCell(SkCanvas* canvas, SkXfermode* mode, SkAlpha a0, SkAlpha a1) { 46 canvas->drawOval(r, paint); 55 canvas->drawLine(W/2, H/2, W/2 + x, H/2 + y, paint); 91 void onDraw(SkCanvas* canvas) override { 95 canvas->translate(SkIntToScalar(4), SkIntToScalar(4)); 98 canvas->save(); 99 canvas->save(); 102 canvas->restore(); 103 canvas->translate(W * 5, 0); 104 canvas->save() [all...] |
/external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/xy/ |
StepRenderer.java | 39 //canvas.drawPoint(point.x, lastPoint.y, format.getVertexPaint());
41 //canvas.drawLine(point.x, lastPoint.y, point.x, point.y, format.getLinePaint());
61 public void onRender(Canvas canvas, RectF plotArea) throws PlotRenderException {
67 drawSeries(canvas, plotArea, series, getFormatter(series));
74 public void doDrawLegendIcon(Canvas canvas, RectF rect, String text, StepFormatter formatter) {
78 canvas.drawLine(rect.left, rect.top, rect.right, rect.bottom, formatter.getLinePaint());
79 canvas.drawPoint(centerX, centerY, formatter.getVertexPaint());
80 //canvas.drawRect(rect, formatter.getLinePaint()); [all...] |
/external/skia/samplecode/ |
SampleEmptyPath.cpp | 29 void drawEmpty(SkCanvas* canvas, 39 canvas->save(); 40 canvas->clipRect(clip); 41 canvas->drawPath(path, paint); 42 canvas->restore(); 45 virtual void onDrawContent(SkCanvas* canvas) { 72 canvas->drawText(title, strlen(title), 80 canvas->save(); 81 canvas->translate(80 * SK_Scalar1, 0); 82 canvas->save() [all...] |
SampleRegion.cpp | 18 static void test_strokerect(SkCanvas* canvas) { 45 canvas->drawBitmap(bitmap, 0, 0, NULL); 50 canvas->drawBitmap(bitmap, SkIntToScalar(2*width), 0, NULL); 53 static void drawFadingText(SkCanvas* canvas, 67 canvas->saveLayer(&bounds, NULL); 68 canvas->drawText(text, len, x, y, paint); 85 canvas->drawRect(bounds, p); 87 canvas->restore(); 90 static void test_text(SkCanvas* canvas) { 100 canvas->drawText(str, len, x, y, paint) 326 test_strokerect(canvas); variable 330 test_text(canvas); variable [all...] |
/external/skia/src/utils/debugger/ |
SkDrawCommand.h | 98 virtual bool render(SkCanvas* canvas) const { return false; } 113 void execute(SkCanvas* canvas) const override; 123 void execute(SkCanvas* canvas) const override; 133 void execute(SkCanvas* canvas) const override; 134 bool render(SkCanvas* canvas) const override; 146 void execute(SkCanvas* canvas) const override; 157 void execute(SkCanvas* canvas) const override; 174 void execute(SkCanvas* canvas) const override; 175 bool render(SkCanvas* canvas) const override; 192 void execute(SkCanvas* canvas) const override [all...] |
/external/skia/tests/ |
QuickRejectTest.cpp | 39 bool next(SkCanvas* canvas, SkPaint*) override { 42 canvas->translate(SkIntToScalar(10), 0); 63 SkCanvas canvas(dst); 70 canvas.drawBitmap(src, 0, 0, &paint); 78 canvas.drawBitmap(src, SkIntToScalar(-10), 0, &paint); 82 // to the left. The test is to ensure that canvas' quickReject machinary 86 canvas.drawBitmap(src, SkIntToScalar(-10), 0, &paint); 91 SkCanvas canvas(100, 100); 94 REPORTER_ASSERT(reporter, false == canvas.quickReject(r)); 97 REPORTER_ASSERT(reporter, true == canvas.quickReject(r)) [all...] |