Coordinates systems : Viewpoint attributes ( continued )
The scaling of the viewpoint change can be controlled by the attribute :
preserveAspectRatio
=
align
[
meet
or
slice
]
The authorized values of
align
are :
nothing ( default ) ; the scaling is done such as the extreme values of x ( resp y ) are the boundaries of the viewpoint rectangle
xMinYmin ; Uniform scaling ; min of x = x min of the viewpoint
min of y = y min of the viewpoint
XMidYMin ; Uniform scaling ; mean of x = x mean of the viewpoint
min of y = y min of the viewpoint
XMaxYMin ; idem
XMinYMid ; idem
and all possible choices Min,Mid,Max for X and Y
The
meet
or
slice parameter
is optional ; it has the following meaning :
meet
( default ) scales the graphic such as :
the aspect ratio is preserved
the whole viewpoint rectangle is visible
the viewpoint box is as large as possible
slice
scales the graphic such as :
scales the graphic such as :
the viewpoint box fits the whole space
the viewpoint box is as small as possible
Example
Didier Courtaud
The SVG language
Novembre 2001
25 / 74