| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "gm.h" | 8 #include "gm.h" |
| 9 | 9 |
| 10 #include "SkDashPathEffect.h" | 10 #include "SkDashPathEffect.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 rrect.setOval(rect); | 83 rrect.setOval(rect); |
| 84 | 84 |
| 85 SkPath path; | 85 SkPath path; |
| 86 path.addRRect(rrect, dir, startIndex); | 86 path.addRRect(rrect, dir, startIndex); |
| 87 return path; | 87 return path; |
| 88 }); | 88 }); |
| 89 | 89 |
| 90 } | 90 } |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 static const int kImageWidth = 1200; | 93 static constexpr int kImageWidth = 1200; |
| 94 static const int kImageHeight = 600; | 94 static constexpr int kImageHeight = 600; |
| 95 | 95 |
| 96 SkPaint fDashPaint, fPointsPaint; | 96 SkPaint fDashPaint, fPointsPaint; |
| 97 SkRect fRect; | 97 SkRect fRect; |
| 98 | 98 |
| 99 void drawDirs(SkCanvas* canvas, | 99 void drawDirs(SkCanvas* canvas, |
| 100 SkPath (*makePath)(const SkRect&, SkPath::Direction, unsigned)
) const { | 100 SkPath (*makePath)(const SkRect&, SkPath::Direction, unsigned)
) const { |
| 101 drawOneColumn(canvas, SkPath::kCW_Direction, makePath); | 101 drawOneColumn(canvas, SkPath::kCW_Direction, makePath); |
| 102 canvas->translate(kImageWidth / 10, 0); | 102 canvas->translate(kImageWidth / 10, 0); |
| 103 drawOneColumn(canvas, SkPath::kCCW_Direction, makePath); | 103 drawOneColumn(canvas, SkPath::kCCW_Direction, makePath); |
| 104 canvas->translate(kImageWidth / 10, 0); | 104 canvas->translate(kImageWidth / 10, 0); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 120 canvas->translate(0, kImageHeight / 8); | 120 canvas->translate(0, kImageHeight / 8); |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 | 123 |
| 124 typedef GM INHERITED; | 124 typedef GM INHERITED; |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 DEF_GM( return new ContourStartGM(); ) | 127 DEF_GM( return new ContourStartGM(); ) |
| 128 | 128 |
| 129 } // namespace skiagm | 129 } // namespace skiagm |
| OLD | NEW |