OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkColor.h" | 8 #include "SkColor.h" |
9 #include "SkImageFilter.h" | 9 #include "SkImageFilter.h" |
10 #include "SkScalar.h" | 10 #include "SkScalar.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 static SkDropShadowImageFilter* Create(SkScalar dx, SkScalar dy, | 23 static SkDropShadowImageFilter* Create(SkScalar dx, SkScalar dy, |
24 SkScalar sigmaX, SkScalar sigmaY, SkC
olor color, | 24 SkScalar sigmaX, SkScalar sigmaY, SkC
olor color, |
25 ShadowMode shadowMode, | 25 ShadowMode shadowMode, |
26 SkImageFilter* input = NULL, | 26 SkImageFilter* input = NULL, |
27 const CropRect* cropRect = NULL) { | 27 const CropRect* cropRect = NULL) { |
28 return SkNEW_ARGS(SkDropShadowImageFilter, (dx, dy, sigmaX, sigmaY, colo
r, | 28 return SkNEW_ARGS(SkDropShadowImageFilter, (dx, dy, sigmaX, sigmaY, colo
r, |
29 shadowMode, input, cropRect)
); | 29 shadowMode, input, cropRect)
); |
30 } | 30 } |
31 | 31 |
32 void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE; | 32 void computeFastBounds(const SkRect&, SkRect*) const override; |
33 SK_TO_STRING_OVERRIDE() | 33 SK_TO_STRING_OVERRIDE() |
34 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter) | 34 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter) |
35 | 35 |
36 protected: | 36 protected: |
37 SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar
sigmaY, SkColor, | 37 SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar
sigmaY, SkColor, |
38 ShadowMode shadowMode, SkImageFilter* input, const C
ropRect* cropRect); | 38 ShadowMode shadowMode, SkImageFilter* input, const C
ropRect* cropRect); |
39 void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 39 void flatten(SkWriteBuffer&) const override; |
40 bool onFilterImage(Proxy*, const SkBitmap& source, const Context&, SkBitmap*
result, SkIPoint* loc) const SK_OVERRIDE; | 40 bool onFilterImage(Proxy*, const SkBitmap& source, const Context&, SkBitmap*
result, SkIPoint* loc) const override; |
41 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, | 41 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, |
42 SkIRect* dst) const SK_OVERRIDE; | 42 SkIRect* dst) const override; |
43 | 43 |
44 private: | 44 private: |
45 SkScalar fDx, fDy, fSigmaX, fSigmaY; | 45 SkScalar fDx, fDy, fSigmaX, fSigmaY; |
46 SkColor fColor; | 46 SkColor fColor; |
47 ShadowMode fShadowMode; | 47 ShadowMode fShadowMode; |
48 typedef SkImageFilter INHERITED; | 48 typedef SkImageFilter INHERITED; |
49 }; | 49 }; |
OLD | NEW |