Image.rotateBlitMask

From Spheriki

Jump to: navigation, search

Draws the image into the video buffer, except that the image is rotated anti-clockwise in radians, which have a range of 0-2*pi. (x,y) is the center of the blit. A color mask is then applied to tint the image.

Usage

Image.rotateBlitMask(x, y, radians, color)
  • x Number. The position on the X-axis to blit the image.
  • y Number. The position on the Y-axis to blit the image.
  • radians Number. The amount the image is rotated by.
  • color The color that is tinted onto the image.

Examples

var Image= LoadImage("Arrow.png");
var White= CreateColor(255,255,255);

function game()
{
Image.rotateBlitMask(100,100, 1, White)
FlipScreen()
while (!IsKeyPressed(KEY_Z));
}

This blits the image at (100,100) and then rotates 1 radian, and finally applies the White color mask over the top.

See also

Personal tools