|
From: Daniel J S. <dan...@ie...> - 2004-09-12 17:19:07
|
Ethan Merritt wrote:
>>I'm not aware
>>of what the groups ideas for "properties of a plotting style" are.
>>
>>
>
>typedef enum int {
>LINES, POINTSTYLE, LINESPOINTS, IMPULSES, .....
>} plot_style;
>
>typedef struct {
>int plot_style; /* The identifying number */
>TBOOLEAN has_points; /* replaces the PLOT_STYLE_HAS_POINT bitflag */
>TBOOLEAN has_fill; /* replaces the PLOT_STYLE_HAS_FILL bitflag */
>[.. more bitflags ..]
>int min_columns;
>int max_columns;
>int default_columns;
>[.. and so on ..]
>} t_plotstyle;
>
>extern struct t_plotstyle plotstyle[] =
>{ ... initialization array ... };
>
>
>Everywhere that explicitly tests against the definitions currently
>in gp_types.h gets modified to test against this structure instead.
>
>Old: If (<foo> & PLOT_STYLE_HAS_FILL) ...
>New: If (plotstyle[<foo>].has_fill) ...
>
Yes, makes sense. So that would get rid of the encoding of the
properties within the style enumeration itself. My opinion is that
would be good. That encoding of the properties within the style is kind
of creative but it harks back to the days of squeezing memory
consumption out of every bit you have available. In fact, yes, when I
created this table you raised question about, I specifically looked at
how I could encode that in the plot style number as well. I thought
that to be too much rocking the boat, and furthermore I believe the
enumeration would run out of bits.
Dan
|