Re: Source-image offset/dimensions control for the image element

Sorry for personally replying to the original message - wrong option... :-(

---------- Forwarded message ----------
From: Helder Magalhães <helder.magalhaes@gmail.com>
Date: Mon, May 12, 2008 at 2:08 PM
Subject: Re: Source-image offset/dimensions control for the image element
To: Erik Dahlström <ed@opera.com>


The whole idea sounds great! :-)


 >  In SVG it's only possible to use the 'preserveAspectRatio' attribute to
 > control the position for raster images. The 1.1 spec says that when an
 > <image> element references a raster image the implicit 'viewBox' has a value
 > of "0 0 raster-image-width raster-image-height". If there was a way of
 > controlling the implicit viewBox it would be possible to draw raster sprites
 > more efficiently.
 Being able to control the viewbox attribute would be, in my opinion,
 powerful enough to achieve desired behavior while staying familiar to
 SVG authors - CSS's background properties seem somehow unfamiliar (in
 name and in concept) from the SVG specification.


 >  It is possible to control all of this in SVG, using for example the clip,
 > mask or pattern features. However, each of these comes at the price of
 > additional processing, since they are meant to cover more advanced use-cases
 > as well.
 It also seemed to me, at a first glance, that "clip" would be
 appropriate. Isn't the "price of additional processing" an
 implementation detail? If the implementation treats "clip" directly
 applied to a raster image as a special case, it could correspond to
 the behavior achieved using "viewbox" or equivalent mechanism... Or am
 I missing something?
 On the other hand, maybe this could require implementations to catch
 up (don't know if any does this already) and/or some implementation
 notes to be added to the SVG specification in order to perform some
 evangelism on the subject (for both content and implementation
 people).

 Regards,

  Helder Magalhães

Received on Monday, 12 May 2008 13:13:28 UTC