Lines Matching refs:canvas

14 void test_concave(SkCanvas* canvas, const SkPaint& paint) {  in test_concave()  argument
16 canvas->translate(0, 0); in test_concave()
21 canvas->drawPath(path, paint); in test_concave()
25 void test_reverse_concave(SkCanvas* canvas, const SkPaint& paint) { in test_reverse_concave() argument
27 canvas->save(); in test_reverse_concave()
28 canvas->translate(100, 0); in test_reverse_concave()
33 canvas->drawPath(path, paint); in test_reverse_concave()
34 canvas->restore(); in test_reverse_concave()
38 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument
40 canvas->save(); in test_bowtie()
41 canvas->translate(200, 0); in test_bowtie()
46 canvas->drawPath(path, paint); in test_bowtie()
47 canvas->restore(); in test_bowtie()
51 void test_fake_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_fake_bowtie() argument
53 canvas->save(); in test_fake_bowtie()
54 canvas->translate(300, 0); in test_fake_bowtie()
61 canvas->drawPath(path, paint); in test_fake_bowtie()
62 canvas->restore(); in test_fake_bowtie()
67 void test_intruding_vertex(SkCanvas* canvas, const SkPaint& paint) { in test_intruding_vertex() argument
69 canvas->save(); in test_intruding_vertex()
70 canvas->translate(400, 0); in test_intruding_vertex()
78 canvas->drawPath(path, paint); in test_intruding_vertex()
79 canvas->restore(); in test_intruding_vertex()
84 void test_inversion_repeat_vertex(SkCanvas* canvas, const SkPaint& paint) { in test_inversion_repeat_vertex() argument
86 canvas->save(); in test_inversion_repeat_vertex()
87 canvas->translate(400, 100); in test_inversion_repeat_vertex()
95 canvas->drawPath(path, paint); in test_inversion_repeat_vertex()
96 canvas->restore(); in test_inversion_repeat_vertex()
100 void test_fish(SkCanvas* canvas, const SkPaint& paint) { in test_fish() argument
102 canvas->save(); in test_fish()
103 canvas->translate(0, 100); in test_fish()
110 canvas->drawPath(path, paint); in test_fish()
111 canvas->restore(); in test_fish()
116 void test_fast_forward(SkCanvas* canvas, const SkPaint& paint) { in test_fast_forward() argument
118 canvas->save(); in test_fast_forward()
119 canvas->translate(100, 100); in test_fast_forward()
126 canvas->drawPath(path, paint); in test_fast_forward()
127 canvas->restore(); in test_fast_forward()
131 void test_hole(SkCanvas* canvas, const SkPaint& paint) { in test_hole() argument
133 canvas->save(); in test_hole()
134 canvas->translate(200, 100); in test_hole()
137 canvas->drawPath(path, paint); in test_hole()
138 canvas->restore(); in test_hole()
142 void test_star(SkCanvas* canvas, const SkPaint& paint) { in test_star() argument
143 canvas->save(); in test_star()
144 canvas->translate(300, 100); in test_star()
145 canvas->drawPath(SkPath().addPoly({{30,20}, {50,80}, {70,20}, {20,57}, {80,57}}, false), in test_star()
147 canvas->restore(); in test_star()
151 void test_twist(SkCanvas* canvas, const SkPaint& paint) { in test_twist() argument
153 canvas->save(); in test_twist()
158 canvas->translate(420, 220); in test_twist()
159 canvas->scale(10, 10); in test_twist()
160 canvas->drawPath(path, paint); in test_twist()
161 canvas->restore(); in test_twist()
165 void test_stairstep(SkCanvas* canvas, const SkPaint& paint) { in test_stairstep() argument
167 canvas->save(); in test_stairstep()
168 canvas->translate(0, 200); in test_stairstep()
175 canvas->drawPath(path, paint); in test_stairstep()
176 canvas->restore(); in test_stairstep()
179 void test_stairstep2(SkCanvas* canvas, const SkPaint& paint) { in test_stairstep2() argument
181 canvas->save(); in test_stairstep2()
182 canvas->translate(100, 200); in test_stairstep2()
188 canvas->drawPath(path, paint); in test_stairstep2()
189 canvas->restore(); in test_stairstep2()
193 void test_overlapping(SkCanvas* canvas, const SkPaint& paint) { in test_overlapping() argument
195 canvas->save(); in test_overlapping()
196 canvas->translate(200, 200); in test_overlapping()
201 canvas->drawPath(path, paint); in test_overlapping()
202 canvas->restore(); in test_overlapping()
207 void test_partners(SkCanvas* canvas, const SkPaint& paint) { in test_partners() argument
209 canvas->save(); in test_partners()
210 canvas->translate(300, 200); in test_partners()
221 canvas->drawPath(path, paint); in test_partners()
222 canvas->restore(); in test_partners()
227 void test_winding_merged_to_zero(SkCanvas* canvas, const SkPaint& paint) { in test_winding_merged_to_zero() argument
229 canvas->save(); in test_winding_merged_to_zero()
230 canvas->translate(400, 350); in test_winding_merged_to_zero()
239 canvas->drawPath(path, paint); in test_winding_merged_to_zero()
240 canvas->restore(); in test_winding_merged_to_zero()
244 void test_monotone_1(SkCanvas* canvas, const SkPaint& paint) { in test_monotone_1() argument
246 canvas->save(); in test_monotone_1()
247 canvas->translate(0, 300); in test_monotone_1()
253 canvas->drawPath(path, paint); in test_monotone_1()
254 canvas->restore(); in test_monotone_1()
258 void test_monotone_2(SkCanvas* canvas, const SkPaint& paint) { in test_monotone_2() argument
260 canvas->save(); in test_monotone_2()
261 canvas->translate(100, 300); in test_monotone_2()
266 canvas->drawPath(path, paint); in test_monotone_2()
267 canvas->restore(); in test_monotone_2()
271 void test_monotone_3(SkCanvas* canvas, const SkPaint& paint) { in test_monotone_3() argument
273 canvas->save(); in test_monotone_3()
274 canvas->translate(200, 300); in test_monotone_3()
279 canvas->drawPath(path, paint); in test_monotone_3()
280 canvas->restore(); in test_monotone_3()
284 void test_monotone_4(SkCanvas* canvas, const SkPaint& paint) { in test_monotone_4() argument
286 canvas->save(); in test_monotone_4()
287 canvas->translate(300, 300); in test_monotone_4()
294 canvas->drawPath(path, paint); in test_monotone_4()
295 canvas->restore(); in test_monotone_4()
299 void test_monotone_5(SkCanvas* canvas, const SkPaint& paint) { in test_monotone_5() argument
301 canvas->save(); in test_monotone_5()
302 canvas->translate(0, 400); in test_monotone_5()
307 canvas->drawPath(path, paint); in test_monotone_5()
308 canvas->restore(); in test_monotone_5()
311 void test_degenerate(SkCanvas* canvas, const SkPaint& paint) { in test_degenerate() argument
313 canvas->save(); in test_degenerate()
314 canvas->translate(100, 400); in test_degenerate()
321 canvas->drawPath(path, paint); in test_degenerate()
322 canvas->restore(); in test_degenerate()
325 void test_coincident_edge(SkCanvas* canvas, const SkPaint& paint) { in test_coincident_edge() argument
327 canvas->save(); in test_coincident_edge()
328 canvas->translate(200, 400); in test_coincident_edge()
338 canvas->drawPath(path, paint); in test_coincident_edge()
339 canvas->restore(); in test_coincident_edge()
343 void test_bowtie_coincident_triangle(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie_coincident_triangle() argument
345 canvas->save(); in test_bowtie_coincident_triangle()
346 canvas->translate(300, 400); in test_bowtie_coincident_triangle()
354 canvas->drawPath(path, paint); in test_bowtie_coincident_triangle()
355 canvas->restore(); in test_bowtie_coincident_triangle()
360 void test_collinear_outer_boundary_edge(SkCanvas* canvas, const SkPaint& paint) { in test_collinear_outer_boundary_edge() argument
362 canvas->save(); in test_collinear_outer_boundary_edge()
363 canvas->translate(400, 400); in test_collinear_outer_boundary_edge()
370 canvas->drawPath(path, paint); in test_collinear_outer_boundary_edge()
371 canvas->restore(); in test_collinear_outer_boundary_edge()
375 void test_coincident_edges_1(SkCanvas* canvas, const SkPaint& paint) { in test_coincident_edges_1() argument
377 canvas->save(); in test_coincident_edges_1()
378 canvas->translate(0, 500); in test_coincident_edges_1()
385 canvas->drawPath(path, paint); in test_coincident_edges_1()
386 canvas->restore(); in test_coincident_edges_1()
389 void test_coincident_edges_2(SkCanvas* canvas, const SkPaint& paint) { in test_coincident_edges_2() argument
391 canvas->save(); in test_coincident_edges_2()
392 canvas->translate(100, 500); in test_coincident_edges_2()
399 canvas->drawPath(path, paint); in test_coincident_edges_2()
400 canvas->restore(); in test_coincident_edges_2()
403 void test_coincident_edges_3(SkCanvas* canvas, const SkPaint& paint) { in test_coincident_edges_3() argument
405 canvas->save(); in test_coincident_edges_3()
406 canvas->translate(200, 500); in test_coincident_edges_3()
413 canvas->drawPath(path, paint); in test_coincident_edges_3()
414 canvas->restore(); in test_coincident_edges_3()
417 void test_coincident_edges_4(SkCanvas* canvas, const SkPaint& paint) { in test_coincident_edges_4() argument
419 canvas->save(); in test_coincident_edges_4()
420 canvas->translate(300, 500); in test_coincident_edges_4()
427 canvas->drawPath(path, paint); in test_coincident_edges_4()
428 canvas->restore(); in test_coincident_edges_4()
433 DEF_SIMPLE_GM(concavepaths, canvas, 500, 600) {
439 test_concave(canvas, paint);
440 test_reverse_concave(canvas, paint);
441 test_bowtie(canvas, paint);
442 test_fake_bowtie(canvas, paint);
443 test_intruding_vertex(canvas, paint);
444 test_fish(canvas, paint);
445 test_fast_forward(canvas, paint);
446 test_hole(canvas, paint);
447 test_star(canvas, paint);
448 test_twist(canvas, paint);
449 test_inversion_repeat_vertex(canvas, paint);
450 test_stairstep(canvas, paint);
451 test_stairstep2(canvas, paint);
452 test_overlapping(canvas, paint);
453 test_partners(canvas, paint);
454 test_winding_merged_to_zero(canvas, paint);
455 test_monotone_1(canvas, paint);
456 test_monotone_2(canvas, paint);
457 test_monotone_3(canvas, paint);
458 test_monotone_4(canvas, paint);
459 test_monotone_5(canvas, paint);
460 test_degenerate(canvas, paint);
461 test_coincident_edge(canvas, paint);
462 test_bowtie_coincident_triangle(canvas, paint);
463 test_collinear_outer_boundary_edge(canvas, paint);
464 test_coincident_edges_1(canvas, paint);
465 test_coincident_edges_2(canvas, paint);
466 test_coincident_edges_3(canvas, paint);
467 test_coincident_edges_4(canvas, paint);