W3C home > Mailing lists > Public > www-svg@w3.org > March 2008

Re: Masks and Images

From: Erik Dahlström <ed@opera.com>
Date: Tue, 11 Mar 2008 14:25:22 +0100
To: "Mark E. Shoulson" <mark@kli.org>, www-svg@w3.org
Message-ID: <op.t7uswkgsgqiacl@gnorps.palace.opera.no>

On Mon, 10 Mar 2008 16:22:59 +0100, Mark E. Shoulson <mark@kli.org> wrote:

> Hi folks.
>
> I'm new here, but I've been playing around with an SVG project for a  
> while and I have a pair of questions-slash-feature requests...
>
> (1) Currently, my SVG validates, except for the fact that I have  
> "transform" attributes on "mask" elements.  I am told, "well, no  
> problem, you can just put the transform on a group inside the mask,"  
> which is probably true, but if so, and thus if transforming everything  
> in a mask is no problem, why isn't it allowed on the mask element itself  
> in the first place?

Are you proposing that 'transform' on <mask> should be a supplemental  
transform, similar to gradientTransform[1] and patternTransform[2], such  
that it doesn't apply to the x,y,width,height attributes that are on the  
<mask> element?

Or, do you suggest to add it similar to <clipPath>, that is have  
'transform' implied[3]?

> (2) I can use <image> elements to include a raster image from anywhere  
> in the web.  And I can set its "width" and "height" attributes (and its  
> "x" and "y"), and then no matter *what* the original size of the image,  
> it is always exactly the right size and in exactly the right place with  
> respect to the current rendering of my SVG.  That is, if the width and  
> height are 80 and the x and y are -40, the image will *always* be  
> centered at (0,0) in my SVG's coordinate system, and will *always* take  
> up an 80x80 rectangle in my current coordinates.
>
> And yet I can't do that if the image I am including is another SVG.   
> Because SVGs drag their own coordinate systems into the mix.  So in  
> short, raster images are more easily *scaled* and dealt with in a  
> *scale-independent* fashion than the supposedly scalable and  
> scale-independent SVGs??  That somehow seems wrong.

I would tend to agree with that.

There's a thread[4] on svg-developers@yahoogroups.com about this problem.

> I'm sure that there are Good and Proper reasons for the behavior of  
> <image>-included SVGs, but in the interests of the scalability of what  
> are supposed to be scalable images, It Would Be Nice If there were a way  
> to include SVG images in a similar fashion to the scale-independence  
> available to raster images.

Indeed.

/Erik

[1]  
http://www.w3.org/TR/SVG11/pservers.html#LinearGradientTransformAttribute
[2] http://www.w3.org/TR/SVG11/pservers.html#PatternTransformAttribute
[3] http://www.w3.org/TR/SVG11/masking.html#ClipPathElement
[4] http://tech.groups.yahoo.com/group/svg-developers/message/60105

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Tuesday, 11 March 2008 13:25:53 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:38 GMT