View Single Post
Old 02-25-2011, 01:50 AM   #2
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
I think what you're looking for is preserveAspectRatio="xMidYMin meet", or possibly preserveAspectRatio="xMidYMid meet".

Specifying something other than "none" ensures that uniform scaling is used for the image height (Y) and width (X).

"xMid" will center the image horizontally in the available viewing area.
"YMin" will position the top of the image at the top of the available viewing area, or "YMid" will center the image vertically in the available viewing area.

The "meet" parameter scales the image such that
a. the aspect ratio is preserved.
b. the entire image is displayed.
c. the image is scaled up as far as possible while still meeting the first two conditions.

For more info on the preserveAspectRatio attribute, see http://www.w3.org/TR/SVG/coords.html...RatioAttribute
DMSmillie is offline   Reply With Quote