| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkPath.h" | 10 #include "SkPath.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 canvas->translate(110, 0); | 114 canvas->translate(110, 0); |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 canvas->restore(); | 118 canvas->restore(); |
| 119 canvas->translate(0, 110); | 119 canvas->translate(0, 110); |
| 120 } | 120 } |
| 121 canvas->restore(); | 121 canvas->restore(); |
| 122 | 122 |
| 123 this->drawGiantCircle(canvas); | 123 this->drawGiantCircle(canvas); |
| 124 } | 124 } |
| 125 | 125 |
| 126 private: | 126 private: |
| 127 SkTArray<SkPath> fPaths; | 127 SkTArray<SkPath> fPaths; |
| 128 SkPath fGiantCircle; | 128 SkPath fGiantCircle; |
| 129 typedef skiagm::GM INHERITED; | 129 typedef skiagm::GM INHERITED; |
| 130 }; | 130 }; |
| 131 DEF_GM(return new ConicPathsGM;) | 131 DEF_GM(return new ConicPathsGM;) |
| 132 | 132 |
| 133 ////////////////////////////////////////////////////////////////////////////// | 133 ////////////////////////////////////////////////////////////////////////////// |
| 134 | 134 |
| 135 /* arc should be on top of circle */ | 135 /* arc should be on top of circle */ |
| 136 DEF_SIMPLE_GM(arccirclegap, canvas, 250, 250) { | 136 DEF_SIMPLE_GM(arccirclegap, canvas, 250, 250) { |
| 137 canvas->translate(50, 100); | 137 canvas->translate(50, 100); |
| 138 SkPoint c = { 1052.5390625f, 506.8760978034711f }; | 138 SkPoint c = { 1052.5390625f, 506.8760978034711f }; |
| 139 SkScalar radius = 1096.702150363923f; | 139 SkScalar radius = 1096.702150363923f; |
| 140 SkPaint paint; | 140 SkPaint paint; |
| 141 paint.setAntiAlias(true); | 141 paint.setAntiAlias(true); |
| 142 paint.setStyle(SkPaint::kStroke_Style); | 142 paint.setStyle(SkPaint::kStroke_Style); |
| 143 canvas->drawCircle(c.fX, c.fY, radius, paint); | 143 canvas->drawCircle(c.fX, c.fY, radius, paint); |
| 144 SkPath path; | 144 SkPath path; |
| 145 path.moveTo(288.88884710654133f, -280.26680862609f); | 145 path.moveTo(288.88884710654133f, -280.26680862609f); |
| 146 path.arcTo(0, 0, -39.00216443306411f, 400.6058925796476f, radius); | 146 path.arcTo(0, 0, -39.00216443306411f, 400.6058925796476f, radius); |
| 147 paint.setColor(0xff007f00); | 147 paint.setColor(0xff007f00); |
| 148 canvas->drawPath(path, paint); | 148 canvas->drawPath(path, paint); |
| 149 } | 149 } |
| OLD | NEW |