View Single Post
Old 07-25-2017, 03:44 PM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,858
Karma: 6120478
Join Date: Nov 2009
Device: many
So to make this algorithm general, you will need to know your target screen width, target screen height, and image width and height.

Code:
if (image height > screen height) then
   use: (image width/image height) * (screen height / screen width) as % of width
else
   use: 100% of width
Is that correct?
KevinH is offline   Reply With Quote