[BACK]Return to plotp.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / plot

Diff for /OpenXM_contrib2/asir2000/plot/plotp.c between version 1.22 and 1.23

version 1.22, 2015/08/06 10:01:53 version 1.23, 2015/08/14 13:51:56
Line 45 
Line 45 
  * 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.21 2014/08/20 16:51:34 ohara Exp $   * $OpenXM: OpenXM_contrib2/asir2000/plot/plotp.c,v 1.22 2015/08/06 10:01:53 fujimoto Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 59 
Line 59 
 #define EXP10(a) pow(10.0,a)  #define EXP10(a) pow(10.0,a)
 #endif  #endif
   
 #if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__)  #if defined(VISUAL) || defined(__MINGW32__)
 static POINT oldpos;  static POINT oldpos;
 #endif  #endif
   
 #if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__)  #if !defined(VISUAL) && !defined(__MINGW32__)
 extern Pixel BackPixel;  extern Pixel BackPixel;
 unsigned long GetColor(Display *, char *);  unsigned long GetColor(Display *, char *);
   
Line 193  void polar_print(DISPLAY *display,struct canvas *can){
Line 193  void polar_print(DISPLAY *display,struct canvas *can){
         unsigned int color;          unsigned int color;
         POINT *pa;          POINT *pa;
   
 #if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__)  #if defined(VISUAL) || defined(__MINGW32__)
         HDC dc;          HDC dc;
         HPEN pen,oldpen;          HPEN pen,oldpen;
         len=can->pa[0].length;          len=can->pa[0].length;
Line 459  void plot_print(DISPLAY *display,struct canvas *can){
Line 459  void plot_print(DISPLAY *display,struct canvas *can){
         int len;          int len;
         POINT *pa;          POINT *pa;
   
 #if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__)  #if defined(VISUAL) || defined(__MINGW32__)
         len = can->pa[0].length;          len = can->pa[0].length;
         pa = can->pa[0].pos;          pa = can->pa[0].pos;
   
Line 476  void plot_print(DISPLAY *display,struct canvas *can){
Line 476  void plot_print(DISPLAY *display,struct canvas *can){
   
 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,unsigned int color){
 //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,int color){
 #if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__)  #if defined(VISUAL) || defined(__MINGW32__)
         HDC dc;          HDC dc;
   
         SetPixel(can->pix,x,y,(COLORREF)color);          SetPixel(can->pix,x,y,(COLORREF)color);
Line 494  void draw_point(DISPLAY *display,struct canvas *can,in
Line 494  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,unsigned 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){          //DISPLAY *display,struct canvas *can,int x,int y,int u,int v,int color){
 #if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__)  #if defined(VISUAL) || defined(__MINGW32__)
         HDC dc;          HDC dc;
         HPEN pen,oldpen;          HPEN pen,oldpen;
   
Line 528  void draw_line(
Line 528  void draw_line(
 void draw_character_string(  void draw_character_string(
         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,unsigned int color){
         //DISPLAY *display,struct canvas *can,int x,int y,char *str,int color){          //DISPLAY *display,struct canvas *can,int x,int y,char *str,int color){
 #if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__)  #if defined(VISUAL) || defined(__MINGW32__)
         HDC dc;          HDC dc;
         COLORREF oldcolor;          COLORREF oldcolor;
   
Line 606  void pline(DISPLAY *display,struct canvas *can,DRAWABL
Line 606  void pline(DISPLAY *display,struct canvas *can,DRAWABL
                 DRAWLINE(display,d,drawGC,x0,y,x0+D,y);                  DRAWLINE(display,d,drawGC,x0,y,x0+D,y);
                 sprintf(buf,"%g",n*e);                  sprintf(buf,"%g",n*e);
                 if ( can->xmax <= 0 ) {                  if ( can->xmax <= 0 ) {
 #if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__)  #if !defined(VISUAL) && !defined(__MINGW32__)
                         xadj = TEXTWIDTH(sffs,buf,strlen(buf));                          xadj = TEXTWIDTH(sffs,buf,strlen(buf));
 #else  #else
                         SIZE size;                          SIZE size;
Line 634  double adjust_scale(double e,double w){
Line 634  double adjust_scale(double e,double w){
 }  }
   
 void initmarker(struct canvas *can,char *message){  void initmarker(struct canvas *can,char *message){
 #if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__)  #if defined(VISUAL) || defined(__MINGW32__)
         can->real_can->percentage = 0;          can->real_can->percentage = 0;
         can->real_can->prefix = message;          can->real_can->prefix = message;
 #else  #else
Line 645  void initmarker(struct canvas *can,char *message){
Line 645  void initmarker(struct canvas *can,char *message){
 }  }
   
 void marker(struct canvas *can,int dir,int p){  void marker(struct canvas *can,int dir,int p){
 #if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__)  #if defined(VISUAL) || defined(__MINGW32__)
         if ( dir == DIR_X )          if ( dir == DIR_X )
                 can->real_can->percentage = (int)ceil((float)p/(float)can->real_can->width*100);                  can->real_can->percentage = (int)ceil((float)p/(float)can->real_can->width*100);
         else if ( dir == DIR_Y )          else if ( dir == DIR_Y )
Line 667  void marker(struct canvas *can,int dir,int p){
Line 667  void marker(struct canvas *can,int dir,int p){
 }  }
   
 void define_cursor(WINDOW w,CURSOR cur){  void define_cursor(WINDOW w,CURSOR cur){
 #if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__)  #if !defined(VISUAL) && !defined(__MINGW32__)
         XDefineCursor(display,w,cur); flush();          XDefineCursor(display,w,cur); flush();
 #endif  #endif
 }  }
Line 680  static int flush_count;
Line 680  static int flush_count;
 #endif  #endif
   
 void count_and_flush(){  void count_and_flush(){
 #if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__)  #if !defined(VISUAL) && !defined(__MINGW32__)
         if ( ++flush_count == MAX_COUNT )          if ( ++flush_count == MAX_COUNT )
                 flush();                  flush();
 #endif  #endif
 }  }
   
 void flush(){  void flush(){
 #if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__)  #if !defined(VISUAL) && !defined(__MINGW32__)
         flush_count = 0;          flush_count = 0;
         XFlush(display);          XFlush(display);
 #endif  #endif

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>