| 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(Document& document) |
| 50 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 50 : SVGFilterPrimitiveStandardAttributes(SVGNames::feTurbulenceTag, 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)); | |
| 56 ScriptWrappable::init(this); | 55 ScriptWrappable::init(this); |
| 57 registerAnimatedPropertiesForSVGFETurbulenceElement(); | 56 registerAnimatedPropertiesForSVGFETurbulenceElement(); |
| 58 } | 57 } |
| 59 | 58 |
| 60 PassRefPtr<SVGFETurbulenceElement> SVGFETurbulenceElement::create(const Qualifie
dName& tagName, Document& document) | 59 PassRefPtr<SVGFETurbulenceElement> SVGFETurbulenceElement::create(Document& docu
ment) |
| 61 { | 60 { |
| 62 return adoptRef(new SVGFETurbulenceElement(tagName, document)); | 61 return adoptRef(new SVGFETurbulenceElement(document)); |
| 63 } | 62 } |
| 64 | 63 |
| 65 const AtomicString& SVGFETurbulenceElement::baseFrequencyXIdentifier() | 64 const AtomicString& SVGFETurbulenceElement::baseFrequencyXIdentifier() |
| 66 { | 65 { |
| 67 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGBaseFrequencyX", Atomic
String::ConstructFromLiteral)); | 66 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGBaseFrequencyX", Atomic
String::ConstructFromLiteral)); |
| 68 return s_identifier; | 67 return s_identifier; |
| 69 } | 68 } |
| 70 | 69 |
| 71 const AtomicString& SVGFETurbulenceElement::baseFrequencyYIdentifier() | 70 const AtomicString& SVGFETurbulenceElement::baseFrequencyYIdentifier() |
| 72 { | 71 { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 172 } |
| 174 | 173 |
| 175 PassRefPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter
* filter) | 174 PassRefPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter
* filter) |
| 176 { | 175 { |
| 177 if (baseFrequencyXCurrentValue() < 0 || baseFrequencyYCurrentValue() < 0) | 176 if (baseFrequencyXCurrentValue() < 0 || baseFrequencyYCurrentValue() < 0) |
| 178 return 0; | 177 return 0; |
| 179 return FETurbulence::create(filter, typeCurrentValue(), baseFrequencyXCurren
tValue(), baseFrequencyYCurrentValue(), numOctavesCurrentValue(), seedCurrentVal
ue(), stitchTilesCurrentValue() == SVG_STITCHTYPE_STITCH); | 178 return FETurbulence::create(filter, typeCurrentValue(), baseFrequencyXCurren
tValue(), baseFrequencyYCurrentValue(), numOctavesCurrentValue(), seedCurrentVal
ue(), stitchTilesCurrentValue() == SVG_STITCHTYPE_STITCH); |
| 180 } | 179 } |
| 181 | 180 |
| 182 } | 181 } |
| OLD | NEW |