Hi. 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.
Craig > On Jul 26, 2023, at 2:23 PM, Bob Sneidar via use-livecode > <use-livecode@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@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode