From: Maurice L. <mj...@ga...> - 2002-02-06 02:13:48
|
Alan W. Irwin writes: > Maurice, could you please find a way to display the entire cmap0 colour > palette GUI? Right now, the 16 default colour buttons overlap at the end, > and I believe one of them is entirely covered up. They all appear just fine on my display. :) But I have a feeling I'll see what you mean when I try it on my notebook at 800x600 resolution. What resolution are you using? In any case, these kinds of sizing considerations will all be addressed in the revamp of the resources handling that I have brewing. I don't know if it will be coming any time real soon b/c I need to concentrate on other things for the next few weeks, but I'll try to fit it in as best I can. > Also, sure as anything > you will have some user wanting to use more or less than 16 cmap0 colours so > would you be willing to put in a user-selectable number of colours? Perhaps > the solution is a slider which lets you look at various parts of cmap0 if > there are more than say 12 colours. > > Similarly, I think the number of cmap1 control points should be user > selectable with a slider for display so the number of control points could > be much greater than 16 if the user desired. GUI control of these would be nice but I doubt I'll ever bother because there's a simple alternative method that works just fine -- edit the palette file. I recommend taking a look at each of the *.pal files. In fact, you should load each in and play with them. On x16c, edit the cmap0 palette to see that user settings are taken into account. The cmap0 palette file is of the form: <n> <color1> ... <colorn> where <n> is the number of colors, while cmap1 palettes are of the form: <n> <color1> <pos1> [<reverse>] ... <colorn> <posn> [<reverse>] where <n> is the number of control points. The positions here are given as integers from 0-100.. divide by 100 to get the ordinary position in cmap1 space. > For example, the gray scale in > example 8 is done with 256 cmap1 control points. It would be nice to be > able to display and manipulate that palette or any colour image palette > (with typically 256 colours) that you might run into when working with > images. Ugh.. I didn't realize that's what x08c was doing. I don't really like the plscmap1() way of initializing the palette. It was my first implementation and I didn't see the harm in keeping it in for odd situations. Definitely plscmap1l() with a small number of control points is to be preferred. In this case, the explicit initialization using 256 colors can be replaced with a cmap1 initialization that uses only 2 control points, which on my display looks the same. I'll probably go ahead and make the change to x08c to do it this way. > Finally, I noticed when checking example 8 that no attempt (as far as I > could tell) was made to display the working palette. Instead when the cmap1 > palette was pressed, immediately the gray scale was turned into the default > colour scheme. Right, this is a side effect of the brute force initialization of the color map. It will go away after I change x08c to use plscmap1l() instead. > ... > So here is the wishlist summary: > > (1) User selectable number of colours for cmap0 > > (2) User selectable number of control points for cmap1 > > (3) If GUI would be too large use a slider to display parts of it > > (4) cmap1 colour palette displays the actual colour map when it starts > and not the default colour map. > > (5) Make sure actual colour map is also used for cmap0 palette when it starts > (I haven't played with it so I don't know the score there.) > > I will settle for (4) with number of control points fixed at 6, but I > hope you do the rest as well. As per the above notes, these are all handled by existing functionality except for sizing concerns, which I'll address over the coming weeks/months. -- Maurice LeBrun mj...@ga... |