W3C home > Mailing lists > Public > www-svg@w3.org > February 2012

Small enhancement proposal for SVG

From: Jeremie Patonnier <jeremie.patonnier@gmail.com>
Date: Sat, 4 Feb 2012 14:36:37 +0100
Message-ID: <CAEi838=0NxMYRq2vcmxYJcCeYK13hYW2Cr8CUP6URyq73nOS8A@mail.gmail.com>
To: www-svg <www-svg@w3.org>
Hello everyone

I recently dig into some SVG features that could be slightly enhanced to
make them more author friendly.

*keySplines attribute
At the moment, SVG (1.1 and 1.2Tiny) said that keySplines  is "A set of
Bézier control points associated with the ‘keyTimes’ list, defining a cubic
Bézier function that controls interval pacing" [1]

I wonder if it could be possible to consider allowing some keywords for
common cubic Bézier function. The CSS Transition module defines such
keywords [2] and it would be nice for authors to have the same set of
keywords in SVG :)

*transform attribute*

At the moment, SVG (1.1 and 1.2Tiny) define 6 transform definitions [3]
(matrix, translate, scale, rotate, skewX, skewY) available for the
transform attribute.
At the same time, the SVGMatrix DOM interface [4] expose two more methods :
flipX() and flipY()

Would it be possible to expose flipX and flipY as 2 new transform
And at the same time, is it possible to consider enhance those methods by
adding a parameter to define the position of the transformation axis?
In that last case, we could have this :

<rect x="0" y="0" width="100" height="100" transform="flipY(50)" />

instead of :

<rect x="0" y="0" width="100" height="100" transform="translate(0 50)
matrix(1 0 0 -1 0 0)" />

I know that it's possible to relay on the scale transform definitions to
achieve the same effect, like this :

<rect x="0" y="0" width="100" height="100" transform="translate(0 50)
scale(1 -1)" />

But using the scale transform definition to flip an element is somewhat
counter intuitive and, at least, not obvious.
This last proposition could help authors that are not good at mathematics
(such as myself) and make transformations a lot more friendly.

Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>

[1] http://www.w3.org/TR/SVG11/animate.html#KeySplinesAttribute
[2] http://www.w3.org/TR/css3-transitions/#transition-timing-function_tag
[3] http://www.w3.org/TR/SVG11/coords.html#TransformAttribute
[4] http://www.w3.org/TR/SVG11/coords.html#InterfaceSVGMatrix
Received on Saturday, 4 February 2012 13:37:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:27 UTC