DrawBitmap


DrawBitmap bitmap, cx, cy{, rot, scaleX, scaleY}

This command draws a bitmap on the current drawing surface. The bitmap parameter is an object variable which contains the bitmap to be drawn. The cx and cy parameters specify the coordinates of the drawing surface where the center of the bitmap is to be drawn. The rot (degrees to rotate the bitmap), scaleX and scaleY are all optional parameters.

If a you try to create a bitmap which is larger than the screen an error will occur.

If a SetScale command is in force, the bitmap will be scaled to the current screen in addition to the scaleX and scaleY parameters.

The Color command can be used to set the alpha (transparency) of the draw.


Example:


Graphics On
Color 40,40,40
CLS

bitmap = LoadBitmap("graphics/mypic.png")

DrawBitmap bitmap, ScreenX()/2, ScreenY()/2

Wait 10000






CreateBitmap


LoadBitmap


SaveBitmap


CopySurface


CopyBitmap


SetDrawingSurface


GetBitmapWidth()


GetBitmapHeight()


GetBitmapPixel()


GetBitmapPixelRGBA()






Become a Patron