OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SampleCode.h" | 8 #include "SampleCode.h" |
9 #include "SkAnimTimer.h" | 9 #include "SkAnimTimer.h" |
10 #include "SkView.h" | 10 #include "SkView.h" |
11 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
12 #include "SkGradientShader.h" | 12 #include "SkGradientShader.h" |
13 #include "SkPath.h" | 13 #include "SkPath.h" |
14 #include "SkRegion.h" | 14 #include "SkRegion.h" |
15 #include "SkShader.h" | 15 #include "SkShader.h" |
16 #include "SkUtils.h" | 16 #include "SkUtils.h" |
17 #include "Sk1DPathEffect.h" | 17 #include "Sk1DPathEffect.h" |
18 #include "SkCornerPathEffect.h" | 18 #include "SkCornerPathEffect.h" |
19 #include "SkPathMeasure.h" | 19 #include "SkPathMeasure.h" |
20 #include "SkRandom.h" | 20 #include "SkRandom.h" |
21 #include "SkColorPriv.h" | 21 #include "SkColorPriv.h" |
22 #include "SkPixelXorXfermode.h" | |
23 | 22 |
24 #define CORNER_RADIUS 12 | 23 #define CORNER_RADIUS 12 |
25 | 24 |
26 static const int gXY[] = { | 25 static const int gXY[] = { |
27 4, 0, 0, -4, 8, -4, 12, 0, 8, 4, 0, 4 | 26 4, 0, 0, -4, 8, -4, 12, 0, 8, 4, 0, 4 |
28 }; | 27 }; |
29 | 28 |
30 static SkPathEffect* make_pe(int flags, SkScalar phase) { | 29 static SkPathEffect* make_pe(int flags, SkScalar phase) { |
31 if (flags == 1) | 30 if (flags == 1) |
32 return SkCornerPathEffect::Create(SkIntToScalar(CORNER_RADIUS)); | 31 return SkCornerPathEffect::Create(SkIntToScalar(CORNER_RADIUS)); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 } | 167 } |
169 | 168 |
170 private: | 169 private: |
171 typedef SampleView INHERITED; | 170 typedef SampleView INHERITED; |
172 }; | 171 }; |
173 | 172 |
174 ////////////////////////////////////////////////////////////////////////////// | 173 ////////////////////////////////////////////////////////////////////////////// |
175 | 174 |
176 static SkView* MyFactory() { return new PathEffectView; } | 175 static SkView* MyFactory() { return new PathEffectView; } |
177 static SkViewRegister reg(MyFactory); | 176 static SkViewRegister reg(MyFactory); |
OLD | NEW |