Re: how should 'top' width/height larger than screen be handled?

>Say i have <svg width="10in" height="10in" ......... </svg> ,
>what does the spec say about how to put this on screen?

I think, some viewers provide scrollbars and a few rescale it to
the available viewport, if it is too large. Typically the first solution
seems to be more useful - at least for my applications...

>Say i want to show a circular 'painting' at the same physical scale, on 
>every screen size. It should be centered on screen.
>For example: On a huge TV it would show completely with leftover space 
>surrounding it, on a desktop monitor it would just fit, on a laptop 
>screen it would have cut-offs top and bottom, on a netbook it would have 
>cut-offs on left,right,top and bottom, on a mobile you'd see only a 
>rectangular middle part.
>
>What ways can you do that?

You can use
preserveAspectRatio="xMidYMid slice" (in SVG 1.1 full, not in tiny)
to ensure, that the viewport is completely filled with parts of the 
viewBox and that it is centered.
This is maybe useful too, if the SVG document is used as a
CSS  background image without repetition, for example with
a Penrose tiling or something else without a periodicity.

Received on Monday, 20 April 2009 11:50:32 UTC