Preview of Resolution Independent Control library for RevMobile

Thomas McGrath III mcgrath3 at mac.com
Sun Jul 29 08:52:02 EDT 2012


The reason I posted this (most obvious post) was because the LC engine already knows the difference between a point and a pixel and interprets two physical pixels as a logical point with this command. It does know how to double the size of 'everything' all at once. And what we are actually looking for is the ability to use double sized HD images and controls at regular size and NOT have them doubled but then we need double pixel controls as well. What we are looking for is to use pixels (not iOS's/LC's Logical Points) and create our own logic for pixel management as well as images and graphics.

-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgrath at comcast.net

On Jul 28, 2012, at 6:13 PM, Thomas McGrath III wrote:

> Livecode has included a command for dealing with the pixel and point issue….
> 
> "The iphoneUseDeviceResolution command specifies whether the full resolution of high-resolution devices should be used.
> 
> By default, iOS handles this by mapping one logical 'point' to two physical 'pixels' with applications (LiveCode included) interpreting everything in terms of logical points. 
> 
> If the iphoneUseDeviceResolution command is passed true as the first argument, LiveCode ensures that co-ordinates and sizes specified in LiveCode are treated as being in pixels, rather than logical points. In particular, when changed, a resizeStack message is sent notifying the size change of the current main-stack, and functions and properties (such as the screenRect) reflects co-ordinates in pixels.
> 
> If the iphoneUseDeviceResolution command is passed true as the second argument, LiveCode ensures that co-ordinates and sizes specified in LiveCode for custom controls are treated as being in pixels, rather than logical points.
> 
> Note: The notion of pixel and logical point remains valid on older devices, it is just that it is always 1-1 thus using this command has no effect there. The scale of the device's screen (relative to a non-Retina display) can be queried using iphoneDeviceScale(). This function returns 2 if the display is a Retina display, or 1 otherwise."
> 
> 
> 
> 
> The problem is this is an all or nothing approach that does not translate well to the desktop IDE environment that we have to work in and does not handle the graphics that would be necessary to display a HD image where needed in a button, image, etc. and a Normal image where not.
> 
> Originally I used true,false and then doubled my images but would fail when using a mixed screen with images and native livecode controls.
> 	
> 
> -- Tom McGrath III
> http://lazyriver.on-rev.com
> 3mcgrath at comcast.net
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list