Home
last modified time | relevance | path

Searched refs:canvas (Results 1 – 25 of 615) sorted by relevance

12345678910>>...25

/external/skia/samplecode/
DSamplePicture.cpp48 static void drawCircle(SkCanvas* canvas, int r, SkColor color) { in drawCircle() argument
53 canvas->drawCircle(SkIntToScalar(r), SkIntToScalar(r), SkIntToScalar(r), in drawCircle()
66 SkCanvas* canvas = fPicture->beginRecording(100, 100); in PictureView() local
70 canvas->drawBitmap(fBitmap, 0, 0, NULL); in PictureView()
72 drawCircle(canvas, 50, SK_ColorBLACK); in PictureView()
74 canvas->drawPicture(*fSubPicture); in PictureView()
75 canvas->translate(SkIntToScalar(50), 0); in PictureView()
76 canvas->drawPicture(*fSubPicture); in PictureView()
77 canvas->translate(0, SkIntToScalar(50)); in PictureView()
78 canvas->drawPicture(*fSubPicture); in PictureView()
[all …]
DSampleAARects.cpp21 SkCanvas canvas(bitmap); in createBitmap() local
28 canvas.drawOval(r, paint); in createBitmap()
32 canvas.drawLine(0, 0, r.fRight, r.fBottom, paint); in createBitmap()
33 canvas.drawLine(0, r.fBottom, r.fRight, 0, paint); in createBitmap()
60 virtual void onDrawContent(SkCanvas* canvas) { in onDrawContent() argument
61 canvas->translate(SkIntToScalar(10), SkIntToScalar(10)); in onDrawContent()
87 canvas->save(); in onDrawContent()
92 canvas->drawRect(rect, paints[p]); in onDrawContent()
93 canvas->translate(dx, 0); in onDrawContent()
99 canvas->drawRect(rect, paints[p]); in onDrawContent()
[all …]
DSampleFillType.cpp40 void showPath(SkCanvas* canvas, int x, int y, SkPath::FillType ft, in showPath() argument
45 canvas->save(); in showPath()
46 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in showPath()
47 canvas->clipRect(r); in showPath()
48 canvas->drawColor(SK_ColorWHITE); in showPath()
50 canvas->translate(r.centerX(), r.centerY()); in showPath()
51 canvas->scale(scale, scale); in showPath()
52 canvas->translate(-r.centerX(), -r.centerY()); in showPath()
53 canvas->drawPath(fPath, paint); in showPath()
54 canvas->restore(); in showPath()
[all …]
DSampleLayers.cpp39 static void dump_layers(const char label[], SkCanvas* canvas) { in dump_layers() argument
42 SkCanvas::LayerIter iter(canvas, true); in dump_layers()
56 static void test_fade(SkCanvas* canvas) { in test_fade() argument
57 SkAutoCanvasRestore ar(canvas, true); in test_fade()
64 SkAutoCanvasRestore(canvas, false); in test_fade()
69 canvas->clipRect(r); in test_fade()
72canvas->saveLayer(&r, NULL, (SkCanvas::SaveFlags)(SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kF… in test_fade()
76canvas->saveLayer(&r, NULL, (SkCanvas::SaveFlags)(SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kF… in test_fade()
83 canvas->saveLayerAlpha(&r, 0x80); in test_fade()
88 canvas->drawOval(r, p); in test_fade()
[all …]
DSampleMipMap.cpp21 SkCanvas canvas(bitmap); in createBitmap() local
28 canvas.drawOval(r, paint); in createBitmap()
32 canvas.drawLine(0, 0, r.fRight, r.fBottom, paint); in createBitmap()
33 canvas.drawLine(0, r.fBottom, r.fRight, 0, paint); in createBitmap()
60 void drawN(SkCanvas* canvas, const SkBitmap& bitmap) { in drawN() argument
61 SkAutoCanvasRestore acr(canvas, true); in drawN()
63 canvas->drawBitmap(bitmap, 0, 0, NULL); in drawN()
64 canvas->translate(SkIntToScalar(N + 8), 0); in drawN()
65 canvas->scale(SK_ScalarHalf, SK_ScalarHalf); in drawN()
69 void drawN2(SkCanvas* canvas, const SkBitmap& bitmap) { in drawN2() argument
[all …]
DSampleConcavePaths.cpp42 virtual void onDrawContent(SkCanvas* canvas) { in onDrawContent() argument
51 canvas->translate(0, 0); in onDrawContent()
56 canvas->drawPath(path, paint); in onDrawContent()
61 canvas->save(); in onDrawContent()
62 canvas->translate(100, 0); in onDrawContent()
67 canvas->drawPath(path, paint); in onDrawContent()
68 canvas->restore(); in onDrawContent()
73 canvas->save(); in onDrawContent()
74 canvas->translate(200, 0); in onDrawContent()
79 canvas->drawPath(path, paint); in onDrawContent()
[all …]
DSampleCircle.cpp18 static void test_circlebounds(SkCanvas* canvas) { in test_circlebounds() argument
49 void circle(SkCanvas* canvas, int width, bool aa) { in circle() argument
59 canvas->drawCircle(0, 0, SkIntToScalar(9) + fRAD, paint); in circle()
62 void drawSix(SkCanvas* canvas, SkScalar dx, SkScalar dy) { in drawSix() argument
64 canvas->save(); in drawSix()
65 circle(canvas, width, false); in drawSix()
66 canvas->translate(0, dy); in drawSix()
67 circle(canvas, width, true); in drawSix()
68 canvas->restore(); in drawSix()
69 canvas->translate(dx, 0); in drawSix()
[all …]
DSampleDraw.cpp14 static void test_clearonlayers(SkCanvas* canvas) { in test_clearonlayers() argument
15 SkCanvas& c = *canvas; in test_clearonlayers()
38 static void test_strokerect(SkCanvas* canvas, const SkRect& r) { in test_strokerect() argument
45 canvas->drawRect(r, p); in test_strokerect()
52 canvas->drawPath(path, p); in test_strokerect()
55 static void test_strokerect(SkCanvas* canvas) { in test_strokerect() argument
56 canvas->drawColor(SK_ColorWHITE); in test_strokerect()
62 test_strokerect(canvas, r); in test_strokerect()
63 canvas->translate(0, 20); in test_strokerect()
67 test_strokerect(canvas, r); in test_strokerect()
[all …]
DSamplePolyToPoly.cpp87 static void doDraw(SkCanvas* canvas, SkPaint* paint, const int isrc[], in doDraw() argument
97 canvas->save(); in doDraw()
99 canvas->concat(matrix); in doDraw()
104 canvas->drawRectCoords(0, 0, D, D, *paint); in doDraw()
105 canvas->drawLine(0, 0, D, D, *paint); in doDraw()
106 canvas->drawLine(0, D, D, 0, *paint); in doDraw()
116 canvas->drawText(str.c_str(), str.size(), x, y, *paint); in doDraw()
118 canvas->restore(); in doDraw()
121 virtual void onDrawContent(SkCanvas* canvas) { in onDrawContent() argument
128 canvas->save(); in onDrawContent()
[all …]
DSampleArc.cpp56 static void drawRectWithLines(SkCanvas* canvas, const SkRect& r, const SkPaint& p) { in drawRectWithLines() argument
57 canvas->drawRect(r, p); in drawRectWithLines()
58 canvas->drawLine(r.fLeft, r.fTop, r.fRight, r.fBottom, p); in drawRectWithLines()
59 canvas->drawLine(r.fLeft, r.fBottom, r.fRight, r.fTop, p); in drawRectWithLines()
60 canvas->drawLine(r.fLeft, r.centerY(), r.fRight, r.centerY(), p); in drawRectWithLines()
61 canvas->drawLine(r.centerX(), r.fTop, r.centerX(), r.fBottom, p); in drawRectWithLines()
64 static void draw_label(SkCanvas* canvas, const SkRect& rect, in draw_label() argument
76 canvas->drawText(str.c_str(), str.size(), rect.centerX(), in draw_label()
80 static void drawArcs(SkCanvas* canvas) { in drawArcs() argument
90 canvas->save(); in drawArcs()
[all …]
DSampleComplexClip.cpp29 virtual void onDrawContent(SkCanvas* canvas) { in onDrawContent() argument
75 canvas->translate(SkIntToScalar(10),SkIntToScalar(10)); in onDrawContent()
76 canvas->drawPath(path, pathPaint); in onDrawContent()
78 canvas->drawPath(clipA, paint); in onDrawContent()
80 canvas->drawPath(clipB, paint); in onDrawContent()
93 canvas->translate(0, SkIntToScalar(40)); in onDrawContent()
94 canvas->scale(3 * SK_Scalar1 / 4, 3 * SK_Scalar1 / 4); in onDrawContent()
95 canvas->save(); in onDrawContent()
101 canvas->restore(); in onDrawContent()
102 canvas->translate(0, SkIntToScalar(250)); in onDrawContent()
[all …]
DSampleEmptyPath.cpp28 void drawEmpty(SkCanvas* canvas, in drawEmpty() argument
38 canvas->save(); in drawEmpty()
39 canvas->clipRect(clip); in drawEmpty()
40 canvas->drawPath(path, paint); in drawEmpty()
41 canvas->restore(); in drawEmpty()
44 virtual void onDrawContent(SkCanvas* canvas) { in onDrawContent() argument
71 canvas->drawText(title, strlen(title), in onDrawContent()
79 canvas->save(); in onDrawContent()
80 canvas->translate(80 * SK_Scalar1, 0); in onDrawContent()
81 canvas->save(); in onDrawContent()
[all …]
/external/skia/gm/
Daaclip.cpp18 void draw (SkCanvas* canvas, SkRect& target, int x, int y) { in draw() argument
29 canvas->save(); in draw()
30 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in draw()
32 canvas->drawRect(target, borderPaint); in draw()
34 canvas->drawRect(target, backgroundPaint); in draw()
35 canvas->clipRect(target, SkRegion::kIntersect_Op, true); in draw()
37 canvas->drawRect(target, foregroundPaint); in draw()
38 canvas->restore(); in draw()
41 void draw_square (SkCanvas* canvas, int x, int y) { in draw_square() argument
43 draw(canvas, target, x, y); in draw_square()
[all …]
Dfilltypes.cpp31 void showPath(SkCanvas* canvas, int x, int y, SkPath::FillType ft, in showPath() argument
36 canvas->save(); in showPath()
37 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in showPath()
38 canvas->clipRect(r); in showPath()
39 canvas->drawColor(SK_ColorWHITE); in showPath()
41 canvas->translate(r.centerX(), r.centerY()); in showPath()
42 canvas->scale(scale, scale); in showPath()
43 canvas->translate(-r.centerX(), -r.centerY()); in showPath()
44 canvas->drawPath(fPath, paint); in showPath()
45 canvas->restore(); in showPath()
[all …]
Dfilltypespersp.cpp31 void showPath(SkCanvas* canvas, int x, int y, SkPath::FillType ft, in showPath() argument
36 canvas->save(); in showPath()
37 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in showPath()
38 canvas->clipRect(r); in showPath()
39 canvas->drawColor(SK_ColorWHITE); in showPath()
41 canvas->translate(r.centerX(), r.centerY()); in showPath()
42 canvas->scale(scale, scale); in showPath()
43 canvas->translate(-r.centerX(), -r.centerY()); in showPath()
44 canvas->drawPath(fPath, paint); in showPath()
45 canvas->restore(); in showPath()
[all …]
Dpathreverse.cpp13 static void test_path(SkCanvas* canvas, const SkPath& path) { in test_path() argument
16 canvas->drawPath(path, paint); in test_path()
20 canvas->drawPath(path, paint); in test_path()
23 static void test_rev(SkCanvas* canvas, const SkPath& path) { in test_rev() argument
24 test_path(canvas, path); in test_rev()
28 canvas->save(); in test_rev()
29 canvas->translate(150, 0); in test_rev()
30 test_path(canvas, rev); in test_rev()
31 canvas->restore(); in test_rev()
34 static void test_rev(SkCanvas* canvas) { in test_rev() argument
[all …]
Dpoly2poly.cpp25 static void doDraw(SkCanvas* canvas, SkPaint* paint, const int isrc[], in doDraw() argument
35 canvas->save(); in doDraw()
37 canvas->concat(matrix); in doDraw()
42 canvas->drawRectCoords(0, 0, D, D, *paint); in doDraw()
43 canvas->drawLine(0, 0, D, D, *paint); in doDraw()
44 canvas->drawLine(0, D, D, 0, *paint); in doDraw()
54 canvas->drawText(str.c_str(), str.size(), x, y, *paint); in doDraw()
56 canvas->restore(); in doDraw()
59 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
66 canvas->save(); in onDraw()
[all …]
Dlinepaths.cpp25 void drawPath(SkPath& path,SkCanvas* canvas,SkColor color, in drawPath() argument
36 canvas->save(); in drawPath()
37 canvas->clipRect(clip); in drawPath()
38 canvas->drawPath(path, paint); in drawPath()
39 canvas->restore(); in drawPath()
42 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
88 canvas->drawText(title, strlen(title), in onDraw()
95 canvas->save(); in onDraw()
96 canvas->translate(10 * SK_Scalar1, 30 * SK_Scalar1); in onDraw()
97 canvas->save(); in onDraw()
[all …]
Dcubicpaths.cpp25 void drawPath(SkPath& path,SkCanvas* canvas,SkColor color, in drawPath() argument
36 canvas->save(); in drawPath()
37 canvas->clipRect(clip); in drawPath()
38 canvas->drawPath(path, paint); in drawPath()
39 canvas->restore(); in drawPath()
42 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
90 canvas->drawText(title, strlen(title), in onDraw()
97 canvas->save(); in onDraw()
98 canvas->translate(10 * SK_Scalar1, 30 * SK_Scalar1); in onDraw()
99 canvas->save(); in onDraw()
[all …]
Dquadpaths.cpp25 void drawPath(SkPath& path,SkCanvas* canvas,SkColor color, in drawPath() argument
36 canvas->save(); in drawPath()
37 canvas->clipRect(clip); in drawPath()
38 canvas->drawPath(path, paint); in drawPath()
39 canvas->restore(); in drawPath()
42 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
89 canvas->drawText(title, strlen(title), in onDraw()
96 canvas->save(); in onDraw()
97 canvas->translate(10 * SK_Scalar1, 30 * SK_Scalar1); in onDraw()
98 canvas->save(); in onDraw()
[all …]
Demptypath.cpp26 void drawEmpty(SkCanvas* canvas, in drawEmpty() argument
36 canvas->save(); in drawEmpty()
37 canvas->clipRect(clip); in drawEmpty()
38 canvas->drawPath(path, paint); in drawEmpty()
39 canvas->restore(); in drawEmpty()
42 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
70 canvas->drawText(title, strlen(title), in onDraw()
78 canvas->save(); in onDraw()
79 canvas->translate(10 * SK_Scalar1, 0); in onDraw()
80 canvas->save(); in onDraw()
[all …]
Dbitmapscroll.cpp33 SkCanvas canvas(*bitmap); in make_bitmap() local
37 canvas.drawRectCoords( 0, 0, w*2, h*2, pRed); in make_bitmap()
38 canvas.drawRectCoords(w*2, 0, w*4, h*2, pGreen); in make_bitmap()
39 canvas.drawRectCoords( 0, h*2, w*2, h*4, pBlue); in make_bitmap()
40 canvas.drawRectCoords(w*2, h*2, w*4, h*4, pWhite); in make_bitmap()
41 canvas.drawRectCoords(w, h, w*3, h*3, pAlphaGray); in make_bitmap()
42 canvas.drawLine(w*2, 0, w*2, h*4, pLine); in make_bitmap()
43 canvas.drawLine( 0, h*2, w*4, h*2, pLine); in make_bitmap()
44 canvas.drawRectCoords(w, h, w*3, h*3, pLine); in make_bitmap()
64 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
[all …]
/external/webkit/Source/WebKit/android/plugins/
DANPCanvasInterface.cpp35 static void anp_deleteCanvas(ANPCanvas* canvas) { in anp_deleteCanvas() argument
36 delete canvas; in anp_deleteCanvas()
39 static void anp_save(ANPCanvas* canvas) { in anp_save() argument
40 canvas->skcanvas->save(); in anp_save()
43 static void anp_restore(ANPCanvas* canvas) { in anp_restore() argument
44 canvas->skcanvas->restore(); in anp_restore()
47 static void anp_translate(ANPCanvas* canvas, float tx, float ty) { in anp_translate() argument
48 canvas->skcanvas->translate(SkFloatToScalar(tx), SkFloatToScalar(ty)); in anp_translate()
51 static void anp_scale(ANPCanvas* canvas, float sx, float sy) { in anp_scale() argument
52 canvas->skcanvas->scale(SkFloatToScalar(sx), SkFloatToScalar(sy)); in anp_scale()
[all …]
/external/skia/tests/
DDeferredCanvasTest.cpp28 SkDeferredCanvas canvas(&device); in TestDeferredCanvasBitmapAccess() local
30 canvas.clear(0x00000000); in TestDeferredCanvasBitmapAccess()
34 SkBitmap accessed = canvas.getDevice()->accessBitmap(false); in TestDeferredCanvasBitmapAccess()
44 SkDeferredCanvas canvas(&device); in TestDeferredCanvasFlush() local
46 canvas.clear(0x00000000); in TestDeferredCanvasFlush()
50 canvas.flush(); in TestDeferredCanvasFlush()
64 SkDeferredCanvas canvas(&device); in TestDeferredCanvasFreshFrame() local
67 REPORTER_ASSERT(reporter, canvas.getDeferredDevice()->isFreshFrame()); in TestDeferredCanvasFreshFrame()
69 REPORTER_ASSERT(reporter, !canvas.getDeferredDevice()->isFreshFrame()); in TestDeferredCanvasFreshFrame()
72 canvas.clear(0x00000000); in TestDeferredCanvasFreshFrame()
[all …]
/external/webkit/Source/WebCore/html/canvas/
DCanvasRenderingContext.cpp39 CanvasRenderingContext::CanvasRenderingContext(HTMLCanvasElement* canvas) in CanvasRenderingContext() argument
40 : m_canvas(canvas) in CanvasRenderingContext()
56 if (canvas()->originClean() && pattern && !pattern->originClean()) in checkOrigin()
57 canvas()->setOriginTainted(); in checkOrigin()
62 if (canvas()->originClean() && sourceCanvas && !sourceCanvas->originClean()) in checkOrigin()
63 canvas()->setOriginTainted(); in checkOrigin()
68 if (!image || !canvas()->originClean()) in checkOrigin()
74 if (canvas()->originClean() && !cachedImage->image()->hasSingleSecurityOrigin()) in checkOrigin()
75 canvas()->setOriginTainted(); in checkOrigin()
82 if (canvas()->originClean() && video && !video->hasSingleSecurityOrigin()) in checkOrigin()
[all …]

12345678910>>...25