GM: image xscale

From GMpedia.org Wiki

Jump to: navigation, search

xscale

Type: variable
Globalism: Local
Editable: Yes
The correct title of this article is image_xscale. It appears incorrectly here because of technical restrictions.

The local variable xscale indicates the factor by which the image is scaled horizontally.

[edit] Examples

xscale=2
the width of the image will be doubled (and of course it is stretched to fit that size)
xscale=1/2
the width of the image will be halved.

[edit] Explanation

Suppose a sprite has a width of 24 pixels. When xscale is set to 2, the sprite's width will be 48 pixels.

Note that this variable does not change the sprite resource.

[edit] See Also

Personal tools