diff options
Diffstat (limited to 'gm/strokes.cpp')
-rw-r--r-- | gm/strokes.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gm/strokes.cpp b/gm/strokes.cpp index 7bd31c23f4..ed13d090ff 100644 --- a/gm/strokes.cpp +++ b/gm/strokes.cpp @@ -518,3 +518,18 @@ DEF_GM( return new Strokes5GM; ) DEF_GM( return new ZeroLenStrokesGM; ) DEF_GM( return new TeenyStrokesGM; ) + +DEF_SIMPLE_GM(zerolinedash, canvas, 256, 256) { + canvas->clear(SK_ColorWHITE); + + SkPaint paint; + paint.setColor(SkColorSetARGB(255, 0, 0, 0)); + paint.setStrokeWidth(11); + paint.setStrokeCap(SkPaint::kRound_Cap); + paint.setStrokeJoin(SkPaint::kBevel_Join); + + SkScalar dash_pattern[] = {1, 5}; + paint.setPathEffect(SkDashPathEffect::Make(dash_pattern, 2, 0)); + + canvas->drawLine(100, 100, 100, 100, paint); +} |