KHTML
Go to the documentation of this file.
25 #if ENABLE(SVG) && ENABLE(SVG_FILTERS)
31 #include "SVGRenderStyle.h"
36 SVGFEFloodElement::SVGFEFloodElement(
const QualifiedName& tagName, Document* doc)
37 : SVGFilterPrimitiveStandardAttributes(tagName, doc)
42 SVGFEFloodElement::~SVGFEFloodElement()
44 delete m_filterEffect;
47 void SVGFEFloodElement::parseMappedAttribute(MappedAttribute* attr)
49 SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
52 SVGFEFlood* SVGFEFloodElement::filterEffect(SVGResourceFilter* filter)
const
55 m_filterEffect =
new SVGFEFlood(filter);
57 setStandardAttributes(m_filterEffect);
59 SVGFEFloodElement* nonConstThis =
const_cast<SVGFEFloodElement*
>(
this);
61 RenderStyle* parentStyle = nonConstThis->styleForRenderer(parent()->renderer());
62 RenderStyle* filterStyle = nonConstThis->resolveStyle(parentStyle);
64 m_filterEffect->setFloodColor(filterStyle->svgStyle()->floodColor());
65 m_filterEffect->setFloodOpacity(filterStyle->svgStyle()->floodOpacity());
67 parentStyle->deref(document()->renderArena());
68 filterStyle->deref(document()->renderArena());
70 return m_filterEffect;
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:19 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.