W3C home > Mailing lists > Public > www-svg@w3.org > January 2014

Re: [svg2] Status of the viewbox property

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Fri, 10 Jan 2014 11:38:28 +0100
To: www-svg@w3.org
Message-Id: <201401101138.28472.Dr.O.Hoffmann@gmx.de>
Brian Birtles:
> b) Adding an 'auto' property value to viewbox

Yet another question about 'auto':
If we have a preserveAspectRatio of type slice,
what could be a meaningful implementation of 
viewBox 'auto'?

One use case I have in mind for slice is, that
the author needs to fill the viewport completely
with graphics and does not worry about removed
parts at the edges. This can appear for example
if you want to provide a not periodic background
(or one with another symmetry than available in SVG
and CSS background/pattern repetition now).
to be used with CSS, for example a penrose pattern.

The author notes lots of elements to cover a part
of the canvas completely and viewBox 'auto'
needs to be the largest part of this, that covers
the viewport with its aspect ratio completely without
any gaps, if scaled.

Maybe there is no simple algorithm for this case for 'auto'?
(maybe one could use the elements as black mask and
check for unmasked, white areas, however depending 
on the complexity of the arrangement of the elements,
there will not be always just one solution). 
This would be a really interesting use
case, because what authors now can do with 
viewBox is not necessarily the optimal solution
for the current aspect ratio of the viewBox.

If such an algorithm is not available, I think, such
value 'auto' does not have much use for the slice

Received on Friday, 10 January 2014 10:38:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:50 UTC