display_get_dpi_y

Returns the dpi value of the y axis of the display.

Syntax:

display_get_dpi_y();


Returns: Real


Description

Dots per inch (DPI) is a measure of spatial printing or video dot density, in particular the number of individual dots that can be placed in a line within the span of 1 inch (2.54 cm). When working on mobile devices (in particular Android devices) this is an important factor to take into consideration as what may be appropriate for one display resolution, may not be appropriate for another. For example, you may have two displays with the same resolution of 400 x 800, but display 1 has a dpi of 60 and display 2 has a dpi of 30. In this case, any text or image displayed on display 2 will appear much larger, even though the actual resolution is the same.

This function will get the dpi of the device display along the y axis (this value is also dependant on the orientation of the device). Please note that Mac and iOS do not return specific dpi settings but appear to return the same values as the OS, which are not correct (but will have to do) as Apple do not give the correct values.


Example:

dpy = display_get_dpi_y();

This would set the variable "dpy" to the dpi value of the y axis.


Back: Windows And Views
Next: display_set_gui_size
© Copyright YoYo Games Ltd. 2018 All Rights Reserved