- •Display Lists
- •Graphics Preparatory Commands gr.Open alpha, red, green, blue
- •Gr.Color alpha, red, green, blue, fill
- •Gr.Orientation mode
- •Gr.Screen width, height
- •Gr.Close
- •Gr.Front flag
- •Graphical Object Creation Commands gr.Line Object_number, x1, y1, x2, y2
- •Gr.Rect Object_number, left, top, right, bottom
- •Gr.Oval Object_number, left, top, right, bottom
- •Gr.Arc Object_number, left, top, right, bottom, start_angle, sweep_angle, fill_mode
- •Gr.Circle Object_number, X, y, radius
- •Bitmap Commands
Bitmap Commands
gr.bitmap.load bitmap_ptr, File_name$
Creates a bitmap object from the file specified in the File_name$ string. Return a pointer to the created bitmap object for use with the gr.bitmap.scale, gr.bitmap.draw and gr.modify commands. Bitmap image files must be located in the "/sdcard/rfo-basic/data/" directory. Thus is true even if the Use SD Card setting in unchecked. Note: You can may include path fields in the file name. For example, "../../Cougar.jpg" would cause BASIC! to look for Cougar.jpg in the top level directory if the SD Card. ( "/sdcard/Cougar.jpg") "images/Kitty.png" would cause BASIC! to look in the images(d) sub-directory of the "/sdcard/rfo-basic/data/" ( "/sdcard/rfo-basic/data/images/Kitty.png")
gr.bitmap.size bitmap_ptr, Width, Height
Return the pixel width and height of the bitmap pointed to by bitmap_ptr into the Width and Height variables.
gr.bitmap.scale dest_ptr, src_ptr, Width, Height
Scales a previously loaded bitmap to the specified Width and Height. The src_ptr is the bitmap pointer returned by the gr.bitmap.load command. The dest_ptr is the bitmap pointer to be used with the gr.bitmap.draw and gr.modify commands.
gr.bitmap.delete bitmap_ptr
Deletes a previously loaded or scaled bitmap. The bitmap's memory is returned to the system.
gr.bitmap.draw Object_ptr, bitmap_ptr, x , w
Creates and inserts a bitmap object into the Display List. The bitmap will be drawn with its upper left corner at the provided (x,y) coordinates. Returns the Display List object number for this bitmap. This object will not be visible until the "gr.render" command is called. The "gr.modify" parameters for for gr.bitmap.draw are "bitmap", "x" and "y".
Rotate Commands
gr.rotate.start angle, x, y
Any objects drawn between the gr.rotate.start and gr.rotate.end will be rotated at the specified angle around the specified (x,y) point. gr.rotate.start must be eventually followed by gr.rotate.end or you will not get the expected results.
gr.rotate.end
Ends the rotated drawing of objects. Objects created after this command will not be rotated.
Modify Command
gr.modify Object_number, parameter_name$, {value|value$} The object in the display list with the specified Object_number will have its parameter_name$ changed to {value|value$). The parameters for each object are given with descriptions of the commands. As and examples, suppose a bitmap object was created with "gr.bitmap.draw BM_ptr, galaxy_ptr, 400, 120". Executing "gr.modify BM_Ptr "x", 420" would move the bitmap from x =400 to x = 420. Executing "gr.modify BM_ptr, "y", 200 would move the bitmap from y = 120 to y = 200. Executing "gr.modify BM_ptr, "bitmap", Saturn_ptr would change the bitmap of an image of a (preloaded) Galaxy to the the image of a (preloaded) Saturn. The parameters that you supply for a given object are not verified for correctness for the parameter name spelling. The parameter are also not verified for their appropriateness to the specified object. If you are not getting the expected results check the parameter for object appropriateness and spelling. Giving an object and incorrect parameter will not will have no effect upon that object. The results of gr.modify commands will not be observed until a gr.render command is given.
