background image
Original Author Paul Laughton, 2011
Page 176
De Re BASIC!
Gr.bitmap.save <bitmap_ptr_nvar>, <filename_sexp>{, <quality_nexp>}
Saves the specified bitmap to a file. The default path is "<pref base drive>/rfo-basic/data/".
The file will be saved as a JPEG file if the filename ends in ".jpg".
The file will be saved as a PNG file if the filename ends in anything else (including ".png").
Gr.bitmap.draw <object_ptr_nvar>, <bitmap_ptr_nexp>, x , y
Creates a graphical object that contains a bitmap and inserts the object into the Object List. The bitmap
is specified by the bitmap pointer <bitmap_ptr_nexp>. The bitmap will be drawn with its upper left
corner at the provided (x,y) coordinates. The command returns the Object List object number of the
graphical object in the <object_ptr_nvar> variable. This object will not be visible until the Gr.render
command is called.
The alpha value of the latest Gr.color will determine the transparency of the bitmap.
The Gr.modify parameters for Gr.bitmap.draw are "bitmap", "x" and "y".
Gr.get.bmpixel <bitmap_ptr_nvar>, x, y, alpha, red, green, blue
Return the color data for the pixel of the specified bitmap at the specified x, y coordinate. The x and y
values must not exceed the length or width of the bitmap.
Gr.bitmap.fill <bitmap_ptr_nexp>, <x_nexp>, <y_nexp>
Change all of the points in an area of a bitmap to the current drawing color. The bitmap pointer
parameter <bitmap_ptr_nexp> must specify an existing bitmap. The x and y parameters <x_nexp> and
<y_nexp> must specify a point (x,y) in the bitmap. The area to color is a set of connected pixels all the
same color. The area may be any shape, and the point (x,y) may be any point in the area.
This command reads actual bitmap pixel colors, so it is affected by the antialiasing setting. If antialiasing
is on, the pixels at the edge of the colored area may not be re-colored correctly.
Gr.bitmap.drawinto.start <bitmap_ptr_nexp>
Put BASIC! into the draw-into-bitmap mode.