CopySurface


bitmap = CopySurface({x1,y1,x2,y2})

This function copies a rectangle from the current drawing surface. By default the current drawing surface will be the screen. If the coordinates of the rectangle are omitted the entire drawing surface 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

ex = ScreenX()-1
ey = ScreenY()-1

' Draw something on the screen.
Color 100,0,0
Rect 0,0,ex,ey
Line 0,0,ex,ey
Line ex,0,0,ey

' Capture the screen to a bitmap.
bitmap = CopySurface()

' Save the screen capture to a file.
SaveBitmap bitmap, "ScreenCapture.png"

Wait 10000






CreateBitmap


LoadBitmap


SaveBitmap


DrawBitmap


CopyBitmap


SetDrawingSurface


GetBitmapWidth()


GetBitmapHeight()


GetBitmapPixel()


GetBitmapPixelRGBA()






Become a Patron