Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: playerzero on May 24, 2015, 09:41:26 PM
-
Pretty much as the title asks.
I've declared an artwork (wheel art, in this case), and the images are not all the same size, as per what the scraper has pulled.
I need a way to read the size of the images before I manipulate them.
I've tried something like zzzzz = wheelart.height, but it always returns zero
-
width and height are the objects set width and height - 0 means it is unscaled.
You want:
texture_width - Get the width of the image texture (in pixels). *** see Notes.
texture_height - Get the height of the image texture (in pixels). *** see Notes.
But you need to look at the notes here about how to use it correctly, as they aren't available immediately:
https://github.com/mickelson/attract/blob/v1.5.0/Layouts.md#ImageNotes