OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include <functional> | 8 #include <functional> |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "gm.h" | 10 #include "gm.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 DEF_ARC_GM(stroke_round) { | 97 DEF_ARC_GM(stroke_round) { |
98 auto setStroke = [] (SkPaint* p) { | 98 auto setStroke = [] (SkPaint* p) { |
99 p->setStyle(SkPaint::kStroke_Style); | 99 p->setStyle(SkPaint::kStroke_Style); |
100 p->setStrokeCap(SkPaint::kRound_Cap); | 100 p->setStrokeCap(SkPaint::kRound_Cap); |
101 }; | 101 }; |
102 draw_arcs(canvas, setStroke); | 102 draw_arcs(canvas, setStroke); |
103 } | 103 } |
104 | 104 |
105 DEF_ARC_GM(fill_and_Stroke) { | 105 DEF_ARC_GM(stroke_and_fill_butt) { |
| 106 auto setStroke = [] (SkPaint* p) { |
| 107 p->setStyle(SkPaint::kStrokeAndFill_Style); |
| 108 p->setStrokeCap(SkPaint::kButt_Cap); |
| 109 }; |
| 110 draw_arcs(canvas, setStroke); |
| 111 } |
| 112 |
| 113 DEF_ARC_GM(stroke_and_fill_square) { |
| 114 auto setStroke = [] (SkPaint* p) { |
| 115 p->setStyle(SkPaint::kStrokeAndFill_Style); |
| 116 p->setStrokeCap(SkPaint::kSquare_Cap); |
| 117 }; |
| 118 draw_arcs(canvas, setStroke); |
| 119 } |
| 120 |
| 121 DEF_ARC_GM(stroke_and_fill_round) { |
106 auto setStroke = [] (SkPaint* p) { | 122 auto setStroke = [] (SkPaint* p) { |
107 p->setStyle(SkPaint::kStrokeAndFill_Style); | 123 p->setStyle(SkPaint::kStrokeAndFill_Style); |
108 p->setStrokeCap(SkPaint::kRound_Cap); | 124 p->setStrokeCap(SkPaint::kRound_Cap); |
109 }; | 125 }; |
110 draw_arcs(canvas, setStroke); | 126 draw_arcs(canvas, setStroke); |
111 } | 127 } |
OLD | NEW |