surface_get_height

Finds the pixel height of a surface.

Syntax:

GML Code Example

surface_get_height(surface_id);


Argument Description
surface_id The ID of the surface to get the height of.


Returns: Real


Description

This function simply returns the height, in pixels, of the indexed surface.

NOTE: When working with surfaces there is the possibility that they can cease to exist at any time due to them being stored in texture memory. You should ALWAYS check that a surface exists using surface_exists before referencing them directly. For further information see Surfaces.


Example:

GML Code Example

sh = surface_get_height(surf);

The above code will store the height of the surface indexed in the variable "surf" in the variable "sh".





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here