[racket] Bug in scribble's image-element?

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Mon Aug 4 05:35:24 EDT 2014

It is not intended. I am not sure whether it simply doesn't work, or whether
it is browser related.

SVG images are currently inserted with an html <object> tag where as the other
images are inserted as <img>. The width and height attributes are set in both
cases.

I can't remember why svg images were inserted with an object tag.
According to http://caniuse.com/svg-img it seems support for svg image
using the img tag is fine:

    http://caniuse.com/svg-img

IE8 and old versions of IOS are missing from the list though.

Scaling svg as objects might be trickier though.
I am not sure what the Right Thing is:

http://stackoverflow.com/questions/644896/how-do-i-scale-a-stubborn-svg-embedded-with-the-object-tag

/Jens Axel



2014-08-04 10:24 GMT+02:00 Antonio Menezes Leitao
<antonio.menezes.leitao at ist.utl.pt>:
> Hi,
>
> I'm trying to set the scale of an image-element for a SVG file but the
> generated html does not seem to reflect my settings.
>
> While looking at the code in
> shared/pkgs/scribble-pkgs/scribble-lib/scribble/html-render.rkt I noticed
> that the scale of an image-element affects the size of PNGs and GIFs but not
> SVGs. Is this the intended behavior? Is there another way to affect the
> scale of a SVG image?
>
> Best,
> Antonio.
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>



-- 
--
Jens Axel Søgaard


Posted on the users mailing list.