KHTML
Go to the documentation of this file.
25#if ENABLE(SVG) && ENABLE(SVG_FILTERS)
31#include "SVGRenderStyle.h"
36SVGFEFloodElement::SVGFEFloodElement(
const QualifiedName& tagName, Document* doc)
37 : SVGFilterPrimitiveStandardAttributes(tagName, doc)
42SVGFEFloodElement::~SVGFEFloodElement()
44 delete m_filterEffect;
47void SVGFEFloodElement::parseMappedAttribute(MappedAttribute* attr)
49 SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
52SVGFEFlood* 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-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by
doxygen 1.9.6 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.