Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Images and Sprites [5/8]

As mentioned on the previous page, the member function .draw from type sprite can have 1, 2 or 3 arguments.

The second argument is scale factor, used for zooming in and out. This argument is of type num.

The third argument is the angle in radians, used for rotating the image. This argument is of type num.

Since the y-coordinate points downwards, the rotation is in the clockwise direction when the angle has a positive value.

Loading...