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, |
(...skipping 28 matching lines...) Expand all Loading... |
39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFETurbulenceElement) | 39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFETurbulenceElement) |
40 REGISTER_LOCAL_ANIMATED_PROPERTY(baseFrequencyX) | 40 REGISTER_LOCAL_ANIMATED_PROPERTY(baseFrequencyX) |
41 REGISTER_LOCAL_ANIMATED_PROPERTY(baseFrequencyY) | 41 REGISTER_LOCAL_ANIMATED_PROPERTY(baseFrequencyY) |
42 REGISTER_LOCAL_ANIMATED_PROPERTY(numOctaves) | 42 REGISTER_LOCAL_ANIMATED_PROPERTY(numOctaves) |
43 REGISTER_LOCAL_ANIMATED_PROPERTY(seed) | 43 REGISTER_LOCAL_ANIMATED_PROPERTY(seed) |
44 REGISTER_LOCAL_ANIMATED_PROPERTY(stitchTiles) | 44 REGISTER_LOCAL_ANIMATED_PROPERTY(stitchTiles) |
45 REGISTER_LOCAL_ANIMATED_PROPERTY(type) | 45 REGISTER_LOCAL_ANIMATED_PROPERTY(type) |
46 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | 46 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) |
47 END_REGISTER_ANIMATED_PROPERTIES | 47 END_REGISTER_ANIMATED_PROPERTIES |
48 | 48 |
49 inline SVGFETurbulenceElement::SVGFETurbulenceElement(const QualifiedName& tagNa
me, Document* document) | 49 inline SVGFETurbulenceElement::SVGFETurbulenceElement(const QualifiedName& tagNa
me, Document& document) |
50 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 50 : SVGFilterPrimitiveStandardAttributes(tagName, document) |
51 , m_numOctaves(1) | 51 , m_numOctaves(1) |
52 , m_stitchTiles(SVG_STITCHTYPE_NOSTITCH) | 52 , m_stitchTiles(SVG_STITCHTYPE_NOSTITCH) |
53 , m_type(FETURBULENCE_TYPE_TURBULENCE) | 53 , m_type(FETURBULENCE_TYPE_TURBULENCE) |
54 { | 54 { |
55 ASSERT(hasTagName(SVGNames::feTurbulenceTag)); | 55 ASSERT(hasTagName(SVGNames::feTurbulenceTag)); |
56 ScriptWrappable::init(this); | 56 ScriptWrappable::init(this); |
57 registerAnimatedPropertiesForSVGFETurbulenceElement(); | 57 registerAnimatedPropertiesForSVGFETurbulenceElement(); |
58 } | 58 } |
59 | 59 |
60 PassRefPtr<SVGFETurbulenceElement> SVGFETurbulenceElement::create(const Qualifie
dName& tagName, Document* document) | 60 PassRefPtr<SVGFETurbulenceElement> SVGFETurbulenceElement::create(const Qualifie
dName& tagName, Document& document) |
61 { | 61 { |
62 return adoptRef(new SVGFETurbulenceElement(tagName, document)); | 62 return adoptRef(new SVGFETurbulenceElement(tagName, document)); |
63 } | 63 } |
64 | 64 |
65 const AtomicString& SVGFETurbulenceElement::baseFrequencyXIdentifier() | 65 const AtomicString& SVGFETurbulenceElement::baseFrequencyXIdentifier() |
66 { | 66 { |
67 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGBaseFrequencyX", Atomic
String::ConstructFromLiteral)); | 67 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGBaseFrequencyX", Atomic
String::ConstructFromLiteral)); |
68 return s_identifier; | 68 return s_identifier; |
69 } | 69 } |
70 | 70 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 173 } |
174 | 174 |
175 PassRefPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter
* filter) | 175 PassRefPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter
* filter) |
176 { | 176 { |
177 if (baseFrequencyXCurrentValue() < 0 || baseFrequencyYCurrentValue() < 0) | 177 if (baseFrequencyXCurrentValue() < 0 || baseFrequencyYCurrentValue() < 0) |
178 return 0; | 178 return 0; |
179 return FETurbulence::create(filter, typeCurrentValue(), baseFrequencyXCurren
tValue(), baseFrequencyYCurrentValue(), numOctavesCurrentValue(), seedCurrentVal
ue(), stitchTilesCurrentValue() == SVG_STITCHTYPE_STITCH); | 179 return FETurbulence::create(filter, typeCurrentValue(), baseFrequencyXCurren
tValue(), baseFrequencyYCurrentValue(), numOctavesCurrentValue(), seedCurrentVal
ue(), stitchTilesCurrentValue() == SVG_STITCHTYPE_STITCH); |
180 } | 180 } |
181 | 181 |
182 } | 182 } |
OLD | NEW |