One Rect For All specificaiton

Colin Holgate colinholgate at
Wed Jan 27 16:32:37 EST 2016

To elaborate on that…

If you have a card that is 1024x768, running on a device that is 1920x1080, showAll will make you see the 1024x768, with an extra 171 pixels either side, to make 1366x768. That is then scaled up to fill the 1920x1080.

An object in the upper left corner would have its top at zero, but it’s left would want to be at -171. You can calculate that -171 like this:

(1024 - 768/1080*1920)/2

More generally, the left edge is the card width minus the card height divided by the device height, times the device width. All divided by 2.

More information about the use-livecode mailing list