-
Notifications
You must be signed in to change notification settings - Fork 22
Description
PPI number seems to be wrong for iPhone 6, 7, 8 Plus devices, leading to incorrect dimensionInInches, dimensionInCentimeters values, and pixelsPerInch, that don't match up with physical device.
Library returns screen dimensions of:
5.5 x 3.09 inches for the screen
But the actual physical dimensions are:
4.79 × 2.7
There is a 1.15x error.
This seems to be related to the 1/1.15 downsampling unique to these models from the rendered screen buffer to the device's physical screen.
This helps explain the downsampling: https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions
(Edit: this link shows the incorrect 401 PPI for drawing to the screen)
So, I think the PPI in this module is calculated using the rendered screen buffer's dimensions (main.nativeBounds.height = 2208, width = 1242), but it should be calculated using device's physical pixels (1920, 1080).
This would be necessary, to do, say a ruler app.