| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 if (entries.isEmpty()) { | 45 if (entries.isEmpty()) { |
| 46 entries.append(std::make_pair(FETURBULENCE_TYPE_UNKNOWN, emptyString()))
; | 46 entries.append(std::make_pair(FETURBULENCE_TYPE_UNKNOWN, emptyString()))
; |
| 47 entries.append(std::make_pair(FETURBULENCE_TYPE_FRACTALNOISE, "fractalNo
ise")); | 47 entries.append(std::make_pair(FETURBULENCE_TYPE_FRACTALNOISE, "fractalNo
ise")); |
| 48 entries.append(std::make_pair(FETURBULENCE_TYPE_TURBULENCE, "turbulence"
)); | 48 entries.append(std::make_pair(FETURBULENCE_TYPE_TURBULENCE, "turbulence"
)); |
| 49 } | 49 } |
| 50 return entries; | 50 return entries; |
| 51 } | 51 } |
| 52 | 52 |
| 53 // Animated property definitions | 53 // Animated property definitions |
| 54 | 54 |
| 55 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFETurbulenceElement) | |
| 56 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | |
| 57 END_REGISTER_ANIMATED_PROPERTIES | |
| 58 | 55 |
| 59 inline SVGFETurbulenceElement::SVGFETurbulenceElement(Document& document) | 56 inline SVGFETurbulenceElement::SVGFETurbulenceElement(Document& document) |
| 60 : SVGFilterPrimitiveStandardAttributes(SVGNames::feTurbulenceTag, document) | 57 : SVGFilterPrimitiveStandardAttributes(SVGNames::feTurbulenceTag, document) |
| 61 , m_baseFrequency(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::ba
seFrequencyAttr)) | 58 , m_baseFrequency(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::ba
seFrequencyAttr)) |
| 62 , m_seed(SVGAnimatedNumber::create(this, SVGNames::seedAttr, SVGNumber::crea
te(0))) | 59 , m_seed(SVGAnimatedNumber::create(this, SVGNames::seedAttr, SVGNumber::crea
te(0))) |
| 63 , m_stitchTiles(SVGAnimatedEnumeration<SVGStitchOptions>::create(this, SVGNa
mes::stitchTilesAttr, SVG_STITCHTYPE_NOSTITCH)) | 60 , m_stitchTiles(SVGAnimatedEnumeration<SVGStitchOptions>::create(this, SVGNa
mes::stitchTilesAttr, SVG_STITCHTYPE_NOSTITCH)) |
| 64 , m_type(SVGAnimatedEnumeration<TurbulenceType>::create(this, SVGNames::type
Attr, FETURBULENCE_TYPE_TURBULENCE)) | 61 , m_type(SVGAnimatedEnumeration<TurbulenceType>::create(this, SVGNames::type
Attr, FETURBULENCE_TYPE_TURBULENCE)) |
| 65 , m_numOctaves(SVGAnimatedInteger::create(this, SVGNames::numOctavesAttr, SV
GInteger::create(1))) | 62 , m_numOctaves(SVGAnimatedInteger::create(this, SVGNames::numOctavesAttr, SV
GInteger::create(1))) |
| 66 { | 63 { |
| 67 ScriptWrappable::init(this); | 64 ScriptWrappable::init(this); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 } | 156 } |
| 160 | 157 |
| 161 PassRefPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter
* filter) | 158 PassRefPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter
* filter) |
| 162 { | 159 { |
| 163 if (baseFrequencyX()->currentValue()->value() < 0 || baseFrequencyY()->curre
ntValue()->value() < 0) | 160 if (baseFrequencyX()->currentValue()->value() < 0 || baseFrequencyY()->curre
ntValue()->value() < 0) |
| 164 return nullptr; | 161 return nullptr; |
| 165 return FETurbulence::create(filter, m_type->currentValue()->enumValue(), bas
eFrequencyX()->currentValue()->value(), baseFrequencyY()->currentValue()->value(
), m_numOctaves->currentValue()->value(), m_seed->currentValue()->value(), m_sti
tchTiles->currentValue()->enumValue() == SVG_STITCHTYPE_STITCH); | 162 return FETurbulence::create(filter, m_type->currentValue()->enumValue(), bas
eFrequencyX()->currentValue()->value(), baseFrequencyY()->currentValue()->value(
), m_numOctaves->currentValue()->value(), m_seed->currentValue()->value(), m_sti
tchTiles->currentValue()->enumValue() == SVG_STITCHTYPE_STITCH); |
| 166 } | 163 } |
| 167 | 164 |
| 168 } | 165 } |
| OLD | NEW |