OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 REGISTER_LOCAL_ANIMATED_PROPERTY(bias) | 55 REGISTER_LOCAL_ANIMATED_PROPERTY(bias) |
56 REGISTER_LOCAL_ANIMATED_PROPERTY(targetX) | 56 REGISTER_LOCAL_ANIMATED_PROPERTY(targetX) |
57 REGISTER_LOCAL_ANIMATED_PROPERTY(targetY) | 57 REGISTER_LOCAL_ANIMATED_PROPERTY(targetY) |
58 REGISTER_LOCAL_ANIMATED_PROPERTY(edgeMode) | 58 REGISTER_LOCAL_ANIMATED_PROPERTY(edgeMode) |
59 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX) | 59 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX) |
60 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY) | 60 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY) |
61 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAlpha) | 61 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAlpha) |
62 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | 62 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) |
63 END_REGISTER_ANIMATED_PROPERTIES | 63 END_REGISTER_ANIMATED_PROPERTIES |
64 | 64 |
65 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedNam
e& tagName, Document& document) | 65 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(Document& document
) |
66 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 66 : SVGFilterPrimitiveStandardAttributes(SVGNames::feConvolveMatrixTag, docume
nt) |
67 , m_edgeMode(EDGEMODE_DUPLICATE) | 67 , m_edgeMode(EDGEMODE_DUPLICATE) |
68 { | 68 { |
69 ASSERT(hasTagName(SVGNames::feConvolveMatrixTag)); | |
70 ScriptWrappable::init(this); | 69 ScriptWrappable::init(this); |
71 registerAnimatedPropertiesForSVGFEConvolveMatrixElement(); | 70 registerAnimatedPropertiesForSVGFEConvolveMatrixElement(); |
72 } | 71 } |
73 | 72 |
74 PassRefPtr<SVGFEConvolveMatrixElement> SVGFEConvolveMatrixElement::create(const
QualifiedName& tagName, Document& document) | 73 PassRefPtr<SVGFEConvolveMatrixElement> SVGFEConvolveMatrixElement::create(Docume
nt& document) |
75 { | 74 { |
76 return adoptRef(new SVGFEConvolveMatrixElement(tagName, document)); | 75 return adoptRef(new SVGFEConvolveMatrixElement(document)); |
77 } | 76 } |
78 | 77 |
79 const AtomicString& SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier() | 78 const AtomicString& SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier() |
80 { | 79 { |
81 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", Ato
micString::ConstructFromLiteral)); | 80 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", Ato
micString::ConstructFromLiteral)); |
82 return s_identifier; | 81 return s_identifier; |
83 } | 82 } |
84 | 83 |
85 const AtomicString& SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier() | 84 const AtomicString& SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier() |
86 { | 85 { |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 338 |
340 RefPtr<FilterEffect> effect = FEConvolveMatrix::create(filter, | 339 RefPtr<FilterEffect> effect = FEConvolveMatrix::create(filter, |
341 IntSize(orderXValue, orderYValue), divisorValue, | 340 IntSize(orderXValue, orderYValue), divisorValue, |
342 biasCurrentValue(), IntPoint(targetXValue, targetYValue), ed
geModeCurrentValue(), | 341 biasCurrentValue(), IntPoint(targetXValue, targetYValue), ed
geModeCurrentValue(), |
343 FloatPoint(kernelUnitLengthXValue, kernelUnitLengthYValue),
preserveAlphaCurrentValue(), kernelMatrix.toFloatVector()); | 342 FloatPoint(kernelUnitLengthXValue, kernelUnitLengthYValue),
preserveAlphaCurrentValue(), kernelMatrix.toFloatVector()); |
344 effect->inputEffects().append(input1); | 343 effect->inputEffects().append(input1); |
345 return effect.release(); | 344 return effect.release(); |
346 } | 345 } |
347 | 346 |
348 } // namespace WebCore | 347 } // namespace WebCore |
OLD | NEW |