Re: relative image size and svg

In a message dated 20/08/2002 11:01:17 GMT Daylight Time, 
j.chetwynd@btinternet.com writes:


> relative image size          (eg in CSS: img {width:10%;})       
>  
> works with gif jpg png   but not svg
>  
> Is there a workaround*? 
>  
> thanks
>  
> jonathan chetwynd
>  
>  
> *Or is there another graphic file format that supports:
>  
> transparency                  (alpha channel, or gif-like)              gif 
> png svg
> relative image size          (eg in CSS: img {width:10%;})        gif jpg 
> png   but not svg
> some form of hotspot      (imagemaps, alpha or...)                none 
> known that support relative image size, imagemaps otherwise
>  
> SVG would appear not to support relative image size, as imagemaps aren't 
> suited to this type of transform, ie they assume a fixed image size.
> 

Jonathan,

I am not sure if this would work or not with SVG. But it may be worth trying.

Try setting the preserveAspectRatio attribute on the document element <svg> 
element to a value of "none".

If you have rectangular shapes as the hot spots on your SVG "image map" and 
you set the values of the x, y, width and height attributes to a percentage 
value it all may work.

Or I could be totally wrong. :)

I would be interested to know if it works.

Regards

Andrew Watt

Received on Tuesday, 20 August 2002 06:13:49 UTC