View Single Post
Old 07-26-2013, 06:39 PM   #10
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by Notjohn View Post
I am intrigued by this part of the code:

<svg xmlns="http://www.w3.org/2000/svg" height="100%"
preserveAspectRatio="xMidYMid meet" version="1.1"
viewBox="0 0 SGC_IMAGE_WIDTH SGC_IMAGE_HEIGHT" width="100%"


Somehow it never occurred to me that one could specify width, height, and at the same time preserveAspectRatio. Does this mean that the lesser of width or height will rule (i.e., if 100% width fills the screen before 100% height does, then there will be white space above and below the cover image)?
There are two ways it can work. See SVG or our wiki for details. One way to have "white" space on two sides of the device while the other is to crop the image to fit. Both preserve aspect ratio.

Dale
DaleDe is offline   Reply With Quote