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 #ifndef SkDashPathEffect_DEFINED | 8 #ifndef SkDashPathEffect_DEFINED |
9 #define SkDashPathEffect_DEFINED | 9 #define SkDashPathEffect_DEFINED |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 Note: only affects stroked paths. | 37 Note: only affects stroked paths. |
38 */ | 38 */ |
39 static SkDashPathEffect* Create(const SkScalar intervals[], int count, | 39 static SkDashPathEffect* Create(const SkScalar intervals[], int count, |
40 SkScalar phase) { | 40 SkScalar phase) { |
41 return SkNEW_ARGS(SkDashPathEffect, (intervals, count, phase)); | 41 return SkNEW_ARGS(SkDashPathEffect, (intervals, count, phase)); |
42 } | 42 } |
43 virtual ~SkDashPathEffect(); | 43 virtual ~SkDashPathEffect(); |
44 | 44 |
45 virtual bool filterPath(SkPath* dst, const SkPath& src, | 45 virtual bool filterPath(SkPath* dst, const SkPath& src, |
46 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; | 46 SkStrokeRec*, const SkRect*) const override; |
47 | 47 |
48 virtual bool asPoints(PointData* results, const SkPath& src, | 48 virtual bool asPoints(PointData* results, const SkPath& src, |
49 const SkStrokeRec&, const SkMatrix&, | 49 const SkStrokeRec&, const SkMatrix&, |
50 const SkRect*) const SK_OVERRIDE; | 50 const SkRect*) const override; |
51 | 51 |
52 DashType asADash(DashInfo* info) const SK_OVERRIDE; | 52 DashType asADash(DashInfo* info) const override; |
53 | 53 |
54 SK_TO_STRING_OVERRIDE() | 54 SK_TO_STRING_OVERRIDE() |
55 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDashPathEffect) | 55 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDashPathEffect) |
56 | 56 |
57 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 57 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
58 bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } | 58 bool exposedInAndroidJavaAPI() const override { return true; } |
59 #endif | 59 #endif |
60 | 60 |
61 protected: | 61 protected: |
62 SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase); | 62 SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase); |
63 void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 63 void flatten(SkWriteBuffer&) const override; |
64 | 64 |
65 private: | 65 private: |
66 SkScalar* fIntervals; | 66 SkScalar* fIntervals; |
67 int32_t fCount; | 67 int32_t fCount; |
68 SkScalar fPhase; | 68 SkScalar fPhase; |
69 // computed from phase | 69 // computed from phase |
70 SkScalar fInitialDashLength; | 70 SkScalar fInitialDashLength; |
71 int32_t fInitialDashIndex; | 71 int32_t fInitialDashIndex; |
72 SkScalar fIntervalLength; | 72 SkScalar fIntervalLength; |
73 | 73 |
74 typedef SkPathEffect INHERITED; | 74 typedef SkPathEffect INHERITED; |
75 }; | 75 }; |
76 | 76 |
77 #endif | 77 #endif |
OLD | NEW |