How to do graphics.

Bay-Wei Chang bay
Thu Oct 6 20:14:05 UTC 1994

> I can now make windows, draw graphics, but I cannot assign colors.
> For a line I do:  bitmap line: 0 at 0 To: 100 at 100 Color: color.

The color argument must be a colormapEntry, and the only slot
respected is the index slot.  That is, this method passes the
index of the color in the current colormap to the xlib drawing

To get your own colors you have 2 choices:

1. Allocate your own colormap, fill it with your own colors.
   Install the colormap.

2. Use the default colormap.  Allocate a new color.  Use the
   index that xlib gives back to you.

The current release's color handling unfortunately does not
insulate you from dealing with colormaps and indicies.


More information about the Self-interest mailing list