CopyBitmap


bitmap2 = CopyBitmap(bitmap1,{x1,y1,x2,y2})

This function copies a rectangle from a specified bitmap. A new bitmap is returned which is a copy of the specified rectangle. If the coordinates of the rectangle are omitted the entire bitmap is copied. The value returned is an object variable that contains the bitmap and can be used in other drawing commands.


Example:


Graphics On
Color 40,40,40
CLS

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

bitmap2 = CopyBitmap(bitmap1)

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

Wait 10000






CreateBitmap


LoadBitmap


SaveBitmap


DrawBitmap


CopySurface


SetDrawingSurface


GetBitmapWidth()


GetBitmapHeight()


GetBitmapPixel()


GetBitmapPixelRGBA()






Become a Patron