OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
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, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 */ | 19 */ |
20 | 20 |
21 #ifndef SVGFEBlendElement_h | 21 #ifndef SVGFEBlendElement_h |
22 #define SVGFEBlendElement_h | 22 #define SVGFEBlendElement_h |
23 | 23 |
24 #include "core/svg/SVGAnimatedEnumeration.h" | 24 #include "core/svg/SVGAnimatedEnumeration.h" |
25 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" | 25 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" |
26 #include "platform/graphics/filters/FEBlend.h" | |
27 | 26 |
28 namespace blink { | 27 namespace blink { |
29 | 28 |
30 template<> const SVGEnumerationStringEntries& getStaticStringEntries<BlendModeTy
pe>(); | |
31 | |
32 class SVGFEBlendElement FINAL : public SVGFilterPrimitiveStandardAttributes { | 29 class SVGFEBlendElement FINAL : public SVGFilterPrimitiveStandardAttributes { |
33 public: | 30 public: |
| 31 enum Mode { |
| 32 ModeUnknown = 0, |
| 33 ModeNormal = 1, |
| 34 ModeMultiply = 2, |
| 35 ModeScreen = 3, |
| 36 ModeDarken = 4, |
| 37 ModeLighten = 5 |
| 38 }; |
| 39 |
34 DECLARE_NODE_FACTORY(SVGFEBlendElement); | 40 DECLARE_NODE_FACTORY(SVGFEBlendElement); |
35 SVGAnimatedString* in1() { return m_in1.get(); } | 41 SVGAnimatedString* in1() { return m_in1.get(); } |
36 SVGAnimatedString* in2() { return m_in2.get(); } | 42 SVGAnimatedString* in2() { return m_in2.get(); } |
37 SVGAnimatedEnumeration<BlendModeType>* mode() { return m_mode.get(); } | 43 SVGAnimatedEnumeration<Mode>* mode() { return m_mode.get(); } |
38 | 44 |
39 private: | 45 private: |
40 explicit SVGFEBlendElement(Document&); | 46 explicit SVGFEBlendElement(Document&); |
41 | 47 |
42 bool isSupportedAttribute(const QualifiedName&); | 48 bool isSupportedAttribute(const QualifiedName&); |
43 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 49 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
44 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& at
trName) OVERRIDE; | 50 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& at
trName) OVERRIDE; |
45 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; | 51 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; |
46 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) OVERRIDE; | 52 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) OVERRIDE; |
47 | 53 |
48 RefPtr<SVGAnimatedString> m_in1; | 54 RefPtr<SVGAnimatedString> m_in1; |
49 RefPtr<SVGAnimatedString> m_in2; | 55 RefPtr<SVGAnimatedString> m_in2; |
50 RefPtr<SVGAnimatedEnumeration<BlendModeType> > m_mode; | 56 RefPtr<SVGAnimatedEnumeration<Mode> > m_mode; |
51 }; | 57 }; |
52 | 58 |
| 59 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGFEBlendE
lement::Mode>(); |
| 60 |
53 } // namespace blink | 61 } // namespace blink |
54 | 62 |
55 #endif | 63 #endif |
OLD | NEW |