natiny_window_get_height
C
int natiny_window_get_height(NatinyWindow id);
Returns the current height of a window in drawing units.
Parameters
| Name |
Type |
Description |
id |
NatinyWindow |
Window handle from natiny_window_create |
Returns
| Type |
Description |
int |
Window height, 0 if the window does not exist |
Example
C
NatinyWindow win = natiny_window_create("My Game", 1280, 720);
int h = natiny_window_get_height(win);
printf("Height: %d\n", h);
Notes
- In
NATINY_SCALE_MODE_PIXELS, the result is the number of window pixels. In
NATINY_SCALE_MODE_STRETCH and NATINY_SCALE_MODE_HIDPI, it is the height
used by 2D drawing and mouse input.