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

Side by Side Diff: Source/core/svg/SVGFEBlendElement.h

Issue 447193002: Add support for additional blend modes to SVGFEBlendElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/core/svg/SVGEnumeration.cpp ('k') | Source/core/svg/SVGFEBlendElement.cpp » ('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 (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,
(...skipping 16 matching lines...) Expand all
27 namespace blink { 27 namespace blink {
28 28
29 class SVGFEBlendElement FINAL : public SVGFilterPrimitiveStandardAttributes { 29 class SVGFEBlendElement FINAL : public SVGFilterPrimitiveStandardAttributes {
30 public: 30 public:
31 enum Mode { 31 enum Mode {
32 ModeUnknown = 0, 32 ModeUnknown = 0,
33 ModeNormal = 1, 33 ModeNormal = 1,
34 ModeMultiply = 2, 34 ModeMultiply = 2,
35 ModeScreen = 3, 35 ModeScreen = 3,
36 ModeDarken = 4, 36 ModeDarken = 4,
37 ModeLighten = 5 37 ModeLighten = 5,
38
39 // The following modes do not map to IDL constants on
40 // SVGFEBlendElement.
41 ModeOverlay,
42 ModeColorDodge,
43 ModeColorBurn,
44 ModeHardLight,
45 ModeSoftLight,
46 ModeDifference,
47 ModeExclusion,
48 ModeHue,
49 ModeSaturation,
50 ModeColor,
51 ModeLuminosity,
38 }; 52 };
39 53
40 DECLARE_NODE_FACTORY(SVGFEBlendElement); 54 DECLARE_NODE_FACTORY(SVGFEBlendElement);
41 SVGAnimatedString* in1() { return m_in1.get(); } 55 SVGAnimatedString* in1() { return m_in1.get(); }
42 SVGAnimatedString* in2() { return m_in2.get(); } 56 SVGAnimatedString* in2() { return m_in2.get(); }
43 SVGAnimatedEnumeration<Mode>* mode() { return m_mode.get(); } 57 SVGAnimatedEnumeration<Mode>* mode() { return m_mode.get(); }
44 58
45 private: 59 private:
46 explicit SVGFEBlendElement(Document&); 60 explicit SVGFEBlendElement(Document&);
47 61
48 bool isSupportedAttribute(const QualifiedName&); 62 bool isSupportedAttribute(const QualifiedName&);
49 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 63 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
50 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& at trName) OVERRIDE; 64 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& at trName) OVERRIDE;
51 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; 65 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
52 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) OVERRIDE; 66 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) OVERRIDE;
53 67
54 RefPtr<SVGAnimatedString> m_in1; 68 RefPtr<SVGAnimatedString> m_in1;
55 RefPtr<SVGAnimatedString> m_in2; 69 RefPtr<SVGAnimatedString> m_in2;
56 RefPtr<SVGAnimatedEnumeration<Mode> > m_mode; 70 RefPtr<SVGAnimatedEnumeration<Mode> > m_mode;
57 }; 71 };
58 72
59 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGFEBlendE lement::Mode>(); 73 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGFEBlendE lement::Mode>();
74 template<> unsigned short getMaxExposedEnumValue<SVGFEBlendElement::Mode>();
60 75
61 } // namespace blink 76 } // namespace blink
62 77
63 #endif 78 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGEnumeration.cpp ('k') | Source/core/svg/SVGFEBlendElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698