Determine the screen DPI
bobsneidar at iotecdigital.com
Wed Jul 26 16:05:26 EDT 2023
Yes, and that is what I did eventually. What I decided to do at any rate is assume 110 PPI for MacOS and 96 PPI for Windows. Not sure what Linux is or if there is anything such as a standard.
My goal is to create a popup menu for selecting stack/card size when creating a new stack.
> On Jul 26, 2023, at 11:44 AM, Craig Newman via use-livecode <use-livecode at lists.runrev.com> wrote:
> The “screenrect” gives you the factor required directly. If you measure the actual width, say, of the screen and divide that into the difference between item 3 and item 1 of the screenRect, you will get the number of pixels per inch.
>> On Jul 26, 2023, at 2:23 PM, Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
>> Hi all.
>> I am trying to convert size in inches to size in pixels given a certain monitor in use. To do that I need to obtain the DPI of the current monitor. So for example let’s say I want to set the card size to 4x6 in inches. The monitor may be 72 dpi, 96 dpi or something else depending on the resolution. Is there an LC way to do this, or will I have to use terminal to grok it?
>> Bob S
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode