RE: [whatwg] SVG cloning elements from HTML5

On Wednesday, June 25, 2014 4:26 AM
Anne wrote:

>... And then given enough iterations and progress you can display a <video> as a polygon.

I un-cc-ed whatwg, since my comment is more svg-ish than html-ish.

The notion of displaying a video as a polygon reminds me of something I have been whating to suggest for a while now based on our work on [1]. Namely, the ability to fill polygons with things other than standard <pattern> <gradient> color, etc.: namely to fill it with pictures, video and/or text. The first can now be done using <clipPath>; video would take some work since foreignObject is not yet supported everywhere and <video> in SVG seems to have fallen into disrepute; text is currently under discussion by what seems like at least 14 different working groups, within and out of the W3C umbrella. I know there have been feature requests for text fitting into a shape for some time, but the topic seems to bounce a bit into recesses at times. 

But semantically, it seems, that whatever we use to fill a polygon retains its identity as a sort of content, and, at the same time, the polygon itself retains its identity as a polygon.

Currently [see also 2] if one wants to paint a pentagon with a picture, in SVG, one does something like 

<clipPath id="C"><path
d="M 32 55 111 41 157 106 120 145 25 98 z"  />
</clipPath>
<image xlink:href="p17.jpg" width="180" id="I"
clip-path="url(#C)" height="170" />

Accessibilty-wise, this is now a picture, though many of us would still think of it as a pentagon. (Btw, the instance of this in the group of pentagons at the top of [2] displays in Old Opera and Modern IE, but not in FF or Chrome)

Might it be possible, in some wonderful future, to simply say

<path d="M 32 55 111 41 157 106 120 145 25 98 z" fill="url(#I)" /> where I is an image,
or 
<path d="M 32 55 111 41 157 106 120 145 25 98 z" fill="url(#T)" /> where T is a text,
or
<path d="M 32 55 111 41 157 106 120 145 25 98 z" fill="url(#V)" /> where V is a video,

In addition to the current 

<path d="M 32 55 111 41 157 106 120 145 25 98 z" fill="url(#G)" /> where G is a gradient?

It would make doing things like [3] as output by [4] person-months of work easier (to give this a quantitative air).

And, I really do think it would aid newcomers' ability to learn SVG, and at the same time improve accessibility since polygons then retain the semantics of a polygon. Is a polygon filled with a picture not easier to understand than a picture with a clipPath applied, where the clipPath contains a polygon? And it is not easier to search for a pentagon (that happens to be filled with a picture) than to search for clipPaths that happen to contain pentagons and which have been applied to pictures?

Cheers
David

[1] http://cs.sru.edu/~ddailey/NonRectangles/ParisLayout.html or http://cs.sru.edu/~ddailey/Parisien.html 
[2] http://cs.sru.edu/~ddailey/svg/GeometricAccessibility.html 
[3] http://cs.sru.edu/~ddailey/fonts/saved/saved88.svg
[4] http://cs.sru.edu/~ddailey/fonts/Tansy1.7.4.htm

Received on Wednesday, 25 June 2014 14:06:28 UTC