removeDefaultAttributeValue: Special-case order attribute
Scour tried to handle "order" attribute as a SVGLength. However, the "order" attribute *can* consist of two integers according to the [SVG 1.1 Specification] and SVGLength is not designed to handle that. With this change, we now pretend that "order" is a string, which side steps this issue. [SVG 1.1 Specification]: https://www.w3.org/TR/SVG11/single-page.html#filters-feConvolveMatrixElementOrderAttribute Closes: #189 Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
8ddb7d8913
commit
a459d629c1
3 changed files with 27 additions and 1 deletions
|
|
@ -1848,7 +1848,12 @@ default_attributes = [
|
|||
DefaultAttribute('offset', 0, elements=['feFuncA', 'feFuncB', 'feFuncG', 'feFuncR']),
|
||||
DefaultAttribute('operator', 'over', elements=['feComposite']),
|
||||
DefaultAttribute('operator', 'erode', elements=['feMorphology']),
|
||||
DefaultAttribute('order', 3, elements=['feConvolveMatrix']),
|
||||
# We pretend order is a string (because handling it as an
|
||||
# SVGLength will cause issues when order is two integers). Note
|
||||
# that order must be exactly one or two integers (no units or
|
||||
# fancy numbers), so working with it a string will generally just
|
||||
# work.
|
||||
DefaultAttribute('order', '3', elements=['feConvolveMatrix']),
|
||||
DefaultAttribute('pointsAtX', 0, elements=['feSpotLight']),
|
||||
DefaultAttribute('pointsAtY', 0, elements=['feSpotLight']),
|
||||
DefaultAttribute('pointsAtZ', 0, elements=['feSpotLight']),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue