version 1.17, 2014/05/12 16:54:41 |
version 1.19, 2014/06/27 07:58:29 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/plot/plotp.c,v 1.16 2013/12/19 05:48:25 saito Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/plot/plotp.c,v 1.18 2014/05/13 20:02:40 ohara Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 80 void area_print(DISPLAY *display,double **tab,struct c |
|
Line 80 void area_print(DISPLAY *display,double **tab,struct c |
|
int ix,iy,width,height,wc,**mask; |
int ix,iy,width,height,wc,**mask; |
XImage *image; |
XImage *image; |
DRAWABLE pix; |
DRAWABLE pix; |
unsigned long color,black,white,c2; |
unsigned int color,black,white,c2; |
|
//unsigned long color,black,white,c2; |
double *px,*px1,*px2; |
double *px,*px1,*px2; |
//GXcode 0:new 1:cp 2:and 3:or 4:xor |
//GXcode 0:new 1:cp 2:and 3:or 4:xor |
width=can->width; |
width=can->width; |
Line 158 void over_print(DISPLAY *display,double **tab,struct c |
|
Line 159 void over_print(DISPLAY *display,double **tab,struct c |
|
} |
} |
#endif |
#endif |
|
|
void if_print(DISPLAY *display,double **tab,struct canvas *can,int cond){ |
void if_printNG(DISPLAY *display,double **tab,struct canvas *can,int cond){ |
int ix,iy,width,height; |
int ix,iy,width,height; |
double zst,zed,zsp; |
double zst,zed,zsp; |
DRAWABLE pix; |
DRAWABLE pix; |
Line 183 void if_print(DISPLAY *display,double **tab,struct can |
|
Line 184 void if_print(DISPLAY *display,double **tab,struct can |
|
} |
} |
|
|
void polar_print(DISPLAY *display,struct canvas *can){ |
void polar_print(DISPLAY *display,struct canvas *can){ |
int len,color,i,j,x,y; |
int len,i,j,x,y; |
|
unsigned int color; |
POINT *pa; |
POINT *pa; |
|
|
len=can->pa[0].length; |
|
color=can->color; |
|
pa=can->pa[0].pos; |
|
#if defined(VISUAL) |
#if defined(VISUAL) |
HDC dc; |
HDC dc; |
HPEN pen,oldpen; |
HPEN pen,oldpen; |
|
len=can->pa[0].length; |
|
color=can->color; |
|
pa=can->pa[0].pos; |
for(i=1;i<len;i++){ |
for(i=1;i<len;i++){ |
j=i-1; |
j=i-1; |
if(color){ |
if(color){ |
Line 215 void polar_print(DISPLAY *display,struct canvas *can){ |
|
Line 217 void polar_print(DISPLAY *display,struct canvas *can){ |
|
} |
} |
} |
} |
#else |
#else |
|
len=can->pa[0].length; |
|
color=can->color; |
|
pa=can->pa[0].pos; |
for(i=1;i<len;i++){ |
for(i=1;i<len;i++){ |
j=i-1; |
j=i-1; |
DRAWLINE(display,can->pix,cdrawGC,XC(pa[j]),YC(pa[j]),XC(pa[i]),YC(pa[i])); |
DRAWLINE(display,can->pix,cdrawGC,XC(pa[j]),YC(pa[j]),XC(pa[i]),YC(pa[i])); |
Line 224 void polar_print(DISPLAY *display,struct canvas *can){ |
|
Line 229 void polar_print(DISPLAY *display,struct canvas *can){ |
|
} |
} |
|
|
|
|
void if_printOld(DISPLAY *display,double **tab,struct canvas *can){ |
void if_print(DISPLAY *display,double **tab,struct canvas *can){ |
|
int ix,iy,width,height; |
|
double *px,*px1,*px2; |
|
DRAWABLE pix; |
|
|
|
if ( can->mode == modeNO(CONPLOT) ) { |
|
con_print(display,tab,can); return; |
|
} |
|
flush(); |
|
width = can->width; height = can->height; pix = can->pix; |
|
for( ix=0; ix<width-1; ix++ ) |
|
for(iy=0, px=tab[ix], px1 = tab[ix+1], px2 = px+1; |
|
iy<height-1 ;iy++, px++, px1++, px2++ ) |
|
if ( ((*px >= 0) && ((*px1 <= 0) || (*px2 <= 0))) || |
|
((*px <= 0) && ((*px1 >= 0) || (*px2 >= 0))) ) { |
|
DRAWPOINT(display,pix,cdrawGC,ix,height-iy-1); |
|
count_and_flush(); |
|
} |
|
flush(); |
|
/* |
int i,ix,iy,width,height; |
int i,ix,iy,width,height; |
double *px,*px1,*px2; |
double *px,*px1,*px2; |
double **vmax,**vmin,*zst,zstep,zv,u,l; |
double **vmax,**vmin,*zst,zstep,zv,u,l; |
Line 278 void if_printOld(DISPLAY *display,double **tab,struct |
|
Line 302 void if_printOld(DISPLAY *display,double **tab,struct |
|
} |
} |
} |
} |
flush(); |
flush(); |
|
*/ |
} |
} |
|
|
#define MEMORY_DRAWPOINT(a,len,x,y) (((a)[(len)*(y)+((x)>>3)]) |= (1<<((x)&7))) |
#define MEMORY_DRAWPOINT(a,len,x,y) (((a)[(len)*(y)+((x)>>3)]) |= (1<<((x)&7))) |
Line 444 void plot_print(DISPLAY *display,struct canvas *can){ |
|
Line 469 void plot_print(DISPLAY *display,struct canvas *can){ |
|
#endif |
#endif |
} |
} |
|
|
void draw_point(DISPLAY *display,struct canvas *can,int x,int y,int color){ |
void draw_point(DISPLAY *display,struct canvas *can,int x,int y,unsigned int color){ |
|
//void draw_point(DISPLAY *display,struct canvas *can,int x,int y,int color){ |
#if defined(VISUAL) |
#if defined(VISUAL) |
HDC dc; |
HDC dc; |
|
|
Line 461 void draw_point(DISPLAY *display,struct canvas *can,in |
|
Line 487 void draw_point(DISPLAY *display,struct canvas *can,in |
|
} |
} |
|
|
void draw_line( |
void draw_line( |
DISPLAY *display,struct canvas *can,int x,int y,int u,int v,int color){ |
DISPLAY *display,struct canvas *can,int x,int y,int u,int v,unsigned int color){ |
|
//DISPLAY *display,struct canvas *can,int x,int y,int u,int v,int color){ |
#if defined(VISUAL) |
#if defined(VISUAL) |
HDC dc; |
HDC dc; |
HPEN pen,oldpen; |
HPEN pen,oldpen; |
|
|
} |
} |
|
|
void draw_character_string( |
void draw_character_string( |
DISPLAY *display,struct canvas *can,int x,int y,char *str,int color){ |
DISPLAY *display,struct canvas *can,int x,int y,char *str,unsigned int color){ |
|
//DISPLAY *display,struct canvas *can,int x,int y,char *str,int color){ |
#if defined(VISUAL) |
#if defined(VISUAL) |
HDC dc; |
HDC dc; |
COLORREF oldcolor; |
COLORREF oldcolor; |