diff options
Diffstat (limited to 'WebCore/svg/SVGFEBlendElement.cpp')
-rw-r--r-- | WebCore/svg/SVGFEBlendElement.cpp | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/WebCore/svg/SVGFEBlendElement.cpp b/WebCore/svg/SVGFEBlendElement.cpp index 46c412c..e944d61 100644 --- a/WebCore/svg/SVGFEBlendElement.cpp +++ b/WebCore/svg/SVGFEBlendElement.cpp @@ -1,30 +1,29 @@ /* - Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> - 2004, 2005, 2006 Rob Buis <buis@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ + * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> + * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ #include "config.h" #if ENABLE(SVG) && ENABLE(FILTERS) #include "SVGFEBlendElement.h" -#include "MappedAttribute.h" -#include "SVGResourceFilter.h" +#include "Attribute.h" namespace WebCore { @@ -38,7 +37,7 @@ SVGFEBlendElement::~SVGFEBlendElement() { } -void SVGFEBlendElement::parseMappedAttribute(MappedAttribute* attr) +void SVGFEBlendElement::parseMappedAttribute(Attribute* attr) { const String& value = attr->value(); if (attr->name() == SVGNames::modeAttr) { @@ -79,18 +78,15 @@ void SVGFEBlendElement::synchronizeProperty(const QualifiedName& attrName) synchronizeIn2(); } -bool SVGFEBlendElement::build(SVGResourceFilter* filterResource) +PassRefPtr<FilterEffect> SVGFEBlendElement::build(SVGFilterBuilder* filterBuilder) { - FilterEffect* input1 = filterResource->builder()->getEffectById(in1()); - FilterEffect* input2 = filterResource->builder()->getEffectById(in2()); + FilterEffect* input1 = filterBuilder->getEffectById(in1()); + FilterEffect* input2 = filterBuilder->getEffectById(in2()); if (!input1 || !input2) - return false; - - RefPtr<FilterEffect> effect = FEBlend::create(input1, input2, static_cast<BlendModeType>(mode())); - filterResource->addFilterEffect(this, effect.release()); + return 0; - return true; + return FEBlend::create(input1, input2, static_cast<BlendModeType>(mode())); } } |