home *** CD-ROM | disk | FTP | other *** search
- /* cat > headers/plot.h << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* plot.h: header for plot.c file */
- /* plot.c includes routines that do */
- /* quantitative analysis of images, scaling */
- /* information set, line graph plotting, */
- /* laserwriter hard copy. 2-D, 3-D and */
- /* laserwriter related routines added. */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- #define plot_h 1
-
- #include "all.h"
- #include "icons.h"
- #include "newext.h"
-
- static Panel_item stats_xmin_obj,stats_xmax_obj;
- static Panel_item stats_ymin_obj,stats_ymax_obj;
- static Panel_item stats_gmin_obj,stats_gmax_obj;
- static Panel_item scale_but;
-
- static FILE *pf = NULL;
-
- static int save_gmode;
- static int flip_flop;
-
- static char *jerk;
-
- static bool print_true = FALSE;
-
- static Frame create_stats();
- static void done_plot();
- static void dump_plot();
- static void draw_proc();
- static void get_scaling();
- static void hide_stats();
- static Notify_value my_destroy_interposer();
- static Notify_value my_notice_interposer();
- static void pcan_controller();
-
- /* EOF */
- /* cat > src+obj/plot/clear_plot.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* clear_plot: clear the plot */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- void
- clear_plot (item, event)
- Panel_item item;
- Event *event;
- {
- last_dir = 0;
- last_xscale = last_yscale = (float) 0;
- pw_writebackground ((Pixwin *) canvas_pixwin (pcanvas), 0, 0,
- (int) window_get (pcanvas, CANVAS_WIDTH),
- (int) window_get (pcanvas, CANVAS_HEIGHT), PIX_CLR);
- if (pf != NULL)
- {
- rewind (pf);
- ftruncate (fileno (pf), 0);
- }
- pwInit ();
- }
- /* EOF */
- /* cat > src+obj/plot/create_graph_menu.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* create_graph_menu: create menu for 'GRAPH' */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- create_graph_menu ()
- {
- graph_menu = menu_create (
- MENU_FONT, font_menu,
- MENU_STRINGS, "XY", "Contour", "3D", 0,
- MENU_NOTIFY_PROC, plot_action,
- 0);
- }
- /* EOF */
- /* cat > src+obj/plot/create_plot_window.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* create_plot_window: create plot window */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- create_plot_window ()
- {
- Panel panel;
- int top, left, width, height, l, t, i;
-
- left = (int) window_get (base, WIN_X);
- top = (int) window_get (base, WIN_Y);
- width = (int) window_get (base, WIN_WIDTH);
- height = (int) window_get (base, WIN_HEIGHT);
- if ((l = left + width / 2) + 650 > 1150)
- l = 1150 - 650;
- if ((t = top + height / 2) - 600 < 0)
- t = 0;
-
- plot_window = window_create (0, FRAME,
- FRAME_ICON, &plot_icon,
- FRAME_SHOW_LABEL, TRUE,
- FRAME_LABEL, "Graph_window, ImageTool",
- FRAME_INHERIT_COLORS, TRUE,
- WIN_WIDTH, 650,
- WIN_HEIGHT, 600,
- WIN_X, 1150 - 650,
- WIN_Y, 900 - 600,
- WIN_SHOW, FALSE,
- 0);
- panel = window_create (plot_window, PANEL, 0);
- title_item = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (1),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_VALUE_STORED_LENGTH, MAXNAMELEN - 1,
- PANEL_VALUE_DISPLAY_LENGTH, 30,
- PANEL_LABEL_STRING, "Title:",
- PANEL_LABEL_BOLD, TRUE,
- 0);
- level_item = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (1),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_VALUE_STORED_LENGTH, 256,
- PANEL_VALUE_DISPLAY_LENGTH, 30,
- PANEL_LABEL_STRING, "Contour levels:",
- PANEL_LABEL_BOLD, TRUE,
- 0);
- yaw_item = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (1),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_VALUE_STORED_LENGTH, 4,
- PANEL_VALUE_DISPLAY_LENGTH, 4,
- PANEL_LABEL_STRING, "Yaw:",
- PANEL_VALUE, "10",
- PANEL_SHOW_ITEM, FALSE,
- PANEL_LABEL_BOLD, TRUE,
- 0);
- pitch_item = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (13),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_VALUE_STORED_LENGTH, 4,
- PANEL_VALUE_DISPLAY_LENGTH, 4,
- PANEL_LABEL_STRING, "Pitch:",
- PANEL_VALUE, "40",
- PANEL_SHOW_ITEM, FALSE,
- PANEL_LABEL_BOLD, TRUE,
- 0);
- roll_item = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (27),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_VALUE_STORED_LENGTH, 4,
- PANEL_VALUE_DISPLAY_LENGTH, 4,
- PANEL_LABEL_STRING, "Roll:",
- PANEL_VALUE, "5",
- PANEL_SHOW_ITEM, FALSE,
- PANEL_LABEL_BOLD, TRUE,
- 0);
- scale_but = panel_create_item (panel, PANEL_BUTTON,
- PANEL_ITEM_X, ATTR_COL (40),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_LABEL_IMAGE, panel_button_image (panel, "Scale", 5, 0),
- PANEL_LABEL_BOLD, TRUE,
- PANEL_NOTIFY_PROC, show_stats,
- 0);
- panel_create_item (panel, PANEL_BUTTON,
- PANEL_ITEM_X, ATTR_COL (48),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_LABEL_IMAGE, panel_button_image (panel, "Draw", 5, 0),
- PANEL_LABEL_BOLD, TRUE,
- PANEL_NOTIFY_PROC, draw_proc,
- 0);
- panel_create_item (panel, PANEL_BUTTON,
- PANEL_ITEM_X, ATTR_COL (56),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_LABEL_IMAGE, panel_button_image (panel, "Clear", 5, 0),
- PANEL_LABEL_BOLD, TRUE,
- PANEL_NOTIFY_PROC, clear_plot,
- 0);
- panel_create_item (panel, PANEL_BUTTON,
- PANEL_ITEM_X, ATTR_COL (64),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_LABEL_IMAGE, panel_button_image (panel, "Print", 5, 0),
- PANEL_LABEL_BOLD, TRUE,
- PANEL_NOTIFY_PROC, dump_plot,
- 0);
- panel_create_item (panel, PANEL_BUTTON,
- PANEL_ITEM_X, ATTR_COL (72),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_LABEL_IMAGE, panel_button_image (panel, "Done", 5, 0),
- PANEL_LABEL_BOLD, TRUE,
- PANEL_NOTIFY_PROC, done_plot,
- 0);
- window_fit_height (panel);
-
- pcanvas = window_create (plot_window, CANVAS,
- CANVAS_AUTO_SHRINK, FALSE,
- CANVAS_FIXED_IMAGE, TRUE,
- CANVAS_RETAINED, TRUE,
- CANVAS_WIDTH, 600,
- CANVAS_HEIGHT, 600,
- WIN_BELOW, panel,
- WIN_X, 0,
- WIN_EVENT_PROC, pcan_controller,
- 0);
- window_fit (pcanvas);
- window_fit (plot_window);
-
- /* set color map same as imagetool window */
- init_same_colormap ((Pixwin *) window_get (plot_window, WIN_PIXWIN));
- init_same_colormap ((Pixwin *) window_get (panel, WIN_PIXWIN));
- init_same_colormap ((Pixwin *) canvas_pixwin (pcanvas));
-
- /* enable my own destroy and event interposer */
- (void) notify_interpose_destroy_func (plot_window, my_destroy_interposer);
- (void) notify_interpose_event_func (plot_window, my_notice_interposer,
- NOTIFY_SAFE);
- }
- /* EOF */
- /* cat > src+obj/plot/create_stats.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* create_stats: (static) create stats */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- static Frame
- create_stats ()
- {
- Panel panel;
- int left, top, width, height, w, h;
-
- scale_box = window_create (base, FRAME,
- FRAME_SHOW_LABEL, FALSE,
- FRAME_INHERIT_COLORS, TRUE,
- WIN_SHOW, FALSE,
- 0);
- panel = window_create (scale_box, PANEL, 0);
- panel_create_item (panel, PANEL_MESSAGE,
- PANEL_ITEM_X, ATTR_COL (1),
- PANEL_ITEM_Y, ATTR_ROW (0),
- PANEL_LABEL_STRING, "Please enter scaling information: ",
- PANEL_LABEL_BOLD, TRUE,
- 0);
- stats_xmin_obj = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (4),
- PANEL_ITEM_Y, ATTR_ROW (1),
- PANEL_VALUE_STORED_LENGTH, 10,
- PANEL_VALUE_DISPLAY_LENGTH, 10,
- PANEL_LABEL_STRING, "Xmin: ",
- PANEL_LABEL_BOLD, FALSE,
- 0);
- stats_xmax_obj = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (24),
- PANEL_ITEM_Y, ATTR_ROW (1),
- PANEL_VALUE_STORED_LENGTH, 10,
- PANEL_VALUE_DISPLAY_LENGTH, 10,
- PANEL_LABEL_STRING, "Xmax: ",
- PANEL_LABEL_BOLD, FALSE,
- 0);
- stats_ymin_obj = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (4),
- PANEL_ITEM_Y, ATTR_ROW (2),
- PANEL_VALUE_STORED_LENGTH, 10,
- PANEL_VALUE_DISPLAY_LENGTH, 10,
- PANEL_LABEL_STRING, "Ymin: ",
- PANEL_LABEL_BOLD, FALSE,
- 0);
- stats_ymax_obj = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (24),
- PANEL_ITEM_Y, ATTR_ROW (2),
- PANEL_VALUE_STORED_LENGTH, 10,
- PANEL_VALUE_DISPLAY_LENGTH, 10,
- PANEL_LABEL_STRING, "Ymax: ",
- PANEL_LABEL_BOLD, FALSE,
- 0);
- stats_gmin_obj = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (4),
- PANEL_ITEM_Y, ATTR_ROW (3),
- PANEL_VALUE_STORED_LENGTH, 10,
- PANEL_VALUE_DISPLAY_LENGTH, 10,
- PANEL_LABEL_STRING, "Gmin: ",
- PANEL_LABEL_BOLD, FALSE,
- 0);
- stats_gmax_obj = panel_create_item (panel, PANEL_TEXT,
- PANEL_ITEM_X, ATTR_COL (24),
- PANEL_ITEM_Y, ATTR_ROW (3),
- PANEL_VALUE_STORED_LENGTH, 10,
- PANEL_VALUE_DISPLAY_LENGTH, 10,
- PANEL_LABEL_STRING, "Gmax: ",
- PANEL_LABEL_BOLD, FALSE,
- 0);
- panel_create_item (panel, PANEL_CYCLE,
- PANEL_ITEM_X, ATTR_COL (2),
- PANEL_ITEM_Y, ATTR_ROW (4),
- PANEL_LABEL_STRING, "Scaling type: ",
- PANEL_CHOICE_STRINGS, "Logarithmic", "Linear", 0,
- PANEL_VALUE, 1,
- PANEL_LABEL_BOLD, FALSE,
- PANEL_NOTIFY_PROC, get_scaling,
- 0);
- panel_create_item (panel, PANEL_BUTTON,
- PANEL_ITEM_X, ATTR_COL (38),
- PANEL_ITEM_Y, ATTR_ROW (4),
- PANEL_LABEL_IMAGE, panel_button_image (panel, "Ok", 3, NULL),
- PANEL_CLIENT_DATA, 1,
- PANEL_NOTIFY_PROC, hide_stats,
- 0);
- panel_create_item (panel, PANEL_BUTTON,
- PANEL_ITEM_X, ATTR_COL (44),
- PANEL_ITEM_Y, ATTR_ROW (4),
- PANEL_LABEL_IMAGE, panel_button_image (panel, "Cancel", 5, NULL),
- PANEL_CLIENT_DATA, 0,
- PANEL_NOTIFY_PROC, hide_stats,
- 0);
- window_fit (panel);
- window_fit (scale_box);
-
- left = (int) window_get (base, WIN_X);
- top = (int) window_get (base, WIN_Y);
- width = (int) window_get (base, WIN_WIDTH);
- height = (int) window_get (base, WIN_HEIGHT);
- w = (int) window_get (scale_box, WIN_WIDTH);
- h = (int) window_get (scale_box, WIN_HEIGHT);
- window_set (scale_box,
- WIN_X, left + width / 2 - w / 2,
- WIN_Y, top + height / 2 - h / 2,
- 0);
-
- /* set color of plot window same as imagetool window */
- init_same_colormap ((Pixwin *) window_get (panel, WIN_PIXWIN));
- init_same_colormap ((Pixwin *) window_get (scale_box, WIN_PIXWIN));
-
- return scale_box;
- }
- /* EOF */
- /* cat > src+obj/plot/done_plot.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* done_plot: (static) finished plotting */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
- static void
- done_plot (item, event)
- Panel_item item;
- Event *event;
- {
- window_set (plot_window, FRAME_NO_CONFIRM, TRUE, 0);
- window_destroy (plot_window);
- }
- /* EOF */
- /* cat > src+obj/plot/draw_proc.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* draw_proc: (static) draw procedure */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- static void
- draw_proc (item, event)
- Panel_item item;
- Event *event;
- {
- switch (graph_mode)
- {
- case PLOT_XY:
- plot_linear ();
- break;
- case PLOT_CON:
- plot_twod ();
- break;
- case PLOT_3D:
- plot_threed ();
- break;
- }
- }
- /* EOF */
- /* cat > src+obj/plot/dump_plot.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* dump_plot: (static) simple plot */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- static void
- dump_plot (item, event)
- Panel_item item;
- Event *event;
- {
- if (strlen (printer) == 0)
- set_printer ();
-
- if (!print_true)
- {
- print_true = TRUE;
- draw_proc ();
- print_true = FALSE;
- }
-
- if (flip_flop)
- {
- fprintf (pf, "stroke\n");
- flip_flop = 0;
- }
- fprintf (pf, "showpage\n");
- fflush (pf);
-
- if (strlen (printer) == 0)
- sprintf (msgstr, "lpr %s\n", jerk);
- else
- sprintf (msgstr, "lpr -P%s %s\n", printer, jerk);
- tty_write (msgstr);
- /* ttysw_input(ttysw,msgstr,strlen(msgstr)); */
-
- if (print_true)
- fseek (pf, -9, 1); /* chop off "showpage\n" */
- }
- /* EOF */
- /* cat > src+obj/plot/erase_line.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* erase_line: erase line */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- erase_line ()
- {
- if (line_drawn)
- {
- /* erase line */
- pw_vector (pw, line_rec.x1, line_rec.y1, line_rec.x2, line_rec.y2,
- PIX_NOT (PIX_DST), 255);
- line_drawn = 0;
- }
- }
- /* EOF */
- /* cat > src+obj/plot/erase_square.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* erase_square: erase square */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- erase_square ()
- {
- if (square_drawn)
- {
- /* erase square */
- draw_square (&square);
- square_drawn = 0;
- }
- }
- /* EOF */
- /* cat > src+obj/plot/get_eqn.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* get_eqn: get equation */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- get_eqn (x1, y1, x2, y2, a, b)
- float *a, *b;
- {
- float x, y;
-
- x = (float) (x2 - x1);
- y = (float) (y2 - y1);
- *a = y / x;
- *b = (float) (y1 * x2 - y2 * x1) / x;
- }
- /* EOF */
- /* cat > src+obj/plot/get_gvalue.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* get_gvalue: get g value */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- float
- get_gvalue (cindex)
- {
- double gg;
- float g = stats_gmax - stats_gmin;
- float result;
-
- if (linear_scaling)
- result = g * cindex / 255.0 + stats_gmin;
- else
- {
- gg = log10 ((double) stats_gmax) - log10 ((double) stats_gmin);
- result = (float) (gg * ((double) cindex / 255) + log10 ((double) stats_gmin));
- }
- return (result);
- }
- /* EOF */
- /* cat > src+obj/plot/get_matrix.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* get_matrix: get matrix */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- get_matrix (data, xdim, ydim, xpos, ypos)
- Point *data;
- int xdim, ydim, xpos, ypos;
- {
- Point *pt = data;
- struct pixrect *pr;
- struct mpr_data *mpr;
- int i, j, tmp, npad;
- unsigned char *s;
-
- if ((pr = mem_create (xdim, ydim, 8)) == NULL)
- {
- msg_write ("Error: Not enough memory to create copy of canvas for building plot data .");
- return (-1);
- }
- pw_read (pr, 0, 0, xdim, ydim, PIX_SRC, pw, xpos, ypos);
- mpr = mpr_d (pr);
- s = (unsigned char *) mpr->md_image;
- npad = pixrect_pad (xdim);
- for (j = 0; j < ydim; j++)
- {
- tmp = ypos + j;
- for (i = 0; i < xdim; pt++, i += 2)
- {
- pt->x = xpos + i;
- pt->y = tmp;
- pt->z = ((int) *(s++) + (int) *(s++)) >> 1;
- }
- s += npad;
- }
- pr_close (pr);
- return (0);
- }
- /* EOF */
- /* cat > src+obj/plot/get_scaling.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* get_scaling: (static) get scaling */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- static void
- get_scaling (item, value, event)
- Panel_item item;
- int value;
- Event *event;
- {
- /* linear = 1, logarithmic = 0 */
- linear_scaling = value;
- }
- /* EOF */
- /* cat > src+obj/plot/hide_stats.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* hide_stats: (static) hide stats */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- static void
- hide_stats (item, event)
- Panel_item item;
- Event *event;
- {
- char tmp[20];
- int lastw = curr_image.xdim, lasth = curr_image.ydim;
- int answer;
-
- pwInit ();
- answer = (int) panel_get (item, PANEL_CLIENT_DATA);
-
- strncpy (tmp, (char *) panel_get_value (stats_xmin_obj), 19);
- stats_xmin = (float) atof (tmp);
- strncpy (tmp, (char *) panel_get_value (stats_xmax_obj), 19);
- stats_xmax = (float) atof (tmp);
- strncpy (tmp, (char *) panel_get_value (stats_ymin_obj), 19);
- stats_ymin = (float) atof (tmp);
- strncpy (tmp, (char *) panel_get_value (stats_ymax_obj), 19);
- stats_ymax = (float) atof (tmp);
- strncpy (tmp, (char *) panel_get_value (stats_gmin_obj), 19);
- stats_gmin = (float) atof (tmp);
- strncpy (tmp, (char *) panel_get_value (stats_gmax_obj), 19);
- stats_gmax = (float) atof (tmp);
-
- if (!answer || stats_xmin == stats_xmax)
- {
- stats_xmin = 0.;
- stats_xmax = (float) lastw;
- has_xscale = 0;
- }
- else
- has_xscale = 1;
-
- if (!answer || stats_ymin == stats_ymax)
- {
- stats_ymin = 0.;
- stats_ymax = (float) lasth;
- has_yscale = 0;
- }
- else
- has_yscale = 1;
-
- if (!answer || stats_gmin == stats_gmax)
- {
- if (linear_scaling)
- {
- stats_gmin = 0.;
- stats_gmax = 255.;
- }
- else
- {
- stats_gmin = 1.0;
- stats_gmax = 1e5;
- }
- }
-
- sprintf (msgstr, "Note: Scales - xmin=%.2f, xmax=%.2f, ymin=%.2f, ymax=%.2f,",
- stats_xmin, stats_xmax, stats_ymin, stats_ymax);
- msg_write (msgstr);
- if (linear_scaling)
- sprintf (msgstr, " gmin=%.2f, gmax=%.2f, scaling_type=linear",
- stats_gmin, stats_gmax);
- else
- sprintf (msgstr, " gmin=%e, gmax=%e, scaling_type=logarithmic",
- stats_gmin, stats_gmax);
- msg_write (msgstr);
-
- window_set (scale_box, WIN_SHOW, FALSE, 0);
- window_return (1);
- }
- /* EOF */
- /* cat > src+obj/plot/lw_line.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* lw_line: lw line */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- void
- lw_line (x1, y1, x2, y2)
- float x1, y1, x2, y2;
- {
- static float last_x, last_y;
- static int count;
-
- if (!flip_flop)
- {
- fprintf (pf, "newpath\n");
- flip_flop = 1;
- count = 0;
- last_x = 0;
- last_y = 0;
- }
- if (last_x != x1 || last_y != y1)
- {
- if (count > LW_STROKE)
- {
- fprintf (pf, "stroke\n");
- count = 0;
- }
- fprintf (pf, "%.2f %.2f moveto\n", x1, LW_HEIGHT - y1);
- }
- fprintf (pf, "%.2f %.2f lineto\n", x2, LW_HEIGHT - y2);
- last_x = x2;
- last_y = y2;
- count++;
- }
- /* EOF */
- /* cat > src+obj/plot/lw_text.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* lw_text: lw text */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- void
- lw_text (x0, y0, font, string)
- int x0, y0, font;
- char *string;
- {
- static int last_font;
-
- if (flip_flop)
- {
- fprintf (pf, "stroke\n");
- flip_flop = 0;
- }
- if (font != last_font)
- {
- fprintf (pf, "/Times-Roman findfont %2d scalefont\n", font);
- fprintf (pf, "setfont\n");
- last_font = font;
- }
- fprintf (pf, "%d %d moveto\n", x0, LW_HEIGHT - y0);
- fprintf (pf, "(%s) show\n", string);
- }
- /* EOF */
- /* cat > src+obj/plot/my_destroy_interposer.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* my_destroy_interposer: (static) destroy window */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- static Notify_value
- my_destroy_interposer (frame, status)
- Frame frame;
- Destroy_status status;
- {
-
- if (status != DESTROY_CHECKING)
- {
- plot_win_done ();
- }
- return (notify_next_destroy_func (frame, status));
- }
- /* EOF */
- /* cat > src+obj/plot/my_notice_interposer.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* my_notice_interposer: (static) interposer to handler */
- /* graph window closing and */
- /* opening */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- static Notify_value
- my_notice_interposer (frame, event, arg, type)
- Frame frame;
- Event *event;
- Notify_arg arg;
- Notify_event_type type;
- {
- int closed_initial, closed_current;
- Notify_value value;
-
- /* determine initial state of frame */
- closed_initial = (int) window_get (frame, FRAME_CLOSED);
-
- /* let frame operate on the event */
- value = notify_next_event_func (frame, event, arg, type);
-
- /* determine initail state of frame */
- closed_current = (int) window_get (frame, FRAME_CLOSED);
-
- /* action */
- if (closed_initial != closed_current)
- {
- if (closed_current)
- {
- /* turn off plotting mode since closed */
- plot_win_close ();
- }
- else
- {
- /* turn on plotting mode since opened */
- graph_mode = save_gmode;
- }
- }
- return (value);
- }
- /* EOF */
- /* cat > src+obj/plot/pcan_controller.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* pcan_controller: (static) clear plot controller */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- static void
- pcan_controller (can, event)
- Canvas can;
- Event *event;
- {
- /*
- int eid = event_id(event);
- if(eid == MS_MIDDLE && event_is_down(event))
- clear_plot();
- */
- }
- /* EOF */
- /* cat > src+obj/plot/plot_action.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* plot_action: handler for menu items under 'GRAPH' */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- void
- plot_action (m, mi)
- Menu m;
- Menu_item mi;
- {
- char str[MAXNAMELEN];
-
- strcpy (str, (char *) menu_get (mi, MENU_STRING));
- if (graph_mode == PLOT_NONE)
- {
- if (plot_window == NULL)
- create_plot_window ();
- window_set (plot_window, WIN_SHOW, TRUE, 0);
- }
-
- if (!strcmp ("XY", str))
- {
- clear_plot ();
- valid_xy ();
- if (graph_mode != PLOT_XY)
- erase_square ();
- show_stats ();
- graph_mode = PLOT_XY;
- print_true = TRUE;
- }
- else if (!strcmp ("Contour", str))
- {
- valid_2d ();
- clear_plot ();
- if (graph_mode == PLOT_XY)
- erase_line ();
- graph_mode = PLOT_CON;
- print_true = FALSE;
- }
- else if (!strcmp ("3D", str))
- {
- valid_3d ();
- clear_plot ();
- if (graph_mode == PLOT_XY)
- erase_line ();
- graph_mode = PLOT_3D;
- print_true = FALSE;
- }
-
- save_gmode = graph_mode;
- }
- /* EOF */
- /* cat > src+obj/plot/plot_axes.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* plot_axes: routine to plot axes, tickmarks, labels */
- /* for xy plot */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- plot_axes (label, end1, end2)
- char *label;
- float end1, end2;
- {
- Pixwin *plotpw = canvas_pixwin (pcanvas);
- char str[10], title[MAXNAMELEN];
- int xpmin = XPLOT_MIN, xpmax = XPLOT_MAX;
- int ypmin = YPLOT_MIN, ypmax = YPLOT_MAX;
- int xmargin = XPLOT_MARGIN, ymargin = YPLOT_MARGIN;
- int length = MARKER_LENGTH;
- int ll = strlen (label) / 2;
- int i, nm, tmp, xmarker, ymarker;
- float xlabel, ylabel;
-
- xmarker = (int) ((xpmax - xpmin) / (float) NMARKERS);
- xlabel = (end2 - end1) / NMARKERS;
- if (linear_scaling)
- {
- ylabel = (float) (stats_gmax - stats_gmin) / NMARKERS;
- nm = NMARKERS;
- }
- else
- {
- /* log scale */
- nm = ntix;
- }
- ymarker = (int) ((ypmax - ypmin) / (float) nm);
-
- strcpy (title, (char *) panel_get_value (title_item));
- if (strlen (title) == 0)
- {
- if (linear_scaling)
- strcpy (title, "Linear Plotting");
- else
- strcpy (title, "Logarithmic Plotting");
- }
-
- /* plot labels, draw axes */
- pwText (plotpw, (xpmin + xpmax) / 2 - strlen (title) * 4, ypmin / 2, PIX_SRC, 14, title);
- pwText (plotpw, xmargin, ypmin / 2, PIX_SRC, 12, "Gvalue");
-
- pwSetlinewidth (1.0);
- pwVector (plotpw, xpmin, ypmin, xpmin, ypmax, PIX_SRC, 255);
- pwVector (plotpw, xpmin, ypmax, xpmax, ypmax, PIX_SRC, 255);
- pwText (plotpw, (xpmin + xpmax) / 2 - ll * 6, ypmax + 2 * ymargin + 10, PIX_SRC, 12, label);
- pwSetlinewidth (0.2);
-
- /* x-axis markers */
- for (i = 0; i < NMARKERS + 1; i++)
- {
- pwVector (plotpw, xpmin + i * xmarker, ypmax - length, xpmin + i * xmarker,
- ypmax + length, PIX_SRC, 255);
- sprintf (str, "%.2f", end1 + i * xlabel);
- pwText (plotpw, xpmin + i * xmarker - 10, ypmax + ymargin, PIX_SRC, 10, str);
- }
-
- /* y-axis markers */
- for (i = 0; i < nm + 1; i++)
- {
- pwVector (plotpw, xpmin - length, ypmin + i * ymarker, xpmin + length,
- ypmin + i * ymarker, PIX_SRC, 255);
- if (linear_scaling)
- {
- sprintf (str, "%.2f", stats_gmin + i * ylabel);
- pwText (plotpw, xmargin - 15, ypmax - i * ymarker, PIX_SRC, 10, str);
- }
- else
- {
- sprintf (str, "%d", gminexp + i * pintv);
- pwText (plotpw, xmargin + 15, ypmax - i * ymarker - 4, PIX_SRC, 8, str);
- pwText (plotpw, xmargin, ypmax - i * ymarker + 2, PIX_SRC, 10, "10");
- }
- }
- }
- /* EOF */
- /* cat > src+obj/plot/plot_handler.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* plot_handler: plot handler */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- plot_handler (item, event)
- Panel_item item;
- Event *event;
- {
- if (display_panel_menu (item, event, menu_panel, graph_menu))
- plot_action (graph_menu, menu_get (graph_menu, MENU_NTH_ITEM, 1));
- }
- /* EOF */
- /* cat > src+obj/plot/plot_proc.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* plot_proc: plotting procedure- canvas event handler */
- /* under graphing mode xy plot mode: left */
- /* button dragging to draw a cross section */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- plot_proc (eid, event)
- int eid;
- Event *event;
- {
- switch (eid)
- {
- case MS_LEFT: /* left button draw line section */
- if (line_drawn)
- {
- /* line exists */
- line_drawn = 0;
- first_point = 0;
- pw_vector (pw, line_rec.x1, line_rec.y1, line_rec.x2,
- line_rec.y2, PIX_NOT (PIX_DST), 255);
- }
-
- draw_line (eid, event);
- break;
- case MS_MIDDLE: /* middle button selects region to zoom */
- if (event_is_down (event))
- plot_linear ();
- break;
- case LOC_DRAG:
- if (first_point)
- draw_line (eid, event);
- break;
- default:
- break;
- }
- return;
- }
- /* EOF */
- /* cat > src+obj/plot/plot_win_close.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* plot_win_close: close plot window */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- plot_win_close ()
- {
- erase_line ();
- erase_square ();
- save_gmode = graph_mode;
- graph_mode = PLOT_NONE;
- last_dir = 0;
- first_middle_down = 0;
- }
- /* EOF */
- /* cat > src+obj/plot/plot_win_done.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* plot_win_done: finished plot window */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- plot_win_done ()
- {
- fclose (pf);
- pf = NULL;
- unlink (jerk);
- plot_window = NULL;
- if (!main_quit)
- plot_win_close ();
- }
- /* EOF */
- /* cat > src+obj/plot/process_gexp.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* process_gexp: process g expression */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- process_gexp (prexpi, prexpx)
- int *prexpi, *prexpx;
- {
- int diffexp = *prexpx - *prexpi;
-
- pintv = (int) ceil ((double) diffexp / NMARKERS);
- ntix = (int) ceil ((double) diffexp / pintv);
- *prexpx = *prexpi + pintv * ntix;
- }
- /* EOF */
- /* cat > src+obj/plot/pwInit.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* pwInit: pw initialization */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- void
- pwInit ()
- {
- if (pf == NULL)
- {
- /* tempnam(3) is a library function */
- if ((jerk = tempnam (NULL, "imgtl.1")) == NULL)
- {
- msg_write ("Error: Temporary plot file name cannot be generated.");
- exit (0);
- }
- if ((pf = fopen (jerk, "w")) == NULL)
- {
- sprintf (wkstr, "Error: Cannot open temporary plot filename %s.", jerk);
- msg_write (wkstr);
- /* sleep (10); */
- exit (0);
- }
- }
-
- fprintf (pf, "%%! The Hard Copy of the Imagetool Graph Window\n");
- pwSetlinewidth (0.2);
- flip_flop = 0;
- }
- /* EOF */
- /* cat > src+obj/plot/pwSetlinewidth.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* pwSetlinewidth: pw Setlinewidth */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- void
- pwSetlinewidth (width)
- float width;
- {
- fprintf (pf, "%.2f setlinewidth\n", width);
- }
- /* EOF */
- /* cat > src+obj/plot/pwText.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* pwText: pw Text */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- void
- pwText (pw, x0, y0, op, font, string)
- Pixwin *pw;
- int x0, y0, op, font;
- char *string;
- {
- pw_text (pw, x0, y0, op, NULL, string);
- if (print_true)
- lw_text (x0, y0 + 100, font, string);
- }
- /* EOF */
- /* cat > src+obj/plot/pwVector.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* pwVector: pw Vector */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- void
- pwVector (pw, x1, y1, x2, y2, op, value)
- Pixwin *pw;
- int x1, y1, x2, y2, op, value;
- {
- pw_vector (pw, x1, y1, x2, y2, op, value);
- if (print_true)
- lw_line ((float) x1, (float) (y1 + 100), (float) x2, (float) (y2 + 100));
- }
- /* EOF */
- /* cat > src+obj/plot/show_stats.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* show_stats: display info box for stats */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- show_stats ()
- {
- /* create and display scale box */
- if (scale_box == NULL)
- create_stats ();
- window_set (scale_box, WIN_SHOW, TRUE, 0);
- }
- /* EOF */
- /* cat > src+obj/plot/valid_2d.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* valid_2d: valid 2d */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- valid_2d ()
- {
- panel_set (title_item, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (scale_but, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (roll_item, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (pitch_item, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (yaw_item, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (level_item, PANEL_SHOW_ITEM, TRUE, 0);
- }
- /* EOF */
- /* cat > src+obj/plot/valid_3d.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* valid_3d: valid 3d */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- valid_3d ()
- {
- panel_set (title_item, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (level_item, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (scale_but, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (roll_item, PANEL_SHOW_ITEM, TRUE, 0);
- panel_set (pitch_item, PANEL_SHOW_ITEM, TRUE, 0);
- panel_set (yaw_item, PANEL_SHOW_ITEM, TRUE, 0);
- }
- /* EOF */
- /* cat > src+obj/plot/valid_xy.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* valid_xy: validation routine for different graphing */
- /* modes */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "plot.h" */
-
- valid_xy ()
- {
- panel_set (level_item, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (roll_item, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (pitch_item, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (yaw_item, PANEL_SHOW_ITEM, FALSE, 0);
- panel_set (title_item, PANEL_SHOW_ITEM, TRUE, 0);
- panel_set (scale_but, PANEL_SHOW_ITEM, TRUE, 0);
- }
- /* EOF */
-