drawable= drawable_object_name sets the drawable instance variable.
drawable? returns the value of the drawable instance variable on the argument stack.
dump:filename xwindow_instance dumps the pixmap to an xwd (xwindow dump) file named using filename. The xwindow instance is used to access colormap and visual information.
id=pixmap_pointer sets the id of the pixmap. This method has the side effect of setting the width, height and depth also.
read_pixmap_file: filename, restore: filename read the pixmap file and create the pixmap from the data. The format of the file is the same as the format for xwd files.
This message accepts an optional second and third arguments (note: you must supply both!) which is the name of an xcolormap instance and the name of an xvisual instance. If you supply these arguments, a colormap and visual will be created and the ids of these objects will be set. Pixels will be allocated in this colormap for the pixmap.
If you do not supply these arguments, pixels will be allocated in the default colormap. Since the default colormap is shared by other resources, all
colors may not be available, but the closest matches will be used instead.
write_pixmap_file:filename xwindow_instance is an alias for the dump: message.
xshared_cell new: red_cell color: red; xshared_cell new: white_cell color: white; xshared_cell new: blue_cell color: blue; xshared_cell new: green_cell color: green; xshared_cell new: yellow_cell color: yellow;
xgc new: white_gc foreground= [white_cell pixel?] background= [white_cell pixel?] create! ; xgc new: blue_gc foreground= [blue_cell pixel?] background= [white_cell pixel?] create! ; xgc new: yellow_gc foreground= [yellow_cell pixel?] background= [white_cell pixel?] create! ;
xpixmap new: apixmap width= 250 height= 22 depth= 8 create! gc= white_gc -- draw in background of pixmap... fill_rectangle: (0, 0, 250, 22) gc= yellow_gc -- draw a smiley face in the pixmap fill_arc: (230, 5, 15, 15, 0, 360) gc= blue_gc draw_arc: (229, 4, 17, 17, 0, 360) fill_arc: (235, 7, 3, 4, 0, 360) fill_arc: (240, 7, 3, 4, 0, 360) draw_arc: (233, 10, 10, 6, 180, 180) ;
Please send comments and suggestions to
its-documentation@rpi.edu