OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 #include "platform/graphics/Color.h" | 24 #include "platform/graphics/Color.h" |
25 #include "platform/graphics/filters/FilterEffect.h" | 25 #include "platform/graphics/filters/FilterEffect.h" |
26 | 26 |
27 namespace blink { | 27 namespace blink { |
28 | 28 |
29 class PLATFORM_EXPORT FEDropShadow final : public FilterEffect { | 29 class PLATFORM_EXPORT FEDropShadow final : public FilterEffect { |
30 public: | 30 public: |
31 static FEDropShadow* create(Filter*, float, float, float, float, const Color
&, float); | 31 static FEDropShadow* create(Filter*, float, float, float, float, const Color
&, float); |
32 | 32 |
33 FloatRect mapRect(const FloatRect&, bool forward = true) const final; | |
34 | |
35 void setShadowColor(const Color& color) { m_shadowColor = color; } | 33 void setShadowColor(const Color& color) { m_shadowColor = color; } |
36 void setShadowOpacity(float opacity) { m_shadowOpacity = opacity; } | 34 void setShadowOpacity(float opacity) { m_shadowOpacity = opacity; } |
37 | 35 |
38 TextStream& externalRepresentation(TextStream&, int indention) const overrid
e; | 36 TextStream& externalRepresentation(TextStream&, int indention) const overrid
e; |
39 sk_sp<SkImageFilter> createImageFilter() override; | |
40 | 37 |
41 private: | 38 private: |
42 FEDropShadow(Filter*, float, float, float, float, const Color&, float); | 39 FEDropShadow(Filter*, float, float, float, float, const Color&, float); |
43 | 40 |
| 41 FloatRect mapEffect(const FloatRect&) const override; |
| 42 |
| 43 sk_sp<SkImageFilter> createImageFilter() override; |
| 44 |
44 float m_stdX; | 45 float m_stdX; |
45 float m_stdY; | 46 float m_stdY; |
46 float m_dx; | 47 float m_dx; |
47 float m_dy; | 48 float m_dy; |
48 Color m_shadowColor; | 49 Color m_shadowColor; |
49 float m_shadowOpacity; | 50 float m_shadowOpacity; |
50 }; | 51 }; |
51 | 52 |
52 } // namespace blink | 53 } // namespace blink |
53 | 54 |
54 #endif // FEDropShadow_h | 55 #endif // FEDropShadow_h |
OLD | NEW |