|
From: Ethan M. <merritt@u.washington.edu> - 2004-09-12 17:07:06
|
On Sunday 12 September 2004 10:15 am, Daniel J Sebald wrote:
> Hans-Bernhard Broeker wrote:
> >
> > Better yet, Someone[^TM] take this as motivation to finally create the
> > long overdue "properties of a plotting style" data structure.
> 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) ...
Current code will have to change in lots of places. But you don't have
to worry about missing any of them, because if you remove the current
definitions in gp_types.h the compiler will let you know where they
all are :-)
|