Home
last modified time | relevance | path

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

12345678910>>...107

/third_party/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 …]
/third_party/flutter/skia/src/utils/
DSkPaintFilterCanvas.cpp17 AutoPaintFilter(const SkPaintFilterCanvas* canvas, const SkPaint* paint) in AutoPaintFilter() argument
18 : fPaint(paint ? *paint : SkPaint()) { in AutoPaintFilter()
22 AutoPaintFilter(const SkPaintFilterCanvas* canvas, const SkPaint& paint) in AutoPaintFilter() argument
23 : AutoPaintFilter(canvas, &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, paint); in onDrawPaint()
48 this->SkNWayCanvas::onDrawPaint(apf.paint()); in onDrawPaint()
52 void SkPaintFilterCanvas::onDrawBehind(const SkPaint& paint) { in onDrawBehind() argument
53 AutoPaintFilter apf(this, paint); in onDrawBehind()
[all …]
/third_party/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 …]
/third_party/flutter/skia/gm/
Ddisplacement.cpp56 void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) const { in drawClippedBitmap()
60 canvas->drawBitmap(fBitmap, 0, 0, &paint); in drawClippedBitmap()
66 SkPaint paint; in onDraw() local
68 paint.setImageFilter(SkImageFilters::DisplacementMap( in onDraw()
70 this->drawClippedBitmap(canvas, 0, 0, paint); in onDraw()
71 paint.setImageFilter(SkImageFilters::DisplacementMap( in onDraw()
73 this->drawClippedBitmap(canvas, 100, 0, paint); in onDraw()
74 paint.setImageFilter(SkImageFilters::DisplacementMap( in onDraw()
76 this->drawClippedBitmap(canvas, 200, 0, paint); in onDraw()
77 paint.setImageFilter(SkImageFilters::DisplacementMap( in onDraw()
[all …]
Dconcavepaths.cpp16 void test_concave(SkCanvas* canvas, const SkPaint& paint) { in test_concave() argument
23 canvas->drawPath(path, paint); in test_concave()
27 void test_reverse_concave(SkCanvas* canvas, const SkPaint& paint) { in test_reverse_concave() argument
35 canvas->drawPath(path, paint); in test_reverse_concave()
40 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument
48 canvas->drawPath(path, paint); in test_bowtie()
53 void test_fake_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_fake_bowtie() argument
63 canvas->drawPath(path, paint); in test_fake_bowtie()
69 void test_intruding_vertex(SkCanvas* canvas, const SkPaint& paint) { in test_intruding_vertex() argument
80 canvas->drawPath(path, paint); in test_intruding_vertex()
[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 …]
Dcolormatrix.cpp31 static void set_color_matrix(SkPaint* paint, const SkColorMatrix& matrix) { in set_color_matrix() argument
32 paint->setColorFilter(SkColorFilters::Matrix(matrix)); in set_color_matrix()
35 static void set_array(SkPaint* paint, const float array[]) { in set_array() argument
36 paint->setColorFilter(SkColorFilters::Matrix(array)); in set_array()
66 SkPaint paint; in CreateSolidBitmap() local
67 paint.setColor(SkColorSetARGB(255, x * 255 / width, y * 255 / height, 0)); in CreateSolidBitmap()
69 SkIntToScalar(y), SK_Scalar1, SK_Scalar1), paint); in CreateSolidBitmap()
84 SkPaint paint; in CreateTransparentBitmap() local
85 paint.setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, 2, in CreateTransparentBitmap()
87 canvas.drawRect(SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)), paint); in CreateTransparentBitmap()
[all …]
Dconicpaths.cpp97 SkPaint paint; in drawGiantCircle() local
98 canvas->drawPath(fGiantCircle, paint); in drawGiantCircle()
107 SkPaint paint; in onDraw() local
111 paint.setARGB(kAlphaValue[a], 0, 0, 0); in onDraw()
113 paint.setAntiAlias(SkToBool(aa)); in onDraw()
115 paint.setStyle(fh ? SkPaint::kStroke_Style : SkPaint::kFill_Style); in onDraw()
120 canvas->drawPath(fPaths[p], paint); in onDraw()
149 SkPaint paint; variable
150 paint.setAntiAlias(true);
151 paint.setStyle(SkPaint::kStroke_Style);
[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 …]
Dpatch.cpp38 SkPaint paint; in draw_control_points() local
48 paint.setColor(SK_ColorBLACK); in draw_control_points()
49 paint.setStrokeWidth(0.5f); in draw_control_points()
51 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, bottom, paint); in draw_control_points()
52 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, bottom + 1, paint); in draw_control_points()
53 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, top, paint); in draw_control_points()
54 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, left, paint); in draw_control_points()
55 canvas->drawPoints(SkCanvas::kLines_PointMode, 4, right, paint); in draw_control_points()
57 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, top + 1, paint); in draw_control_points()
58 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, left + 1, paint); in draw_control_points()
[all …]
Dcollapsepaths.cpp14 void test_collapse1(SkCanvas* canvas, const SkPaint& paint) { in test_collapse1() argument
25 canvas->drawPath(path, paint); in test_collapse1()
28 void test_collapse2(SkCanvas* canvas, const SkPaint& paint) { in test_collapse2() argument
37 canvas->drawPath(path, paint); in test_collapse2()
40 void test_collapse3(SkCanvas* canvas, const SkPaint& paint) { in test_collapse3() argument
49 canvas->drawPath(path, paint); in test_collapse3()
52 void test_collapse4(SkCanvas* canvas, const SkPaint& paint) { in test_collapse4() argument
61 canvas->drawPath(path, paint); in test_collapse4()
64 void test_collapse5(SkCanvas* canvas, const SkPaint& paint) { in test_collapse5() argument
74 canvas->drawPath(path, paint); in test_collapse5()
[all …]
/third_party/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();
259 const paint = new CanvasKit.Paint(); constant
260 paint.setStyle(CanvasKit.PaintStyle.Stroke);
[all …]
/third_party/flutter/skia/tests/
DPaintTest.cpp47 SkPaint paint; in DEF_TEST() local
49 paint.setStyle(SkPaint::kStrokeAndFill_Style); in DEF_TEST()
50 paint.setStrokeWidth(SkIntToScalar(2)); in DEF_TEST()
52 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, in DEF_TEST()
56 SkPaint copiedPaint = paint; in DEF_TEST()
57 REPORTER_ASSERT(reporter, paint.getHash() == copiedPaint.getHash()); in DEF_TEST()
58 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
61 copiedPaint = paint; in DEF_TEST()
62 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
66 paint.reset(); in DEF_TEST()
[all …]
/third_party/skia/tests/
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 …]
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 == copiedPaint); in DEF_TEST()
37 copiedPaint = paint; in DEF_TEST()
38 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
42 paint.reset(); in DEF_TEST()
44 REPORTER_ASSERT(reporter, cleanPaint == paint); in DEF_TEST()
[all …]
DDrawPathTest.cpp47 SkPaint paint; in test_big_aa_rect() local
48 paint.setAntiAlias(true); in test_big_aa_rect()
49 paint.setColor(SK_ColorWHITE); in test_big_aa_rect()
51 canvas->drawRect(r, paint); in test_big_aa_rect()
111 SkPaint paint; in test_crbug131181() local
112 paint.setAntiAlias(true); in test_crbug131181()
113 surface->getCanvas()->drawPath(path, paint); in test_crbug131181()
124 SkPaint paint; in test_crbug_140803() local
125 paint.setAntiAlias(true); in test_crbug_140803()
126 canvas.drawPath(SkPath().moveTo(2762, 20).quadTo(11, 21702, 10, 21706), paint); in test_crbug_140803()
[all …]
/third_party/flutter/skia/src/core/
DSkPaint.cpp234 static FlatFlags unpack_paint_flags(SkPaint* paint, uint32_t packed, SkFont* font) { in unpack_paint_flags() argument
236 paint->setAntiAlias((f & kAA_PaintFlagForPaint) != 0); in unpack_paint_flags()
237 paint->setDither((f & kDither_PaintFlagForPaint) != 0); in unpack_paint_flags()
258 paint->setFilterQuality((SkFilterQuality)((packed >> 10) & BPF_Mask(kFilter_BPF))); in unpack_paint_flags()
279 static uint32_t pack_v68(const SkPaint& paint, unsigned flatFlags) { in pack_v68() argument
281 packed |= shift_bits(((unsigned)paint.isDither() << 1) | in pack_v68()
282 (unsigned)paint.isAntiAlias(), 0, 8); in pack_v68()
283 packed |= shift_bits(paint.getBlendMode(), 8, 8); in pack_v68()
284 packed |= shift_bits(paint.getStrokeCap(), 16, 2); in pack_v68()
285 packed |= shift_bits(paint.getStrokeJoin(), 18, 2); in pack_v68()
[all …]
DSkCanvas.cpp67 bool SkCanvas::wouldOverwriteEntireSurface(const SkRect* rect, const SkPaint* paint, in wouldOverwriteEntireSurface() argument
106 if (paint) { in wouldOverwriteEntireSurface()
107 SkPaint::Style paintStyle = paint->getStyle(); in wouldOverwriteEntireSurface()
112 if (paint->getMaskFilter() || paint->getPathEffect() || paint->getImageFilter()) { in wouldOverwriteEntireSurface()
116 return SkPaintPriv::Overwrites(paint, (SkPaintPriv::ShaderOverrideOpacity)overrideOpacity); in wouldOverwriteEntireSurface()
155 void SkCanvas::predrawNotify(const SkRect* rect, const SkPaint* paint, in predrawNotify() argument
164 if (this->wouldOverwriteEntireSurface(rect, paint, overrideOpacity)) { in predrawNotify()
190 DeviceCM(sk_sp<SkBaseDevice> device, const SkPaint* paint, const SkMatrix& stashed, in DeviceCM()
194 , fPaint(paint ? skstd::make_unique<SkPaint>(*paint) : nullptr) in DeviceCM()
317 static sk_sp<SkColorFilter> image_to_color_filter(const SkPaint& paint) { in image_to_color_filter() argument
[all …]

12345678910>>...107