Re: New desired features for SVG

Great list!

I had a couple stray ones also:

* adopt html5 offline manifest attribute on top-level svg element
* toDataUrl() on SVGDocument (mentioned at conf)

I should point out while the transform-about-a-point idea is good, rotate
already allows this exact syntax.

On Oct 11, 2009 4:01 PM, "David Storey" <dstorey@opera.com> wrote:

As well as torture tests, I think I recall it being brought up at SVG Open
about new desired features for SVG.  I have my own personal list that I'll
share here. Some may already be in the process of being specced, so for
these see it as a validation of the demand for these features. Apologies if
any of these is possible right now and I've just missed them.

* Allow keywords for transforming around a centre point. This is too
difficult in SVG, especially when using % widths and height. Something like:
       transform="rotate(-45 center center)"
could work, but I'll leave it up to the spec guys to work out the best way.
If we are going to allow transforming around the centre point, maybe it
would be useful for other keywords like top-left, centre-left, etc. I guess
it is not always obvious what is the centre point of an irregular shape, but
maybe the centre of the bounding box would be sufficient?

* Allow to specify which point is the anchor when using x and y. For shapes
like <rect/> this is top left, and for <text/> it is bottom left, and for
<circle/> it is the centre point. For text you can set the text-anchor to
middle, etc. It is probably useful to be able to do this for other shapes to
make it easier to line things up. I know I've wanted it before on rects.

* Be able to use % and units for paths and polygons. I often use % in rects
and other shapes when using them as a css background-image so that they fill
the HTML element. This can be done with viewBox, but it seems more complex
to work out to me.

* More predefined filters. It would also be possible to build a filter SVG
library once the Params spec is implemented, but it would be nice to include
the most useful ones to save size and possibly to make them faster. Ones
that I can think would be useful would be:
       – (drop)Shadow. I believe this is in 1.2 already
       – Reflection (duplicate, rotate and add opacity)
       – Black and White
       – Sepia Tone
       – Two colour (such as black and a colour wash). This can probably
already be done)
       – Edge detection

* Z co-ordinate. This would probably require the canvas to be able to be
rotated/transformed in Z space and an individual element, otherwise a cube
would still look like a square due to seeing it head on.

* Be able to specify the render order of elements. Especially useful for
games.

* Be able to change the stroke order, so text can be stroked first then
filled. I think this is already covered with the spec Chris Lily is working
on (I forget the name right now).

* Some way of being able to make self contained files, so that external SVG
files, CSS files, images,  fonts and videos can be included. This would make
sharing and uploading SVG files easier. Opera already does something similar
for Widgets via a Zip archive renamed to .wgt. SVG already has zip files for
SVGZ but it only uses the compression, not the fact that other files can be
contained inside a zip archive. Once concern here is what you do about a
file that you want to reference in multiple files (such as a CSS file), as
you'd not want to duplicate files. I'd love to be able to use a SVG file in
the HTML5 video element, where the SVG is a container which holds the video
and the various synchronised video overlays and subtitles/captions, and
audio via SMIL.

* More basic shapes that are not too difficult for beginners to understand
or find. Common shapes I can think of include stars, arrows, triangles
(probably already easy enough with the polygon), and possibly spirals. The
shape tool in Keynote also allows polygons where you define the number of
sides (3 to 11, defaults to 5), speech bubble (no customisation except style
and size), Diamond (this is basically just a rotated square so doesn't offer
much new).

* A way to be able to tell a Screen Reader to ignore SVG text. This is
needed this is needed because text can be used for decoration, such as a
repeated text pattern, or for a reflection, mask or such.

This is all I can think of right now.

David Storey

Chief Web Opener / Product Manager, Opera Dragonfly
W3C WG:  Mobile Web Best Practices / SVG Interest Group

Opera Software ASA, Oslo, Norway
Mobile: +47 94 22 02 32

Received on Sunday, 11 October 2009 21:46:24 UTC