version 1.1, 2001/10/02 11:17:07 |
version 1.2, 2002/09/11 07:26:57 |
Line 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
|
Line 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
|
/* HIGH RESOLUTION PLOT */ |
/* HIGH RESOLUTION PLOT */ |
/* */ |
/* */ |
/*******************************************************************/ |
/*******************************************************************/ |
|
|
|
#ifdef BOTH_GNUPLOT_AND_X11 /* The switch support in plotgnuplot */ |
|
# define rectdraw0 X11_rectdraw0 |
|
# define term_set X11_term_set |
|
# define PARI_get_plot X11_PARI_get_plot |
|
# define plot_outfile_set X11_plot_outfile_set |
|
# define set_pointsize X11_set_pointsize |
|
# define pari_plot pari_X11plot |
|
#endif |
|
|
#include "pari.h" |
#include "pari.h" |
#include "rect.h" |
#include "rect.h" |
#include "../language/anal.h" |
#include "../language/anal.h" |
Line 135 rectdraw0(long *w, long *x, long *y, long lw, long do_ |
|
Line 145 rectdraw0(long *w, long *x, long *y, long lw, long do_ |
|
long *numpoints[MAX_COLORS],*numtexts[MAX_COLORS]; |
long *numpoints[MAX_COLORS],*numtexts[MAX_COLORS]; |
long *xtexts[MAX_COLORS],*ytexts[MAX_COLORS]; |
long *xtexts[MAX_COLORS],*ytexts[MAX_COLORS]; |
long rcolcnt[MAX_COLORS][ROt_MAX]; |
long rcolcnt[MAX_COLORS][ROt_MAX]; |
long col,i,j,x0,y0,a,b,oldwidth,oldheight,force; |
long col,i,j,x0,y0,a,b,oldwidth,oldheight; |
long rcnt[ROt_MAX+1], hjust, vjust, hgap, vgap, hgapsize, vgapsize; |
long rcnt[ROt_MAX+1], hjust, vjust, hgap, vgap, hgapsize, vgapsize; |
char **texts[MAX_COLORS]; |
char **texts[MAX_COLORS]; |
PariRect *e; |
PariRect *e; |
Line 159 rectdraw0(long *w, long *x, long *y, long lw, long do_ |
|
Line 169 rectdraw0(long *w, long *x, long *y, long lw, long do_ |
|
|
|
/* child process goes on */ |
/* child process goes on */ |
freeall(); /* PARI stack isn't needed anymore, keep rectgraph */ |
freeall(); /* PARI stack isn't needed anymore, keep rectgraph */ |
|
/* if gnuplot X11 plotting is active, may get SIGPIPE... XXXX Better disable |
|
* some X callback? */ |
|
os_signal(SIGPIPE, SIG_IGN); |
PARI_get_plot(1); |
PARI_get_plot(1); |
display = XOpenDisplay(NULL); |
display = XOpenDisplay(NULL); |
font_info = XLoadQueryFont(display, "9x15"); |
font_info = XLoadQueryFont(display, "9x15"); |
Line 248 rectdraw0(long *w, long *x, long *y, long lw, long do_ |
|
Line 261 rectdraw0(long *w, long *x, long *y, long lw, long do_ |
|
gc = XCreateGC(display, win, 0, NULL); |
gc = XCreateGC(display, win, 0, NULL); |
XSetFont(display, gc, font_info->fid); |
XSetFont(display, gc, font_info->fid); |
|
|
|
XClearWindow(display, win); |
XMapWindow(display, win); |
XMapWindow(display, win); |
oldwidth = w_width; |
oldwidth = w_width; |
oldheight = w_height; force = 1; |
oldheight = w_height; |
|
|
for(;;) |
for(;;) |
{ |
{ |
Line 281 rectdraw0(long *w, long *x, long *y, long lw, long do_ |
|
Line 295 rectdraw0(long *w, long *x, long *y, long lw, long do_ |
|
|
|
if (width == oldwidth && height == oldheight) break; |
if (width == oldwidth && height == oldheight) break; |
oldwidth = width; |
oldwidth = width; |
oldheight = height; force = 1; |
oldheight = height; |
|
|
/* recompute scale */ |
/* recompute scale */ |
xs = ((double)width)/w_width; ys=((double)height)/w_height; |
xs = ((double)width)/w_width; ys=((double)height)/w_height; |
} |
} |
case Expose: if (!force) break; |
case Expose: |
force = 0; |
|
for(i=0; i<lw; i++) |
for(i=0; i<lw; i++) |
{ |
{ |
e=rectgraph[w[i]];p1=RHead(e);x0=x[i];y0=y[i]; |
e=rectgraph[w[i]];p1=RHead(e);x0=x[i];y0=y[i]; |