OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 26 matching lines...) Expand all Loading... |
37 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_UNKNOWN, emptyStr
ing())); | 37 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_UNKNOWN, emptyStr
ing())); |
38 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_IDENTITY, "identi
ty")); | 38 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_IDENTITY, "identi
ty")); |
39 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_TABLE, "table")); | 39 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_TABLE, "table")); |
40 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_DISCRETE, "discre
te")); | 40 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_DISCRETE, "discre
te")); |
41 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_LINEAR, "linear")
); | 41 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_LINEAR, "linear")
); |
42 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_GAMMA, "gamma")); | 42 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_GAMMA, "gamma")); |
43 } | 43 } |
44 return entries; | 44 return entries; |
45 } | 45 } |
46 | 46 |
47 // Animated property definitions | |
48 | |
49 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGComponentTransferFunctionElement) | |
50 END_REGISTER_ANIMATED_PROPERTIES | |
51 | |
52 SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const Q
ualifiedName& tagName, Document& document) | 47 SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const Q
ualifiedName& tagName, Document& document) |
53 : SVGElement(tagName, document) | 48 : SVGElement(tagName, document) |
54 , m_tableValues(SVGAnimatedNumberList::create(this, SVGNames::tableValuesAtt
r, SVGNumberList::create())) | 49 , m_tableValues(SVGAnimatedNumberList::create(this, SVGNames::tableValuesAtt
r, SVGNumberList::create())) |
55 , m_slope(SVGAnimatedNumber::create(this, SVGNames::slopeAttr, SVGNumber::cr
eate(1))) | 50 , m_slope(SVGAnimatedNumber::create(this, SVGNames::slopeAttr, SVGNumber::cr
eate(1))) |
56 , m_intercept(SVGAnimatedNumber::create(this, SVGNames::interceptAttr, SVGNu
mber::create())) | 51 , m_intercept(SVGAnimatedNumber::create(this, SVGNames::interceptAttr, SVGNu
mber::create())) |
57 , m_amplitude(SVGAnimatedNumber::create(this, SVGNames::amplitudeAttr, SVGNu
mber::create(1))) | 52 , m_amplitude(SVGAnimatedNumber::create(this, SVGNames::amplitudeAttr, SVGNu
mber::create(1))) |
58 , m_exponent(SVGAnimatedNumber::create(this, SVGNames::exponentAttr, SVGNumb
er::create(1))) | 53 , m_exponent(SVGAnimatedNumber::create(this, SVGNames::exponentAttr, SVGNumb
er::create(1))) |
59 , m_offset(SVGAnimatedNumber::create(this, SVGNames::offsetAttr, SVGNumber::
create())) | 54 , m_offset(SVGAnimatedNumber::create(this, SVGNames::offsetAttr, SVGNumber::
create())) |
60 , m_type(SVGAnimatedEnumeration<ComponentTransferType>::create(this, SVGName
s::typeAttr, FECOMPONENTTRANSFER_TYPE_IDENTITY)) | 55 , m_type(SVGAnimatedEnumeration<ComponentTransferType>::create(this, SVGName
s::typeAttr, FECOMPONENTTRANSFER_TYPE_IDENTITY)) |
61 { | 56 { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 func.slope = m_slope->currentValue()->value(); | 126 func.slope = m_slope->currentValue()->value(); |
132 func.intercept = m_intercept->currentValue()->value(); | 127 func.intercept = m_intercept->currentValue()->value(); |
133 func.amplitude = m_amplitude->currentValue()->value(); | 128 func.amplitude = m_amplitude->currentValue()->value(); |
134 func.exponent = m_exponent->currentValue()->value(); | 129 func.exponent = m_exponent->currentValue()->value(); |
135 func.offset = m_offset->currentValue()->value(); | 130 func.offset = m_offset->currentValue()->value(); |
136 func.tableValues = m_tableValues->currentValue()->toFloatVector(); | 131 func.tableValues = m_tableValues->currentValue()->toFloatVector(); |
137 return func; | 132 return func; |
138 } | 133 } |
139 | 134 |
140 } | 135 } |
OLD | NEW |