Difference between revisions of "love.graphics.getPixelHeight"
(Created page) |
m (0.11.0 -> 11.0) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | {{newin|[[ | + | {{newin|[[11.0]]|110|type=function}} |
Gets the height in pixels of the window. | Gets the height in pixels of the window. | ||
− | [[love.graphics.getHeight]] | + | The graphics coordinate system and [[love.graphics.getHeight]] use units scaled by the screen's [[love.graphics.getDPIScale|DPI scale factor]], rather than raw pixels. Use getHeight for calculations related to drawing to the screen and using the coordinate system (calculating the center of the screen, for example), and getPixelHeight only when dealing specifically with underlying pixels (pixel-related calculations in a pixel [[Shader]], for example). |
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === |
Latest revision as of 12:42, 29 December 2018
Available since LÖVE 11.0 |
This function is not supported in earlier versions. |
Gets the height in pixels of the window.
The graphics coordinate system and love.graphics.getHeight use units scaled by the screen's DPI scale factor, rather than raw pixels. Use getHeight for calculations related to drawing to the screen and using the coordinate system (calculating the center of the screen, for example), and getPixelHeight only when dealing specifically with underlying pixels (pixel-related calculations in a pixel Shader, for example).
Function
Synopsis
pixelheight = love.graphics.getPixelHeight( )
Arguments
None.
Returns
number pixelheight
- The height of the window in pixels.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info