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

KHTML

  • sources
  • kde-4.14
  • kdelibs
  • 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 
29 namespace WebCore {
30 
31 SVGFELightElement::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 
46 SVGFELightElement::~SVGFELightElement()
47 {
48 }
49 
50 ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, Azimuth, azimuth, SVGNames::azimuthAttr, m_azimuth)
51 ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, Elevation, elevation, SVGNames::elevationAttr, m_elevation)
52 ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, X, x, SVGNames::xAttr, m_x)
53 ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, Y, y, SVGNames::yAttr, m_y)
54 
55 ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, Z, z, SVGNames::zAttr, m_z)
56 ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, PointsAtX, pointsAtX, SVGNames::pointsAtXAttr, m_pointsAtX)
57 ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, PointsAtY, pointsAtY, SVGNames::pointsAtYAttr, m_pointsAtY)
58 ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, PointsAtZ, pointsAtZ, SVGNames::pointsAtZAttr, m_pointsAtZ)
59 ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, SpecularExponent, specularExponent, SVGNames::specularExponentAttr, m_specularExponent)
60 ANIMATED_PROPERTY_DEFINITIONS(SVGFELightElement, float, Number, number, LimitingConeAngle, limitingConeAngle, SVGNames::limitingConeAngleAttr, m_limitingConeAngle)
61 
62 void 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
WebCore::SVGNames::pointsAtZAttr
DOM::QualifiedName pointsAtZAttr
Definition: SVGNames.cpp:256
WebCore::SVGNames::specularExponentAttr
DOM::QualifiedName specularExponentAttr
Definition: SVGNames.cpp:280
WebCore::SVGNames::limitingConeAngleAttr
DOM::QualifiedName limitingConeAngleAttr
Definition: SVGNames.cpp:210
WebCore::SVGNames::yAttr
DOM::QualifiedName yAttr
Definition: SVGNames.cpp:343
WebCore::SVGNames::azimuthAttr
DOM::QualifiedName azimuthAttr
Definition: SVGNames.cpp:113
SVGNames.h
WebCore::SVGNames::elevationAttr
DOM::QualifiedName elevationAttr
Definition: SVGNames.cpp:148
WebCore::SVGNames::pointsAtXAttr
DOM::QualifiedName pointsAtXAttr
Definition: SVGNames.cpp:254
WebCore::SVGNames::pointsAtYAttr
DOM::QualifiedName pointsAtYAttr
Definition: SVGNames.cpp:255
WebCore::SVGNames::zAttr
DOM::QualifiedName zAttr
Definition: SVGNames.cpp:347
WebCore::String
DOM::DOMString String
Definition: PlatformString.h:8
WebCore::SVGNames::xAttr
DOM::QualifiedName xAttr
Definition: SVGNames.cpp:338
SVGFELightElement.h
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.

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 API Reference

Skip menu "kdelibs 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

Search



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