version 1.5, 2001/04/07 10:53:15 |
version 1.6, 2002/07/11 03:34:34 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/plot/smoothing.c,v 1.4 2000/11/08 05:49:35 takayama Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/plot/smoothing.c,v 1.5 2001/04/07 10:53:15 takayama Exp $ */ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
#include "ox.h" |
#include "ox.h" |
Line 50 static void polyLine_outputProlog(int xmin, int ymin,i |
|
Line 50 static void polyLine_outputProlog(int xmin, int ymin,i |
|
fflush(Fp); |
fflush(Fp); |
} |
} |
static void polyLine_outputEpilog(void) { |
static void polyLine_outputEpilog(void) { |
|
fprintf(Fp,"0 0 0 setrgbcolor \n"); |
fprintf(Fp,"showpage \n"); fflush(Fp); |
fprintf(Fp,"showpage \n"); fflush(Fp); |
} |
} |
static void polyLine_error(char *s) { |
static void polyLine_error(char *s) { |
Line 119 struct canvas *can; |
|
Line 120 struct canvas *can; |
|
|
|
generatePS_from_image(FILE *fp,XImage *image,int xsize, int ysize, |
generatePS_from_image(FILE *fp,XImage *image,int xsize, int ysize, |
int color[],int colorSize, |
int color[],int colorSize, |
struct canvas *can) { |
struct canvas *can,struct xcolorForPS *tableOfxcolorForPS) { |
struct polyLine **pl; |
struct polyLine **pl; |
int plSize = 0; |
int plSize = 0; |
int *prev; |
int *prev; |
Line 133 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); |
for (c=0; c<colorSize; c++) { |
for (c=0; c<colorSize; c++) { |
/* Set color if necessary */ |
/* Set color by looking at tableOfxcolorForPS. |
|
It has not yet been implemented. |
|
*/ |
for (x=0; x<Xsize; x++) { |
for (x=0; x<Xsize; x++) { |
for (y=0; y<Ysize; y++) { |
for (y=0; y<Ysize; y++) { |
if ((int) XGetPixel(image,x,y) == color[c]){ |
if ((int) XGetPixel(image,x,y) == color[c]){ |
Line 149 generatePS_from_image(FILE *fp,XImage *image,int xsize |
|
Line 153 generatePS_from_image(FILE *fp,XImage *image,int xsize |
|
polyLine_pline(can); |
polyLine_pline(can); |
polyLine_outputEpilog(); |
polyLine_outputEpilog(); |
} |
} |
|
|
|
|
|
|
|
|