This command allows you to use all the drawing commands on a bitmap instead of drawing directly to the screen. The parameter bitmap is the bitmap to be drawn on. If SetDrawingSurface Off is executed, then drawing will be done directly to the screen.
When a SetDrawingSurface command is executed the internal scale (set by SetScale) is reset to 1.0. So if you are using the SetScale command, you will always have to set the scale after executing a SetDrawingSurface command.
width = ScreenX()
height = ScreenY()
bitmap = CreateBitmap(width/4, height/4)
' Make the bitmap a green box with two diagonal lines.
ex = GetBitmapWidth(bitmap) - 1
ey = GetBitmapHeight(bitmap) - 1
DrawBitmap bitmap, width/2, height/2