display is the name of the associated xdisplay object.
number of colors is the number of cells to allocate.
pixel_number is the current cell. The range of this value is 1 <= pixel_number <= number of colors.
pixels is a list of pixel values for the allocated cells. All values are initialized to black.
screen is the name of an xscreen instance. If no screen is specified, the default screen of the X display is used. The screen is used during allocation, so make sure to set this instance variable before you allocate the cells.
xshared_cell is a private instance variable.
color: colorname stores the specified color into the current cell. For a full list of possible colornames, please
refer to the Xlib manuals.
colormap= colormap_object_name sets the colormap instance variable.
colormap? returns the value of the colormap instance variable on the argument stack.
display= display_object_name sets the display instance variable.
display? returns the value of the display instance variable on the argument stack.
free_cells! attempts to free the cells.
number_of_colors= value sets the number_of_colors instance variable.
number_of_colors? returns the value of the number_of_colors instance variable on the argument stack.
pixel? returns the current pixel.
@ pixel_number, pixel_number= pixel_number sets the pixel_number instance variable.
pixel? returns the pixel_number instance variable.
rgb: rgb stores the rgb into the current cell. The range for the rgb values is 0 <= rgb_value <= 1. Note that this is different from Xlib where rgb values must be in the range 0 <= Xlib_rgb_value <= 65535.
rgb? returns the rgb of the current cell.
screen? retreives the screen instance variable.
screen= sets the screen instance variable. Note: timing is important. You must set the screen before allocation.
xshared_cells new: the_cells
number_of_colors= 2
@1 color: red
@2 rgb: (0, 1, 0) ;
red_pixel = [the_cells @1 pixel?]; green_pixel = [the_cells @2 pixel?];
Please send comments and suggestions to
its-documentation@rpi.edu