[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to do graphics.
- To: real-self-interest
- Subject: Re: How to do graphics.
- From: bay (Bay-Wei Chang)
- Date: Thu, 6 Oct 94 13:14:05 PDT
- Cc: slengy@calcomp.com
> I can now make windows, draw graphics, but I cannot assign colors.
> For a line I do: bitmap line: 0@0 To: 100@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
code.
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.
Bay