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 18 matching lines...) Expand all Loading... | |
29 10 pixels on | 29 10 pixels on |
30 20 pixels off | 30 20 pixels off |
31 10 pixels on | 31 10 pixels on |
32 20 pixels off | 32 20 pixels off |
33 ... | 33 ... |
34 A phase of -5, 25, 55, 85, etc. would all result in the same path, | 34 A phase of -5, 25, 55, 85, etc. would all result in the same path, |
35 because the sum of all the intervals is 30. | 35 because the sum of all the intervals is 30. |
36 | 36 |
37 Note: only affects stroked paths. | 37 Note: only affects stroked paths. |
38 */ | 38 */ |
39 SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase, | 39 SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase, |
reed1
2014/02/18 14:06:22
Protected?
| |
40 bool scaleToFit = false); | 40 bool scaleToFit = false); |
41 | |
42 static SkDashPathEffect* Create(const SkScalar intervals[], int count, | |
43 SkScalar phase, bool scaleToFit = false) { | |
44 return SkNEW_ARGS(SkDashPathEffect, (intervals, count, phase, scaleToFit )); | |
45 } | |
41 virtual ~SkDashPathEffect(); | 46 virtual ~SkDashPathEffect(); |
42 | 47 |
43 virtual bool filterPath(SkPath* dst, const SkPath& src, | 48 virtual bool filterPath(SkPath* dst, const SkPath& src, |
44 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; | 49 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; |
45 | 50 |
46 virtual bool asPoints(PointData* results, const SkPath& src, | 51 virtual bool asPoints(PointData* results, const SkPath& src, |
47 const SkStrokeRec&, const SkMatrix&, | 52 const SkStrokeRec&, const SkMatrix&, |
48 const SkRect*) const SK_OVERRIDE; | 53 const SkRect*) const SK_OVERRIDE; |
49 | 54 |
50 virtual Factory getFactory() const SK_OVERRIDE; | 55 virtual Factory getFactory() const SK_OVERRIDE; |
(...skipping 10 matching lines...) Expand all Loading... | |
61 // computed from phase | 66 // computed from phase |
62 SkScalar fInitialDashLength; | 67 SkScalar fInitialDashLength; |
63 int32_t fInitialDashIndex; | 68 int32_t fInitialDashIndex; |
64 SkScalar fIntervalLength; | 69 SkScalar fIntervalLength; |
65 bool fScaleToFit; | 70 bool fScaleToFit; |
66 | 71 |
67 typedef SkPathEffect INHERITED; | 72 typedef SkPathEffect INHERITED; |
68 }; | 73 }; |
69 | 74 |
70 #endif | 75 #endif |
OLD | NEW |