| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 length*SkScalarSin(step) + center.fY); | 48 length*SkScalarSin(step) + center.fY); |
| 49 path.lineTo(rp); | 49 path.lineTo(rp); |
| 50 length += angle / SkScalarHalf(SK_ScalarPI); | 50 length += angle / SkScalarHalf(SK_ScalarPI); |
| 51 step += angle; | 51 step += angle; |
| 52 } | 52 } |
| 53 path.close(); | 53 path.close(); |
| 54 | 54 |
| 55 SkPaint paint; | 55 SkPaint paint; |
| 56 paint.setAntiAlias(true); | 56 paint.setAntiAlias(true); |
| 57 paint.setStyle(SkPaint::kStroke_Style); | 57 paint.setStyle(SkPaint::kStroke_Style); |
| 58 paint.setColor(0xFF007700); | 58 paint.setColor(sk_tool_utils::color_to_565(0xFF007700)); |
| 59 | 59 |
| 60 canvas->drawPath(path, paint); | 60 canvas->drawPath(path, paint); |
| 61 } | 61 } |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 typedef GM INHERITED; | 64 typedef GM INHERITED; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 DEF_GM( return new StringArtGM; ) | 67 DEF_GM( return new StringArtGM; ) |
| OLD | NEW |