Home
last modified time | relevance | path

Searched refs:paint (Results 1 – 25 of 2222) sorted by relevance

12345678910>>...89

/external/skia/gm/
Dconcavepaths.cpp16 void test_concave(SkCanvas* canvas, const SkPaint& paint) { in test_concave() argument
18 canvas->drawPath(SkPath::Polygon({{20,20}, {80,20}, {30,30}, {20,80}}, false), paint); in test_concave()
22 void test_reverse_concave(SkCanvas* canvas, const SkPaint& paint) { in test_reverse_concave() argument
25 canvas->drawPath(SkPath::Polygon({{20,20}, {20,80}, {30,30}, {80,20}}, false), paint); in test_reverse_concave()
30 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument
33 canvas->drawPath(SkPath::Polygon({{20,20}, {80,80}, {80,20}, {20,80}}, false), paint); in test_bowtie()
38 void test_fake_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_fake_bowtie() argument
42 false), paint); in test_fake_bowtie()
48 void test_intruding_vertex(SkCanvas* canvas, const SkPaint& paint) { in test_intruding_vertex() argument
52 false, SkPathFillType::kWinding, true), paint); in test_intruding_vertex()
[all …]
Ddisplacement.cpp55 void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) const { in drawClippedBitmap()
59 canvas->drawImage(fImage, 0, 0, SkSamplingOptions(), &paint); in drawClippedBitmap()
65 SkPaint paint; in onDraw() local
67 paint.setImageFilter(SkImageFilters::DisplacementMap( in onDraw()
69 this->drawClippedBitmap(canvas, 0, 0, paint); in onDraw()
70 paint.setImageFilter(SkImageFilters::DisplacementMap( in onDraw()
72 this->drawClippedBitmap(canvas, 100, 0, paint); in onDraw()
73 paint.setImageFilter(SkImageFilters::DisplacementMap( in onDraw()
75 this->drawClippedBitmap(canvas, 200, 0, paint); in onDraw()
76 paint.setImageFilter(SkImageFilters::DisplacementMap( in onDraw()
[all …]
Ddaa.cpp23 SkPaint paint; variable
24 paint.setAntiAlias(true);
27 paint.setColor(SK_ColorBLACK);
29 K*1.5f, K*0.5f, SkFont(), paint);
31 paint.setColor(SK_ColorRED);
32 canvas->drawRect({0,0,K,K}, paint);
40 paint.setColor(SK_ColorGREEN);
41 canvas->drawPath(path, paint);
46 paint.setColor(SK_ColorBLACK);
48 K*1.5f, K*0.5f, SkFont(), paint);
[all …]
Dblurs.cpp39 SkPaint paint; variable
40 paint.setAntiAlias(true);
41 paint.setColor(SK_ColorBLUE);
47 paint.setMaskFilter(SkMaskFilter::MakeBlur(gRecs[i].fStyle,
50 paint.setMaskFilter(nullptr);
55 paint);
60 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle,
64 paint.setColor(SK_ColorBLACK);
65 canvas->drawString("Hamburgefons Style", x, y, font, paint);
67 x, y + SkIntToScalar(50), font, paint);
[all …]
Dconicpaths.cpp103 SkPaint paint; in drawGiantCircle() local
104 canvas->drawPath(fGiantCircle, paint); in drawGiantCircle()
113 SkPaint paint; in onDraw() local
117 paint.setARGB(kAlphaValue[a], 0, 0, 0); in onDraw()
119 paint.setAntiAlias(SkToBool(aa)); in onDraw()
121 paint.setStroke(fh != 0); in onDraw()
126 canvas->drawPath(fPaths[p], paint); in onDraw()
155 SkPaint paint; variable
156 paint.setAntiAlias(true);
157 paint.setStroke(true);
[all …]
Dpatheffects.cpp32 static void compose_pe(SkPaint* paint) { in compose_pe() argument
33 SkPathEffect* pe = paint->getPathEffect(); in compose_pe()
41 paint->setPathEffect(compose); in compose_pe()
44 static void hair_pe(SkPaint* paint) { in hair_pe() argument
45 paint->setStrokeWidth(0); in hair_pe()
48 static void hair2_pe(SkPaint* paint) { in hair2_pe() argument
49 paint->setStrokeWidth(0); in hair2_pe()
50 compose_pe(paint); in hair2_pe()
53 static void stroke_pe(SkPaint* paint) { in stroke_pe() argument
54 paint->setStrokeWidth(12); in stroke_pe()
[all …]
Dcollapsepaths.cpp14 void test_collapse1(SkCanvas* canvas, const SkPaint& paint) { in test_collapse1() argument
25 canvas->drawPath(path.detach(), paint); in test_collapse1()
28 void test_collapse2(SkCanvas* canvas, const SkPaint& paint) { in test_collapse2() argument
37 canvas->drawPath(path.detach(), paint); in test_collapse2()
40 void test_collapse3(SkCanvas* canvas, const SkPaint& paint) { in test_collapse3() argument
49 canvas->drawPath(path.detach(), paint); in test_collapse3()
52 void test_collapse4(SkCanvas* canvas, const SkPaint& paint) { in test_collapse4() argument
61 canvas->drawPath(path.detach(), paint); in test_collapse4()
64 void test_collapse5(SkCanvas* canvas, const SkPaint& paint) { in test_collapse5() argument
74 canvas->drawPath(path.detach(), paint); in test_collapse5()
[all …]
/external/skqp/src/utils/
DSkPaintFilterCanvas.cpp17 AutoPaintFilter(const SkPaintFilterCanvas* canvas, Type type, const SkPaint* paint) in AutoPaintFilter() argument
18 : fPaint(paint) { in AutoPaintFilter()
22 AutoPaintFilter(const SkPaintFilterCanvas* canvas, Type type, const SkPaint& paint) in AutoPaintFilter() argument
23 : AutoPaintFilter(canvas, type, &paint) { } in AutoPaintFilter()
25 const SkPaint* paint() const { return fPaint; } in paint() function in SkPaintFilterCanvas::AutoPaintFilter
45 void SkPaintFilterCanvas::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
46 AutoPaintFilter apf(this, kPaint_Type, paint); in onDrawPaint()
48 this->SkNWayCanvas::onDrawPaint(*apf.paint()); in onDrawPaint()
53 const SkPaint& paint) { in onDrawPoints() argument
54 AutoPaintFilter apf(this, kPoint_Type, paint); in onDrawPoints()
[all …]
/external/skia/src/utils/
DSkPaintFilterCanvas.cpp18 AutoPaintFilter(const SkPaintFilterCanvas* canvas, const SkPaint* paint) in AutoPaintFilter() argument
19 : fPaint(paint ? *paint : SkPaint()) { in AutoPaintFilter()
23 AutoPaintFilter(const SkPaintFilterCanvas* canvas, const SkPaint& paint) in AutoPaintFilter() argument
24 : AutoPaintFilter(canvas, &paint) { } in AutoPaintFilter()
26 const SkPaint& paint() const { return fPaint; } in paint() function in SkPaintFilterCanvas::AutoPaintFilter
46 void SkPaintFilterCanvas::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
47 AutoPaintFilter apf(this, paint); in onDrawPaint()
49 this->SkNWayCanvas::onDrawPaint(apf.paint()); in onDrawPaint()
53 void SkPaintFilterCanvas::onDrawBehind(const SkPaint& paint) { in onDrawBehind() argument
54 AutoPaintFilter apf(this, paint); in onDrawBehind()
[all …]
/external/skqp/gm/
Ddisplacement.cpp49 void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) const { in drawClippedBitmap()
53 canvas->drawBitmap(fBitmap, 0, 0, &paint); in drawClippedBitmap()
59 SkPaint paint; in onDraw() local
61 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
64 this->drawClippedBitmap(canvas, 0, 0, paint); in onDraw()
65 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
68 this->drawClippedBitmap(canvas, 100, 0, paint); in onDraw()
69 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
72 this->drawClippedBitmap(canvas, 200, 0, paint); in onDraw()
73 paint.setImageFilter(SkDisplacementMapEffect::Make( in onDraw()
[all …]
Dconcavepaths.cpp14 void test_concave(SkCanvas* canvas, const SkPaint& paint) { in test_concave() argument
21 canvas->drawPath(path, paint); in test_concave()
25 void test_reverse_concave(SkCanvas* canvas, const SkPaint& paint) { in test_reverse_concave() argument
33 canvas->drawPath(path, paint); in test_reverse_concave()
38 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument
46 canvas->drawPath(path, paint); in test_bowtie()
51 void test_fake_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_fake_bowtie() argument
61 canvas->drawPath(path, paint); in test_fake_bowtie()
67 void test_intruding_vertex(SkCanvas* canvas, const SkPaint& paint) { in test_intruding_vertex() argument
78 canvas->drawPath(path, paint); in test_intruding_vertex()
[all …]
Dcolormatrix.cpp16 static void set_color_matrix(SkPaint* paint, const SkColorMatrix& matrix) { in set_color_matrix() argument
17 paint->setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix.fMat)); in set_color_matrix()
20 static void set_array(SkPaint* paint, const SkScalar array[]) { in set_array() argument
21 paint->setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(array)); in set_array()
51 SkPaint paint; in CreateSolidBitmap() local
52 paint.setColor(SkColorSetARGB(255, x * 255 / width, y * 255 / height, 0)); in CreateSolidBitmap()
54 SkIntToScalar(y), SK_Scalar1, SK_Scalar1), paint); in CreateSolidBitmap()
69 SkPaint paint; in CreateTransparentBitmap() local
70 paint.setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, 2, in CreateTransparentBitmap()
72 canvas.drawRect(SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)), paint); in CreateTransparentBitmap()
[all …]
Dpatheffects.cpp18 static void compose_pe(SkPaint* paint) { in compose_pe() argument
19 SkPathEffect* pe = paint->getPathEffect(); in compose_pe()
27 paint->setPathEffect(compose); in compose_pe()
30 static void hair_pe(SkPaint* paint) { in hair_pe() argument
31 paint->setStrokeWidth(0); in hair_pe()
34 static void hair2_pe(SkPaint* paint) { in hair2_pe() argument
35 paint->setStrokeWidth(0); in hair2_pe()
36 compose_pe(paint); in hair2_pe()
39 static void stroke_pe(SkPaint* paint) { in stroke_pe() argument
40 paint->setStrokeWidth(12); in stroke_pe()
[all …]
Dpatch.cpp27 SkPaint paint; in draw_control_points() local
37 paint.setColor(SK_ColorBLACK); in draw_control_points()
38 paint.setStrokeWidth(0.5f); in draw_control_points()
40 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, bottom, paint); in draw_control_points()
41 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, bottom + 1, paint); in draw_control_points()
42 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, top, paint); in draw_control_points()
43 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, left, paint); in draw_control_points()
44 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, right, paint); in draw_control_points()
46 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, top + 1, paint); in draw_control_points()
47 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, left + 1, paint); in draw_control_points()
[all …]
/external/skia/modules/canvaskit/tests/
Dcanvas.spec.js18 const paint = new CanvasKit.Paint(); constant
19 paint.setStrokeWidth(2.0);
20 paint.setAntiAlias(true);
21 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0));
22 paint.setStyle(CanvasKit.PaintStyle.Stroke);
24 canvas.drawLine(3, 10, 30, 15, paint);
26 canvas.drawRRect(rrect, paint);
28 canvas.drawOval(CanvasKit.LTRBRect(5, 35, 45, 80), paint);
30 canvas.drawArc(CanvasKit.LTRBRect(55, 35, 95, 80), 15, 270, true, paint);
33 canvas.drawText('this is ascii text', 5, 100, paint, font);
[all …]
Dpath.spec.js18 const paint = new CanvasKit.Paint(); constant
19 paint.setStrokeWidth(1.0);
20 paint.setAntiAlias(true);
21 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0));
22 paint.setStyle(CanvasKit.PaintStyle.Stroke);
50 canvas.drawPath(path, paint);
56 canvas.drawPath(rrectPath, paint);
60 paint.delete();
258 const paint = new CanvasKit.Paint(); constant
259 paint.setStyle(CanvasKit.PaintStyle.Stroke);
[all …]
Dcore.spec.js21 const paint = new CanvasKit.Paint(); constant
22 paint.setStrokeWidth(2.0);
23 paint.setAntiAlias(true);
24 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0));
25 paint.setStyle(CanvasKit.PaintStyle.Stroke);
27 rcanvas.drawRRect(CanvasKit.RRectXY([5, 35, 45, 80], 15, 10), paint);
30 rcanvas.drawText('this picture has a round rect', 5, 100, paint, font);
33 paint.delete();
104 let paint = new CanvasKit.Paint();
105 canvas.drawImage(img, 0, 0, paint);
[all …]
/external/skia/tests/
DPaintTest.cpp24 SkPaint paint; in DEF_TEST() local
26 paint.setStyle(SkPaint::kStrokeAndFill_Style); in DEF_TEST()
27 paint.setStrokeWidth(SkIntToScalar(2)); in DEF_TEST()
29 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, in DEF_TEST()
33 SkPaint copiedPaint = paint; in DEF_TEST()
34 REPORTER_ASSERT(reporter, paint.getHash() == copiedPaint.getHash()); in DEF_TEST()
35 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
38 copiedPaint = paint; in DEF_TEST()
39 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
43 paint.reset(); in DEF_TEST()
[all …]
DGpuDrawPathTest.cpp27 SkPaint paint; in test_drawPathEmpty() local
29 canvas->drawRect(emptyRect, paint); in test_drawPathEmpty()
30 canvas->drawPath(SkPath(), paint); in test_drawPathEmpty()
31 canvas->drawOval(emptyRect, paint); in test_drawPathEmpty()
32 canvas->drawRect(emptyRect, paint); in test_drawPathEmpty()
33 canvas->drawRRect(SkRRect::MakeRect(emptyRect), paint); in test_drawPathEmpty()
36 paint.setAntiAlias(true); in test_drawPathEmpty()
37 paint.setStyle(SkPaint::kStroke_Style); in test_drawPathEmpty()
38 paint.setColor(SK_ColorGRAY); in test_drawPathEmpty()
39 paint.setStrokeWidth(SkIntToScalar(20)); in test_drawPathEmpty()
[all …]
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowCanvas.java77 protected void drawText(String text, float x, float y, Paint paint) { in drawText() argument
78 drawnTextEventHistory.add(new TextHistoryEvent(x, y, paint, text)); in drawText()
82 protected void drawText(CharSequence text, int start, int end, float x, float y, Paint paint) { in drawText() argument
84 new TextHistoryEvent(x, y, paint, text.subSequence(start, end).toString())); in drawText()
88 protected void drawText(char[] text, int index, int count, float x, float y, Paint paint) { in drawText() argument
89 drawnTextEventHistory.add(new TextHistoryEvent(x, y, paint, new String(text, index, count))); in drawText()
93 protected void drawText(String text, int start, int end, float x, float y, Paint paint) { in drawText() argument
94 drawnTextEventHistory.add(new TextHistoryEvent(x, y, paint, text.substring(start, end))); in drawText()
116 protected void drawPaint(Paint paint) { in drawPaint() argument
117 drawnPaint = paint; in drawPaint()
[all …]
/external/skqp/src/core/
DSkCanvas.cpp68 bool SkCanvas::wouldOverwriteEntireSurface(const SkRect* rect, const SkPaint* paint, in wouldOverwriteEntireSurface() argument
107 if (paint) { in wouldOverwriteEntireSurface()
108 SkPaint::Style paintStyle = paint->getStyle(); in wouldOverwriteEntireSurface()
113 if (paint->getMaskFilter() || paint->getLooper() in wouldOverwriteEntireSurface()
114 || paint->getPathEffect() || paint->getImageFilter()) { in wouldOverwriteEntireSurface()
118 return SkPaintPriv::Overwrites(paint, (SkPaintPriv::ShaderOverrideOpacity)overrideOpacity); in wouldOverwriteEntireSurface()
157 void SkCanvas::predrawNotify(const SkRect* rect, const SkPaint* paint, in predrawNotify() argument
166 if (this->wouldOverwriteEntireSurface(rect, paint, overrideOpacity)) { in predrawNotify()
192 DeviceCM(sk_sp<SkBaseDevice> device, const SkPaint* paint, const SkMatrix& stashed, in DeviceCM()
196 , fPaint(paint ? skstd::make_unique<SkPaint>(*paint) : nullptr) in DeviceCM()
[all …]
DSkPaint.cpp300 static FlatFlags unpack_paint_flags(SkPaint* paint, uint32_t packed, SkFont* font) { in unpack_paint_flags() argument
302 paint->setAntiAlias((f & kAA_PaintFlagForPaint) != 0); in unpack_paint_flags()
303 paint->setDither((f & kDither_PaintFlagForPaint) != 0); in unpack_paint_flags()
324 paint->setFilterQuality((SkFilterQuality)((packed >> 10) & BPF_Mask(kFilter_BPF))); in unpack_paint_flags()
345 static uint32_t pack_v68(const SkPaint& paint, unsigned flatFlags) { in pack_v68() argument
347 packed |= shift_bits(((unsigned)paint.isDither() << 1) | in pack_v68()
348 (unsigned)paint.isAntiAlias(), 0, 8); in pack_v68()
349 packed |= shift_bits(paint.getBlendMode(), 8, 8); in pack_v68()
350 packed |= shift_bits(paint.getStrokeCap(), 16, 2); in pack_v68()
351 packed |= shift_bits(paint.getStrokeJoin(), 18, 2); in pack_v68()
[all …]
DSkLiteDL.cpp87 SaveLayer(const SkRect* bounds, const SkPaint* paint, in SaveLayer()
91 if (paint) { this->paint = *paint; } in SaveLayer()
98 SkPaint paint; member
104 c->saveLayer({ maybe_unset(bounds), &paint, backdrop.get(), clipMask.get(), in draw()
175 DrawPaint(const SkPaint& paint) : paint(paint) {} in DrawPaint()
176 SkPaint paint; member
177 void draw(SkCanvas* c, const SkMatrix&) const { c->drawPaint(paint); } in draw()
181 DrawPath(const SkPath& path, const SkPaint& paint) : path(path), paint(paint) {} in DrawPath()
183 SkPaint paint; member
184 void draw(SkCanvas* c, const SkMatrix&) const { c->drawPath(path, paint); } in draw()
[all …]
DSkLiteRecorder.cpp60 void SkLiteRecorder::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument
61 fDL->drawPaint(paint); in onDrawPaint()
63 void SkLiteRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { in onDrawPath() argument
64 fDL->drawPath(path, paint); in onDrawPath()
66 void SkLiteRecorder::onDrawRect(const SkRect& rect, const SkPaint& paint) { in onDrawRect() argument
67 fDL->drawRect(rect, paint); in onDrawRect()
73 void SkLiteRecorder::onDrawRegion(const SkRegion& region, const SkPaint& paint) { in onDrawRegion() argument
74 fDL->drawRegion(region, paint); in onDrawRegion()
76 void SkLiteRecorder::onDrawOval(const SkRect& oval, const SkPaint& paint) { in onDrawOval() argument
77 fDL->drawOval(oval, paint); in onDrawOval()
[all …]
/external/skqp/tests/
DPaintTest.cpp132 SkPaint paint; in DEF_TEST() local
134 paint.setStyle(SkPaint::kStrokeAndFill_Style); in DEF_TEST()
135 paint.setStrokeWidth(SkIntToScalar(2)); in DEF_TEST()
138 paint.setLooper(looperBuilder.detach()); in DEF_TEST()
139 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, in DEF_TEST()
143 SkPaint copiedPaint = paint; in DEF_TEST()
144 REPORTER_ASSERT(reporter, paint.getHash() == copiedPaint.getHash()); in DEF_TEST()
145 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
148 copiedPaint = paint; in DEF_TEST()
149 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
[all …]

12345678910>>...89