| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 27 matching lines...) Expand all Loading... |
| 38 paint.setStrokeJoin(join); | 38 paint.setStrokeJoin(join); |
| 39 paint.setStrokeWidth(42); | 39 paint.setStrokeWidth(42); |
| 40 canvas->drawPath(path, paint); | 40 canvas->drawPath(path, paint); |
| 41 | 41 |
| 42 paint.setColor(SK_ColorRED); | 42 paint.setColor(SK_ColorRED); |
| 43 paint.setStrokeWidth(21); | 43 paint.setStrokeWidth(21); |
| 44 paint.setPathEffect(pe)->unref(); | 44 paint.setPathEffect(pe)->unref(); |
| 45 canvas->drawPath(path, paint); | 45 canvas->drawPath(path, paint); |
| 46 | 46 |
| 47 paint.setColor(SK_ColorGREEN); | 47 paint.setColor(SK_ColorGREEN); |
| 48 paint.setPathEffect(NULL); | 48 paint.setPathEffect(nullptr); |
| 49 paint.setStrokeWidth(0); | 49 paint.setStrokeWidth(0); |
| 50 canvas->drawPath(path, paint); | 50 canvas->drawPath(path, paint); |
| 51 } | 51 } |
| 52 | 52 |
| 53 virtual void onDraw(SkCanvas* canvas) { | 53 virtual void onDraw(SkCanvas* canvas) { |
| 54 SkPath path; | 54 SkPath path; |
| 55 const char* d = "M 337,98 C 250,141 250,212 250,212 C 250,212 250,212 25
0,212" | 55 const char* d = "M 337,98 C 250,141 250,212 250,212 C 250,212 250,212 25
0,212" |
| 56 "C 250,212 250,212 250,212 C 250,212 250,141 163,98 C 156,195 217,231 21
7,231" | 56 "C 250,212 250,212 250,212 C 250,212 250,141 163,98 C 156,195 217,231 21
7,231" |
| 57 "C 217,231 217,231 217,231 C 217,231 217,231 217,231 C 217,231 156,195 7
5,250" | 57 "C 217,231 217,231 217,231 C 217,231 217,231 217,231 C 217,231 156,195 7
5,250" |
| 58 "C 156,305 217,269 217,269 C 217,269 217,269 217,269 C 217,269 217,269 2
17,269" | 58 "C 156,305 217,269 217,269 C 217,269 217,269 217,269 C 217,269 217,269 2
17,269" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 76 } | 76 } |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 typedef GM INHERITED; | 79 typedef GM INHERITED; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 ////////////////////////////////////////////////////////////////////////////// | 82 ////////////////////////////////////////////////////////////////////////////// |
| 83 | 83 |
| 84 static skiagm::GM* MyFactory(void*) { return new DashCubicsGM; } | 84 static skiagm::GM* MyFactory(void*) { return new DashCubicsGM; } |
| 85 static skiagm::GMRegistry reg(MyFactory); | 85 static skiagm::GMRegistry reg(MyFactory); |
| OLD | NEW |