| 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 14 matching lines...) Expand all Loading... |
| 25 #include "core/svg/SVGFEComponentTransferElement.h" | 25 #include "core/svg/SVGFEComponentTransferElement.h" |
| 26 #include "core/svg/SVGNumberList.h" | 26 #include "core/svg/SVGNumberList.h" |
| 27 | 27 |
| 28 namespace blink { | 28 namespace blink { |
| 29 | 29 |
| 30 template <> | 30 template <> |
| 31 const SVGEnumerationStringEntries& | 31 const SVGEnumerationStringEntries& |
| 32 getStaticStringEntries<ComponentTransferType>() { | 32 getStaticStringEntries<ComponentTransferType>() { |
| 33 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); | 33 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); |
| 34 if (entries.isEmpty()) { | 34 if (entries.isEmpty()) { |
| 35 entries.append( | 35 entries.push_back( |
| 36 std::make_pair(FECOMPONENTTRANSFER_TYPE_IDENTITY, "identity")); | 36 std::make_pair(FECOMPONENTTRANSFER_TYPE_IDENTITY, "identity")); |
| 37 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_TABLE, "table")); | 37 entries.push_back(std::make_pair(FECOMPONENTTRANSFER_TYPE_TABLE, "table")); |
| 38 entries.append( | 38 entries.push_back( |
| 39 std::make_pair(FECOMPONENTTRANSFER_TYPE_DISCRETE, "discrete")); | 39 std::make_pair(FECOMPONENTTRANSFER_TYPE_DISCRETE, "discrete")); |
| 40 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_LINEAR, "linear")); | 40 entries.push_back( |
| 41 entries.append(std::make_pair(FECOMPONENTTRANSFER_TYPE_GAMMA, "gamma")); | 41 std::make_pair(FECOMPONENTTRANSFER_TYPE_LINEAR, "linear")); |
| 42 entries.push_back(std::make_pair(FECOMPONENTTRANSFER_TYPE_GAMMA, "gamma")); |
| 42 } | 43 } |
| 43 return entries; | 44 return entries; |
| 44 } | 45 } |
| 45 | 46 |
| 46 SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement( | 47 SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement( |
| 47 const QualifiedName& tagName, | 48 const QualifiedName& tagName, |
| 48 Document& document) | 49 Document& document) |
| 49 : SVGElement(tagName, document), | 50 : SVGElement(tagName, document), |
| 50 m_tableValues( | 51 m_tableValues( |
| 51 SVGAnimatedNumberList::create(this, SVGNames::tableValuesAttr)), | 52 SVGAnimatedNumberList::create(this, SVGNames::tableValuesAttr)), |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 func.slope = m_slope->currentValue()->value(); | 111 func.slope = m_slope->currentValue()->value(); |
| 111 func.intercept = m_intercept->currentValue()->value(); | 112 func.intercept = m_intercept->currentValue()->value(); |
| 112 func.amplitude = m_amplitude->currentValue()->value(); | 113 func.amplitude = m_amplitude->currentValue()->value(); |
| 113 func.exponent = m_exponent->currentValue()->value(); | 114 func.exponent = m_exponent->currentValue()->value(); |
| 114 func.offset = m_offset->currentValue()->value(); | 115 func.offset = m_offset->currentValue()->value(); |
| 115 func.tableValues = m_tableValues->currentValue()->toFloatVector(); | 116 func.tableValues = m_tableValues->currentValue()->toFloatVector(); |
| 116 return func; | 117 return func; |
| 117 } | 118 } |
| 118 | 119 |
| 119 } // namespace blink | 120 } // namespace blink |
| OLD | NEW |