Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: include/effects/Sk2DPathEffect.h

Issue 25430005: Fix for potential typedef issue Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/effects/Sk1DPathEffect.h ('k') | include/effects/SkAvoidXfermode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 Sk2DPathEffect_DEFINED 8 #ifndef Sk2DPathEffect_DEFINED
9 #define Sk2DPathEffect_DEFINED 9 #define Sk2DPathEffect_DEFINED
10 10
11 #include "SkPath.h" 11 #include "SkPath.h"
12 #include "SkPathEffect.h" 12 #include "SkPathEffect.h"
13 #include "SkMatrix.h" 13 #include "SkMatrix.h"
14 14
15 class SK_API Sk2DPathEffect : public SkPathEffect { 15 class SK_API Sk2DPathEffect : public SkPathEffect {
16 typedef SkPathEffect INHERITED;
17
16 public: 18 public:
17 Sk2DPathEffect(const SkMatrix& mat); 19 Sk2DPathEffect(const SkMatrix& mat);
18 20
19 virtual bool filterPath(SkPath*, const SkPath&, 21 virtual bool filterPath(SkPath*, const SkPath&,
20 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; 22 SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
21 23
22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk2DPathEffect) 24 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk2DPathEffect)
23 25
24 protected: 26 protected:
25 /** New virtual, to be overridden by subclasses. 27 /** New virtual, to be overridden by subclasses.
(...skipping 20 matching lines...) Expand all
46 48
47 private: 49 private:
48 SkMatrix fMatrix, fInverse; 50 SkMatrix fMatrix, fInverse;
49 bool fMatrixIsInvertible; 51 bool fMatrixIsInvertible;
50 52
51 // illegal 53 // illegal
52 Sk2DPathEffect(const Sk2DPathEffect&); 54 Sk2DPathEffect(const Sk2DPathEffect&);
53 Sk2DPathEffect& operator=(const Sk2DPathEffect&); 55 Sk2DPathEffect& operator=(const Sk2DPathEffect&);
54 56
55 friend class Sk2DPathEffectBlitter; 57 friend class Sk2DPathEffectBlitter;
56 typedef SkPathEffect INHERITED;
57 }; 58 };
58 59
59 class SK_API SkLine2DPathEffect : public Sk2DPathEffect { 60 class SK_API SkLine2DPathEffect : public Sk2DPathEffect {
61 typedef Sk2DPathEffect INHERITED;
62
60 public: 63 public:
61 SkLine2DPathEffect(SkScalar width, const SkMatrix& matrix) 64 SkLine2DPathEffect(SkScalar width, const SkMatrix& matrix)
62 : Sk2DPathEffect(matrix), fWidth(width) {} 65 : Sk2DPathEffect(matrix), fWidth(width) {}
63 66
64 virtual bool filterPath(SkPath* dst, const SkPath& src, 67 virtual bool filterPath(SkPath* dst, const SkPath& src,
65 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; 68 SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
66 69
67 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLine2DPathEffect) 70 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLine2DPathEffect)
68 71
69 protected: 72 protected:
70 virtual void nextSpan(int u, int v, int ucount, SkPath*) const SK_OVERRIDE; 73 virtual void nextSpan(int u, int v, int ucount, SkPath*) const SK_OVERRIDE;
71 74
72 SkLine2DPathEffect(SkFlattenableReadBuffer&); 75 SkLine2DPathEffect(SkFlattenableReadBuffer&);
73 76
74 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 77 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
75 78
76 private: 79 private:
77 SkScalar fWidth; 80 SkScalar fWidth;
78
79 typedef Sk2DPathEffect INHERITED;
80 }; 81 };
81 82
82 class SK_API SkPath2DPathEffect : public Sk2DPathEffect { 83 class SK_API SkPath2DPathEffect : public Sk2DPathEffect {
84 typedef Sk2DPathEffect INHERITED;
85
83 public: 86 public:
84 /** 87 /**
85 * Stamp the specified path to fill the shape, using the matrix to define 88 * Stamp the specified path to fill the shape, using the matrix to define
86 * the latice. 89 * the latice.
87 */ 90 */
88 SkPath2DPathEffect(const SkMatrix&, const SkPath&); 91 SkPath2DPathEffect(const SkMatrix&, const SkPath&);
89 92
90 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath2DPathEffect) 93 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath2DPathEffect)
91 94
92 protected: 95 protected:
93 SkPath2DPathEffect(SkFlattenableReadBuffer& buffer); 96 SkPath2DPathEffect(SkFlattenableReadBuffer& buffer);
94 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 97 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
95 98
96 virtual void next(const SkPoint&, int u, int v, SkPath*) const SK_OVERRIDE; 99 virtual void next(const SkPoint&, int u, int v, SkPath*) const SK_OVERRIDE;
97 100
98 private: 101 private:
99 SkPath fPath; 102 SkPath fPath;
100
101 typedef Sk2DPathEffect INHERITED;
102 }; 103 };
103 104
104 #endif 105 #endif
OLDNEW
« no previous file with comments | « include/effects/Sk1DPathEffect.h ('k') | include/effects/SkAvoidXfermode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698