Lines Matching refs:canvas
16 void test_concave(SkCanvas* canvas, const SkPaint& paint) { in test_concave() argument
17 canvas->translate(0, 0); in test_concave()
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
23 canvas->save(); in test_reverse_concave()
24 canvas->translate(100, 0); in test_reverse_concave()
25 canvas->drawPath(SkPath::Polygon({{20,20}, {20,80}, {30,30}, {80,20}}, false), paint); in test_reverse_concave()
26 canvas->restore(); in test_reverse_concave()
30 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument
31 canvas->save(); in test_bowtie()
32 canvas->translate(200, 0); in test_bowtie()
33 canvas->drawPath(SkPath::Polygon({{20,20}, {80,80}, {80,20}, {20,80}}, false), paint); in test_bowtie()
34 canvas->restore(); in test_bowtie()
38 void test_fake_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_fake_bowtie() argument
39 canvas->save(); in test_fake_bowtie()
40 canvas->translate(300, 0); in test_fake_bowtie()
41 canvas->drawPath(SkPath::Polygon({{20,20}, {50,40}, {80,20}, {80,80}, {50,60}, {20,80}}, in test_fake_bowtie()
43 canvas->restore(); in test_fake_bowtie()
48 void test_intruding_vertex(SkCanvas* canvas, const SkPaint& paint) { in test_intruding_vertex() argument
49 canvas->save(); in test_intruding_vertex()
50 canvas->translate(400, 0); in test_intruding_vertex()
51 canvas->drawPath(SkPath::Polygon({{20,20}, {50,50}, {68,20}, {68,80}, {50,50}, {20,80}}, in test_intruding_vertex()
53 canvas->restore(); in test_intruding_vertex()
58 void test_inversion_repeat_vertex(SkCanvas* canvas, const SkPaint& paint) { in test_inversion_repeat_vertex() argument
59 canvas->save(); in test_inversion_repeat_vertex()
60 canvas->translate(400, 100); in test_inversion_repeat_vertex()
64 canvas->drawPath(SkPath::Polygon(pts, SK_ARRAY_COUNT(pts), false, in test_inversion_repeat_vertex()
66 canvas->restore(); in test_inversion_repeat_vertex()
70 void test_fish(SkCanvas* canvas, const SkPaint& paint) { in test_fish() argument
71 canvas->save(); in test_fish()
72 canvas->translate(0, 100); in test_fish()
73 canvas->drawPath(SkPath::Polygon({{20,20}, {80,80}, {70,50}, {80,20}, {20,80}, {0,50}}, false, in test_fish()
75 canvas->restore(); in test_fish()
80 void test_fast_forward(SkCanvas* canvas, const SkPaint& paint) { in test_fast_forward() argument
81 canvas->save(); in test_fast_forward()
82 canvas->translate(100, 100); in test_fast_forward()
86 canvas->drawPath(path, paint); in test_fast_forward()
87 canvas->restore(); in test_fast_forward()
91 void test_hole(SkCanvas* canvas, const SkPaint& paint) { in test_hole() argument
92 canvas->save(); in test_hole()
93 canvas->translate(200, 100); in test_hole()
97 canvas->drawPath(path, paint); in test_hole()
98 canvas->restore(); in test_hole()
102 void test_star(SkCanvas* canvas, const SkPaint& paint) { in test_star() argument
103 canvas->save(); in test_star()
104 canvas->translate(300, 100); in test_star()
105 canvas->drawPath(SkPath::Polygon({{30,20}, {50,80}, {70,20}, {20,57}, {80,57}}, false), in test_star()
107 canvas->restore(); in test_star()
111 void test_twist(SkCanvas* canvas, const SkPaint& paint) { in test_twist() argument
112 canvas->save(); in test_twist()
113 canvas->translate(420, 220); in test_twist()
114 canvas->scale(10, 10); in test_twist()
121 canvas->drawPath(SkPath::Polygon(pts, SK_ARRAY_COUNT(pts), false), paint); in test_twist()
122 canvas->restore(); in test_twist()
126 void test_stairstep(SkCanvas* canvas, const SkPaint& paint) { in test_stairstep() argument
127 canvas->save(); in test_stairstep()
128 canvas->translate(0, 200); in test_stairstep()
129 canvas->drawPath(SkPath::Polygon({{50,50}, {50,20}, {80,20}, {50,50}, {20,50}, {20,80}}, false), in test_stairstep()
131 canvas->restore(); in test_stairstep()
134 void test_stairstep2(SkCanvas* canvas, const SkPaint& paint) { in test_stairstep2() argument
135 canvas->save(); in test_stairstep2()
136 canvas->translate(100, 200); in test_stairstep2()
137 canvas->drawPath(SkPath::Polygon({{20,60}, {35,80}, {50,60}, {65,80}, {80,60}}, false), paint); in test_stairstep2()
138 canvas->restore(); in test_stairstep2()
142 void test_overlapping(SkCanvas* canvas, const SkPaint& paint) { in test_overlapping() argument
143 canvas->save(); in test_overlapping()
144 canvas->translate(200, 200); in test_overlapping()
145 canvas->drawPath(SkPath::Polygon({{20,80}, {80,80}, {80,20}, {80,30}}, false), paint); in test_overlapping()
146 canvas->restore(); in test_overlapping()
151 void test_partners(SkCanvas* canvas, const SkPaint& paint) { in test_partners() argument
152 canvas->save(); in test_partners()
153 canvas->translate(300, 200); in test_partners()
158 canvas->drawPath(path, paint); in test_partners()
159 canvas->restore(); in test_partners()
164 void test_winding_merged_to_zero(SkCanvas* canvas, const SkPaint& paint) { in test_winding_merged_to_zero() argument
166 canvas->save(); in test_winding_merged_to_zero()
167 canvas->translate(400, 350); in test_winding_merged_to_zero()
176 canvas->drawPath(path.detach(), paint); in test_winding_merged_to_zero()
177 canvas->restore(); in test_winding_merged_to_zero()
181 void test_monotone_1(SkCanvas* canvas, const SkPaint& paint) { in test_monotone_1() argument
183 canvas->save(); in test_monotone_1()
184 canvas->translate(0, 300); in test_monotone_1()
188 canvas->drawPath(path.detach(), paint); in test_monotone_1()
189 canvas->restore(); in test_monotone_1()
193 void test_monotone_2(SkCanvas* canvas, const SkPaint& paint) { in test_monotone_2() argument
195 canvas->save(); in test_monotone_2()
196 canvas->translate(100, 300); in test_monotone_2()
200 canvas->drawPath(path.detach(), paint); in test_monotone_2()
201 canvas->restore(); in test_monotone_2()
205 void test_monotone_3(SkCanvas* canvas, const SkPaint& paint) { in test_monotone_3() argument
207 canvas->save(); in test_monotone_3()
208 canvas->translate(200, 300); in test_monotone_3()
212 canvas->drawPath(path.detach(), paint); in test_monotone_3()
213 canvas->restore(); in test_monotone_3()
217 void test_monotone_4(SkCanvas* canvas, const SkPaint& paint) { in test_monotone_4() argument
219 canvas->save(); in test_monotone_4()
220 canvas->translate(300, 300); in test_monotone_4()
227 canvas->drawPath(path.detach(), paint); in test_monotone_4()
228 canvas->restore(); in test_monotone_4()
232 void test_monotone_5(SkCanvas* canvas, const SkPaint& paint) { in test_monotone_5() argument
234 canvas->save(); in test_monotone_5()
235 canvas->translate(0, 400); in test_monotone_5()
240 canvas->drawPath(path.detach(), paint); in test_monotone_5()
241 canvas->restore(); in test_monotone_5()
244 void test_degenerate(SkCanvas* canvas, const SkPaint& paint) { in test_degenerate() argument
246 canvas->save(); in test_degenerate()
247 canvas->translate(100, 400); in test_degenerate()
254 canvas->drawPath(path.detach(), paint); in test_degenerate()
255 canvas->restore(); in test_degenerate()
258 void test_coincident_edge(SkCanvas* canvas, const SkPaint& paint) { in test_coincident_edge() argument
260 canvas->save(); in test_coincident_edge()
261 canvas->translate(200, 400); in test_coincident_edge()
271 canvas->drawPath(path.detach(), paint); in test_coincident_edge()
272 canvas->restore(); in test_coincident_edge()
276 void test_bowtie_coincident_triangle(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie_coincident_triangle() argument
278 canvas->save(); in test_bowtie_coincident_triangle()
279 canvas->translate(300, 400); in test_bowtie_coincident_triangle()
287 canvas->drawPath(path.detach(), paint); in test_bowtie_coincident_triangle()
288 canvas->restore(); in test_bowtie_coincident_triangle()
293 void test_collinear_outer_boundary_edge(SkCanvas* canvas, const SkPaint& paint) { in test_collinear_outer_boundary_edge() argument
295 canvas->save(); in test_collinear_outer_boundary_edge()
296 canvas->translate(400, 400); in test_collinear_outer_boundary_edge()
303 canvas->drawPath(path.detach(), paint); in test_collinear_outer_boundary_edge()
304 canvas->restore(); in test_collinear_outer_boundary_edge()
308 void test_coincident_edges_1(SkCanvas* canvas, const SkPaint& paint) { in test_coincident_edges_1() argument
310 canvas->save(); in test_coincident_edges_1()
311 canvas->translate(0, 500); in test_coincident_edges_1()
318 canvas->drawPath(path.detach(), paint); in test_coincident_edges_1()
319 canvas->restore(); in test_coincident_edges_1()
322 void test_coincident_edges_2(SkCanvas* canvas, const SkPaint& paint) { in test_coincident_edges_2() argument
324 canvas->save(); in test_coincident_edges_2()
325 canvas->translate(100, 500); in test_coincident_edges_2()
332 canvas->drawPath(path.detach(), paint); in test_coincident_edges_2()
333 canvas->restore(); in test_coincident_edges_2()
336 void test_coincident_edges_3(SkCanvas* canvas, const SkPaint& paint) { in test_coincident_edges_3() argument
338 canvas->save(); in test_coincident_edges_3()
339 canvas->translate(200, 500); in test_coincident_edges_3()
346 canvas->drawPath(path.detach(), paint); in test_coincident_edges_3()
347 canvas->restore(); in test_coincident_edges_3()
350 void test_coincident_edges_4(SkCanvas* canvas, const SkPaint& paint) { in test_coincident_edges_4() argument
352 canvas->save(); in test_coincident_edges_4()
353 canvas->translate(300, 500); in test_coincident_edges_4()
360 canvas->drawPath(path.detach(), paint); in test_coincident_edges_4()
361 canvas->restore(); in test_coincident_edges_4()
366 DEF_SIMPLE_GM(concavepaths, canvas, 500, 600) {
372 test_concave(canvas, paint);
373 test_reverse_concave(canvas, paint);
374 test_bowtie(canvas, paint);
375 test_fake_bowtie(canvas, paint);
376 test_intruding_vertex(canvas, paint);
377 test_fish(canvas, paint);
378 test_fast_forward(canvas, paint);
379 test_hole(canvas, paint);
380 test_star(canvas, paint);
381 test_twist(canvas, paint);
382 test_inversion_repeat_vertex(canvas, paint);
383 test_stairstep(canvas, paint);
384 test_stairstep2(canvas, paint);
385 test_overlapping(canvas, paint);
386 test_partners(canvas, paint);
387 test_winding_merged_to_zero(canvas, paint);
388 test_monotone_1(canvas, paint);
389 test_monotone_2(canvas, paint);
390 test_monotone_3(canvas, paint);
391 test_monotone_4(canvas, paint);
392 test_monotone_5(canvas, paint);
393 test_degenerate(canvas, paint);
394 test_coincident_edge(canvas, paint);
395 test_bowtie_coincident_triangle(canvas, paint);
396 test_collinear_outer_boundary_edge(canvas, paint);
397 test_coincident_edges_1(canvas, paint);
398 test_coincident_edges_2(canvas, paint);
399 test_coincident_edges_3(canvas, paint);
400 test_coincident_edges_4(canvas, paint);