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

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

From: Helder Magalh„es <helder.magalhaes@gmail.com>
Date: Mon, 12 May 2008 14:12:55 +0100
Message-ID: <2a1ddf8a0805120612h74b8b9c2kb59a4244a2b63c11@mail.gmail.com>
To: www-svg@w3.org

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


  Helder Magalh„es
Received on Monday, 12 May 2008 13:13:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:13 UTC