Sprite.getUV() - Mtax-Development/GML-OOP GitHub Wiki

Arguments

Name
Type
Optional
frame?
{int|int[]|all}
Yes
full?
Yes

Returns

{Vector4|real[8]|[]} | On error: {undefined}

Description

Return the UV coordinates for the location of the specified frames of this Sprite on its texture page. They will be returned as an Vector4 if the full information is not specified. Otherwise, an array with 8 elements will be returned to include information about fully transparent pixels excluded from its texture page during compiling. These entries will be nested if information for multiple frames was specified. The data of full information is represented at following array positions:
  • array[0]: UV left {real}
  • array[1]: UV top {real}
  • array[2]: UV right {real}
  • array[3]: UV bottom {real}
  • array[4]: pixels trimmed from left edge {int}
  • array[5]: pixels trimmed from top edge {int}
  • array[6]: x percentage of pixels remaining after trimming {real}
  • array[7]: y percentage of pixels remaining after trimming {real}

⚠️ **GitHub.com Fallback** ⚠️