• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • svg
SVGFELightElement.cpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 2005 Oliver Hunt <oliver@nerget.com>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#include "config.h"
23
24#if ENABLE(SVG) && ENABLE(SVG_FILTERS)
25#include "SVGFELightElement.h"
26
27#include "SVGNames.h"
28
29namespace WebCore {
30
31SVGFELightElement::SVGFELightElement(const QualifiedName& tagName, Document* doc)
32 : SVGElement(tagName, doc)
33 , m_azimuth(0.0f)
34 , m_elevation(0.0f)
35 , m_x(0.0f)
36 , m_y(0.0f)
37 , m_z(0.0f)
38 , m_pointsAtX(0.0f)
39 , m_pointsAtY(0.0f)
40 , m_pointsAtZ(0.0f)
41 , m_specularExponent(1.0f)
42 , m_limitingConeAngle(0.0f)
43{
44}
45
46SVGFELightElement::~SVGFELightElement()
47{
48}
49
50ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, Azimuth, azimuth, SVGNames::azimuthAttr, m_azimuth)
51ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, Elevation, elevation, SVGNames::elevationAttr, m_elevation)
52ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, X, x, SVGNames::xAttr, m_x)
53ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, Y, y, SVGNames::yAttr, m_y)
54
55ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, Z, z, SVGNames::zAttr, m_z)
56ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, PointsAtX, pointsAtX, SVGNames::pointsAtXAttr, m_pointsAtX)
57ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, PointsAtY, pointsAtY, SVGNames::pointsAtYAttr, m_pointsAtY)
58ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, PointsAtZ, pointsAtZ, SVGNames::pointsAtZAttr, m_pointsAtZ)
59ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, SpecularExponent, specularExponent, SVGNames::specularExponentAttr, m_specularExponent)
60ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, LimitingConeAngle, limitingConeAngle, SVGNames::limitingConeAngleAttr, m_limitingConeAngle)
61
62void SVGFELightElement::parseMappedAttribute(MappedAttribute* attr)
63{
64 const String& value = attr->value();
65 if (attr->name() == SVGNames::azimuthAttr)
66 setAzimuthBaseValue(value.toFloat());
67 else if (attr->name() == SVGNames::elevationAttr)
68 setElevationBaseValue(value.toFloat());
69 else if (attr->name() == SVGNames::xAttr)
70 setXBaseValue(value.toFloat());
71 else if (attr->name() == SVGNames::yAttr)
72 setYBaseValue(value.toFloat());
73 else if (attr->name() == SVGNames::zAttr)
74 setZBaseValue(value.toFloat());
75 else if (attr->name() == SVGNames::pointsAtXAttr)
76 setPointsAtXBaseValue(value.toFloat());
77 else if (attr->name() == SVGNames::pointsAtYAttr)
78 setPointsAtYBaseValue(value.toFloat());
79 else if (attr->name() == SVGNames::pointsAtZAttr)
80 setPointsAtZBaseValue(value.toFloat());
81 else if (attr->name() == SVGNames::specularExponentAttr)
82 setSpecularExponentBaseValue(value.toFloat());
83 else if (attr->name() == SVGNames::limitingConeAngleAttr)
84 setLimitingConeAngleBaseValue(value.toFloat());
85 else
86 SVGElement::parseMappedAttribute(attr);
87}
88
89}
90
91#endif // ENABLE(SVG)
92
93// vim:ts=4:noet
SVGFELightElement.h
SVGNames.h
WebCore
Definition: CSSHelper.h:7
WebCore::String
DOM::DOMString String
Definition: PlatformString.h:8
X
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.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal