OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkArcToPathEffect.h" | 8 #include "SkArcToPathEffect.h" |
9 #include "SkPath.h" | 9 #include "SkPath.h" |
10 #include "SkPoint.h" | 10 #include "SkPoint.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 case SkPath::kDone_Verb: | 54 case SkPath::kDone_Verb: |
55 dst->lineTo(lastCorner); | 55 dst->lineTo(lastCorner); |
56 goto DONE; | 56 goto DONE; |
57 } | 57 } |
58 prevVerb = verb; | 58 prevVerb = verb; |
59 } | 59 } |
60 DONE: | 60 DONE: |
61 return true; | 61 return true; |
62 } | 62 } |
63 | 63 |
64 SkFlattenable* SkArcToPathEffect::CreateProc(SkReadBuffer& buffer) { | 64 sk_sp<SkFlattenable> SkArcToPathEffect::CreateProc(SkReadBuffer& buffer) { |
65 return SkArcToPathEffect::Make(buffer.readScalar()).release(); | 65 return SkArcToPathEffect::Make(buffer.readScalar()); |
66 } | 66 } |
67 | 67 |
68 void SkArcToPathEffect::flatten(SkWriteBuffer& buffer) const { | 68 void SkArcToPathEffect::flatten(SkWriteBuffer& buffer) const { |
69 buffer.writeScalar(fRadius); | 69 buffer.writeScalar(fRadius); |
70 } | 70 } |
71 | 71 |
72 #ifndef SK_IGNORE_TO_STRING | 72 #ifndef SK_IGNORE_TO_STRING |
73 void SkArcToPathEffect::toString(SkString* str) const { | 73 void SkArcToPathEffect::toString(SkString* str) const { |
74 str->appendf("SkArcToPathEffect: ("); | 74 str->appendf("SkArcToPathEffect: ("); |
75 str->appendf("radius: %f", fRadius); | 75 str->appendf("radius: %f", fRadius); |
76 str->appendf(")"); | 76 str->appendf(")"); |
77 } | 77 } |
78 #endif | 78 #endif |
OLD | NEW |