Original Author Paul Laughton, 2011
Page 177
De Re BASIC!
All draw commands issued while in this mode draw directly into the bitmap. The objects drawn in this
mode are not placed into the display list. The object number returned by the draw commands while in
this mode is invalid and should not be used for any purpose including Gr.modify.
Note: Bitmaps loaded with the Gr.bitmap.load command cannot be changed with Gr.bitmap.drawinto.
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.drawinto.end
End the draw-into-bitmap mode.Subsequent draw commands will place the objects into the display list
for rendering on the screen. If you wish to display the drawn-into bitmap on the screen, issue a
Bitmap.draw command for that bitmap.
Paint Commands
Gr.paint.copy {{<src_nexp>}{, <dst_nexp>}}
Copy the Paint object at the source pointer <src_nexp> to the destination pointer <dst_next>.
Both parameters are optional. If you wish to specify a destination, you must include a comma, whether
or not you specify a source. If either parameter is omitted, or if its value is -1, the current Paint is used.
The Paint already at the destination pointer is replaced. If the destination is the current Paint, a newly-
created paint becomes the current Paint.
This command has four forms, depending on which parameters are present:
GR.PAINT.COPY
% Duplicate the current Paint
GR.PAINT.COPY m
% Copy Paint m to the current Paint
GR.PAINT.COPY , n
% Overwrite Paint n so it is the same as the current Paint
GR.PAINT.COPY m, n
% Overwrite Paint n so it is the same as Paint m
Gr.paint.get <object_ptr_nvar>
Gets a pointer (<object_ptr_nvar>) to the last created Paint object. For information about Paint objects,
see the section Graphics
Introduction
Paints, above.
This pointer can be used to change the Paint object associated with a draw object by means of the
Gr.modify command. The Gr.modify parameter is "paint".
If you want to modify any of the paint characteristics of an object then you will need to create a current
Paint object with those parameters changed. For example:
GR.COLOR 255,0,255,0,0
GR.TEXT.SIZE 20
GR.TEXT.ALIGN 2
GR.PAINT.GET the_paint
GR.MODIFY shot, "paint", the_paint
changes the current text size and alignment as well as the color.