Re: Masks and Images

Hi Mark,

> 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.

The referenced svg needs a viewBox attribute to define a (coordinate) 
width and height so that it can be scaled into the image viewport.

Ken

On 11/03/2008 1:22 AM, Mark E. Shoulson 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?
> 
> (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'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.
> 
> Thanks for your attention,
> 
> ~mark
> 
> 
> 
> 

Received on Tuesday, 11 March 2008 02:18:30 UTC