OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 inline SVGFEDropShadowElement::SVGFEDropShadowElement(Document& document) | 32 inline SVGFEDropShadowElement::SVGFEDropShadowElement(Document& document) |
33 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDropShadowTag, document) | 33 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDropShadowTag, document) |
34 , m_dx(SVGAnimatedNumber::create(this, SVGNames::dxAttr, SVGNumber::create(2
))) | 34 , m_dx(SVGAnimatedNumber::create(this, SVGNames::dxAttr, SVGNumber::create(2
))) |
35 , m_dy(SVGAnimatedNumber::create(this, SVGNames::dyAttr, SVGNumber::create(2
))) | 35 , m_dy(SVGAnimatedNumber::create(this, SVGNames::dyAttr, SVGNumber::create(2
))) |
36 , m_stdDeviation(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::std
DeviationAttr, 2, 2)) | 36 , m_stdDeviation(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::std
DeviationAttr, 2, 2)) |
37 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 37 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
38 { | 38 { |
39 ScriptWrappable::init(this); | |
40 | |
41 addToPropertyMap(m_dx); | 39 addToPropertyMap(m_dx); |
42 addToPropertyMap(m_dy); | 40 addToPropertyMap(m_dy); |
43 addToPropertyMap(m_stdDeviation); | 41 addToPropertyMap(m_stdDeviation); |
44 addToPropertyMap(m_in1); | 42 addToPropertyMap(m_in1); |
45 } | 43 } |
46 | 44 |
47 DEFINE_NODE_FACTORY(SVGFEDropShadowElement) | 45 DEFINE_NODE_FACTORY(SVGFEDropShadowElement) |
48 | 46 |
49 void SVGFEDropShadowElement::setStdDeviation(float x, float y) | 47 void SVGFEDropShadowElement::setStdDeviation(float x, float y) |
50 { | 48 { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 105 |
108 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); | 106 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); |
109 if (!input1) | 107 if (!input1) |
110 return nullptr; | 108 return nullptr; |
111 | 109 |
112 RefPtr<FilterEffect> effect = FEDropShadow::create(filter, stdDeviationX()->
currentValue()->value(), stdDeviationY()->currentValue()->value(), m_dx->current
Value()->value(), m_dy->currentValue()->value(), color, opacity); | 110 RefPtr<FilterEffect> effect = FEDropShadow::create(filter, stdDeviationX()->
currentValue()->value(), stdDeviationY()->currentValue()->value(), m_dx->current
Value()->value(), m_dy->currentValue()->value(), color, opacity); |
113 effect->inputEffects().append(input1); | 111 effect->inputEffects().append(input1); |
114 return effect.release(); | 112 return effect.release(); |
115 } | 113 } |
116 | 114 |
117 } | 115 } // namespace blink |
OLD | NEW |