OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 "SkDrawExtraPathEffect.h" | 8 #include "SkDrawExtraPathEffect.h" |
9 #include "SkDrawPath.h" | 9 #include "SkDrawPath.h" |
10 #include "Sk1DPathEffect.h" | 10 #include "Sk1DPathEffect.h" |
(...skipping 121 matching lines...) Loading... |
132 } | 132 } |
133 } | 133 } |
134 SkScalar result = 0; | 134 SkScalar result = 0; |
135 SkAnimatorScript::EvaluateFloat(*fMaker, NULL, fDraw->spacing.c_str(), &
result); | 135 SkAnimatorScript::EvaluateFloat(*fMaker, NULL, fDraw->spacing.c_str(), &
result); |
136 if (drawPath) | 136 if (drawPath) |
137 dst->addPath(drawPath->getPath(), m); | 137 dst->addPath(drawPath->getPath(), m); |
138 fMaker->clearExtraPropertyCallBack(fDraw->fType); | 138 fMaker->clearExtraPropertyCallBack(fDraw->fType); |
139 return result; | 139 return result; |
140 } | 140 } |
141 | 141 |
| 142 #ifndef SK_IGNORE_TO_STRING |
| 143 void toString(SkString* str) const SK_OVERRIDE { |
| 144 str->appendf("SkShape1DPathEffect: ("); |
| 145 // TODO: fill in |
| 146 str->appendf(")"); |
| 147 } |
| 148 #endif |
| 149 |
142 private: | 150 private: |
143 static bool GetContourLength(const char* token, size_t len, void* clen, SkSc
riptValue* value) { | 151 static bool GetContourLength(const char* token, size_t len, void* clen, SkSc
riptValue* value) { |
144 if (SK_LITERAL_STR_EQUAL("contourLength", token, len)) { | 152 if (SK_LITERAL_STR_EQUAL("contourLength", token, len)) { |
145 value->fOperand.fScalar = *(SkScalar*) clen; | 153 value->fOperand.fScalar = *(SkScalar*) clen; |
146 value->fType = SkType_Float; | 154 value->fType = SkType_Float; |
147 return true; | 155 return true; |
148 } | 156 } |
149 return false; | 157 return false; |
150 } | 158 } |
151 | 159 |
(...skipping 356 matching lines...) Loading... |
508 | 516 |
509 void InitializeSkExtraPathEffects(SkAnimator* animator) { | 517 void InitializeSkExtraPathEffects(SkAnimator* animator) { |
510 animator->addExtras(new SkExtraPathEffects()); | 518 animator->addExtras(new SkExtraPathEffects()); |
511 } | 519 } |
512 | 520 |
513 //////////////// | 521 //////////////// |
514 | 522 |
515 | 523 |
516 SkExtras::SkExtras() : fExtraCallBack(NULL), fExtraStorage(NULL) { | 524 SkExtras::SkExtras() : fExtraCallBack(NULL), fExtraStorage(NULL) { |
517 } | 525 } |
OLD | NEW |