Peter Reid wrote:

> I'm developing a desktop app for Mac & PC that displays photos of
> coins. I'd like to display them at real size but I can't find the
> properties for the current screen (i.e. the one that my app is running
> on.  I can get the screen colour depth, resolution, scaling factor,
> etc. but not the physical size on the screen such as "27 inch
> diagonal" or physical px per inch.
>
> Can anyone tell me how to get this info, either using just LiveCode or
> via Mac/PC shell/command scripts?

Given the wide and growing variety of screen ratios, diagonal screen dimensions are less useful for this task.

I think pixelDensity of what you're looking for, but be forewarned:

I spent an afternoon some time ago measuring a variety of on-screen elements across all the devices in my test pool, using a physical ruler placed on the screen.

What I found is that LC seems to do as good a job as Android itself in attempting to maintain consistent sizing among such a wide range of physical display characteristics (dot pitch, etc.). Not surprising, since AFAIK LC uses the recommended OS APIs for its resolution independence.

But the downside is that I was able to measure differences in even the most standard elements like the status bar. Not much, just a millimeter or two across some devices.

So if a fairly-close-but-not-perfect rendering will suffice, I think the pixelDensity function will guide your metrics.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 [email protected]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to