Original Author Paul Laughton, 2011
Page 175
De Re BASIC!
would cause BASIC! to look in the images(d) sub-directory of the "/sdcard/rfo-basic/data/"
("/sdcard/rfo-basic/data/images/Kitty.png").
Note: Bitmaps loaded with this command cannot be changed with the Gr.bitmap.drawinto command.
To draw into an image loaded from a file, first create an empty bitmap then draw the loaded bitmap into
the empty bitmap.
Gr.bitmap.size <bitmap_ptr_nexp>, width, height
Return the pixel width and height of the bitmap pointed to by <bitmap_ptr_nexp> into the width and
height variables.
Gr.bitmap.scale <new_bitmap_ptr_nvar>, <bitmap_ptr_nexp>, width, height {,
<smoothing_lexp>}
Scales a previously loaded bitmap (<bitmap_ptr_nexp>) to the specified width and height and creates a
new bitmap <new_bitmap_ptr_nvar>. The old bitmap still exists; it is not deleted. If there is not enough
memory available to create the new bitmap, the returned bitmap pointer is -1. Call GETERROR$() for
information about the failure.
Negative values for width and height will cause the image to be flipped left to right or upside down.
Neither the width value nor the height value may be zero.
Use the optional smoothing logical expression (<smoothing_lexp>) to request that the scaled image not
be smoothed. If the expression is false (zero) then the image will not be smoothed. If the optional
parameter is true (not zero) or not specified then the image will be smoothed.
Gr.bitmap.delete <bitmap_ptr_nexp>
Deletes an existing bitmap. The bitmap's memory is returned to the system.
This does not destroy any graphical object that points to the bitmap. If you do not Gr.hide such objects,
or remove them from the Display List, you will get a run-time error from the next Gr.render command.
Gr.bitmap.crop <new_bitmap_ptr_nvar>, <source_bitmap_ptr_nexp>, <x_nexp>,
<y_nexp>, <width_nexp>, <height_nexp>
Creates a cropped copy of an existing source bitmap specified by <source_bitmap_ptr_nexp>. The
source bitmap is unaffected; a rectangular section is copied into a new bitmap. A pointer to the new
bitmap is returned in <new_bitmap_nvar>. If there is not enough memory available to create the new
bitmap, the returned bitmap pointer is -1. Call GETERROR$() for information about the failure.
The <x_nexp>, <y_nexp> pair specifies the point within the source bitmap that the crop is to start at.
The <width_nexp>, <height_nexp> pair defines the size of the rectangular region to crop.