| 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 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 if (name == SVGNames::inAttr) { | 70 if (name == SVGNames::inAttr) { |
| 71 setIn1BaseValue(value); | 71 setIn1BaseValue(value); |
| 72 return; | 72 return; |
| 73 } | 73 } |
| 74 | 74 |
| 75 ASSERT_NOT_REACHED(); | 75 ASSERT_NOT_REACHED(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 PassRefPtr<FilterEffect> SVGFEComponentTransferElement::build(SVGFilterBuilder*
filterBuilder, Filter* filter) | 78 PassRefPtr<FilterEffect> SVGFEComponentTransferElement::build(SVGFilterBuilder*
filterBuilder, Filter* filter) |
| 79 { | 79 { |
| 80 FilterEffect* input1 = filterBuilder->getEffectById(in1CurrentValue()); | 80 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(in1CurrentV
alue())); |
| 81 | 81 |
| 82 if (!input1) | 82 if (!input1) |
| 83 return 0; | 83 return 0; |
| 84 | 84 |
| 85 ComponentTransferFunction red; | 85 ComponentTransferFunction red; |
| 86 ComponentTransferFunction green; | 86 ComponentTransferFunction green; |
| 87 ComponentTransferFunction blue; | 87 ComponentTransferFunction blue; |
| 88 ComponentTransferFunction alpha; | 88 ComponentTransferFunction alpha; |
| 89 | 89 |
| 90 for (Node* node = firstChild(); node; node = node->nextSibling()) { | 90 for (Node* node = firstChild(); node; node = node->nextSibling()) { |
| 91 if (node->hasTagName(SVGNames::feFuncRTag)) | 91 if (node->hasTagName(SVGNames::feFuncRTag)) |
| 92 red = toSVGFEFuncRElement(node)->transferFunction(); | 92 red = toSVGFEFuncRElement(node)->transferFunction(); |
| 93 else if (node->hasTagName(SVGNames::feFuncGTag)) | 93 else if (node->hasTagName(SVGNames::feFuncGTag)) |
| 94 green = toSVGFEFuncGElement(node)->transferFunction(); | 94 green = toSVGFEFuncGElement(node)->transferFunction(); |
| 95 else if (node->hasTagName(SVGNames::feFuncBTag)) | 95 else if (node->hasTagName(SVGNames::feFuncBTag)) |
| 96 blue = toSVGFEFuncBElement(node)->transferFunction(); | 96 blue = toSVGFEFuncBElement(node)->transferFunction(); |
| 97 else if (node->hasTagName(SVGNames::feFuncATag)) | 97 else if (node->hasTagName(SVGNames::feFuncATag)) |
| 98 alpha = toSVGFEFuncAElement(node)->transferFunction(); | 98 alpha = toSVGFEFuncAElement(node)->transferFunction(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 RefPtr<FilterEffect> effect = FEComponentTransfer::create(filter, red, green
, blue, alpha); | 101 RefPtr<FilterEffect> effect = FEComponentTransfer::create(filter, red, green
, blue, alpha); |
| 102 effect->inputEffects().append(input1); | 102 effect->inputEffects().append(input1); |
| 103 return effect.release(); | 103 return effect.release(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } | 106 } |
| OLD | NEW |