Sprite.getTextureTrim() - Mtax-Development/GML-OOP GitHub Wiki
Name |
Type |
Optional |
frame? |
{int} |
Yes |
offsetFromCenterScale? |
{Scale} |
Yes |
{Vector2|Vector4} | On error: {undefined}
Return the number of fully transparent pixels removed from each side of the specified frame during compilation, which occurs if this Sprite is in a texture group with automatic cropping enabled. The result will be returned in a Vector4, unless a Scale was specified, in which case an offset from center of this Sprite will be returned in a Vector2, representing offset of pixels remaining after cropping, multiplied by that specified Scale.