version 1.6, 2002/07/11 03:34:34 |
version 1.7, 2002/07/11 12:35:03 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/plot/smoothing.c,v 1.5 2001/04/07 10:53:15 takayama Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/plot/smoothing.c,v 1.6 2002/07/11 03:34:34 takayama Exp $ */ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
#include "ox.h" |
#include "ox.h" |
Line 134 generatePS_from_image(FILE *fp,XImage *image,int xsize |
|
Line 134 generatePS_from_image(FILE *fp,XImage *image,int xsize |
|
polyLine_outputProlog(0,0,Xsize,Ysize); |
polyLine_outputProlog(0,0,Xsize,Ysize); |
switch(Strategy_generate_PS) { |
switch(Strategy_generate_PS) { |
default: |
default: |
fprintf(Fp,"%% debug info : colorSize=%d\n",colorSize); |
fprintf(Fp,"%% debug info : colorSize=%d\n",colorSize); |
for (c=0; c<colorSize; c++) { |
for (c=0; c<colorSize; c++) { |
/* Set color by looking at tableOfxcolorForPS. |
/* Set color by looking at tableOfxcolorForPS. |
It has not yet been implemented. |
|
*/ |
*/ |
for (x=0; x<Xsize; x++) { |
fprintf(Fp,"%f %f %f setrgbcolor \n",(tableOfxcolorForPS[c]).r,(tableOfxcolorForPS[c]).g,(tableOfxcolorForPS[c]).b); |
for (y=0; y<Ysize; y++) { |
for (x=0; x<Xsize; x++) { |
if ((int) XGetPixel(image,x,y) == color[c]){ |
for (y=0; y<Ysize; y++) { |
fprintf(Fp," %d %d ", translateX(x),translateY(y) ); |
if ((tableOfxcolorForPS[c]).print && |
fprintf(Fp," ifplot_putpixel\n"); |
XGetPixel(image,x,y) == (tableOfxcolorForPS[c]).pixel){ |
} |
fprintf(Fp," %d %d ", translateX(x),translateY(y) ); |
} |
fprintf(Fp," ifplot_putpixel\n"); |
} |
} |
} |
} |
break; |
} |
|
} |
|
break; |
} |
} |
polyLine_pline(can); |
polyLine_pline(can); |
polyLine_outputEpilog(); |
polyLine_outputEpilog(); |