=================================================================== RCS file: /home/cvs/OpenXM_contrib2/windows/engine2000/ChildView.cpp,v retrieving revision 1.2 retrieving revision 1.5 diff -u -p -r1.2 -r1.5 --- OpenXM_contrib2/windows/engine2000/ChildView.cpp 2001/10/09 01:36:28 1.2 +++ OpenXM_contrib2/windows/engine2000/ChildView.cpp 2014/05/13 20:07:23 1.5 @@ -13,6 +13,7 @@ static char THIS_FILE[] = __FILE__; #include +#include "gmpxx.h" extern "C" { #include "ca.h" #include "ifplot.h" @@ -80,7 +81,7 @@ void CChildView::OnPaint() // TODO: メッセージ ハンドラのコードをここに追加してください。 // 描画のために CWnd::OnPaint を呼び出してはいけません。 - if ( can->mode == MODE_INTERACTIVE ) { + if ( can->mode == modeNO(INTERACTIVE) ) { ::BitBlt(dc.m_hDC,0,0,can->width,can->height,can->pix,0,0,SRCCOPY); } else { if ( !can->wide ) { @@ -96,7 +97,7 @@ void CChildView::OnPrint(CDC &dc) { DOCINFO docinfo; NODE n; - int width,height,ratio,x,y; + int width,height,ratio,x,y,step; memset(&docinfo,0,sizeof(DOCINFO)); docinfo.cbSize = sizeof(DOCINFO); @@ -122,8 +123,9 @@ void CChildView::OnPrint(CDC &dc) dc.StartDoc(&docinfo); dc.StartPage(); - if ( can->mode == MODE_INTERACTIVE ) { - // We want to associate precisely one printer pixel to + if ( can->mode == modeNO(INTERACTIVE) ) { + + // We want to associate a rectangle of a fixed size to // one bitmap pixel // if can->width/can->height > width/height // then match the widths, else match the height @@ -139,6 +141,7 @@ void CChildView::OnPrint(CDC &dc) dc.SetViewportOrg(width/18,height/18); dc.SetViewportExt(width,height); + step = (ratio+4)/5; for ( n = can->history; n; n = NEXT(n) ) { RealVect *rv = (RealVect *)n->body; if ( rv->len == 2 ) { @@ -146,7 +149,8 @@ void CChildView::OnPrint(CDC &dc) x = rv->body[0]*ratio; y = rv->body[1]*ratio; // dc.FillRect(CRect(x,y,x+1,y+1),&brush); - dc.FillRect(CRect(x-1,y-1,x+1,y+1),&brush); +// dc.FillRect(CRect(x-1,y-1,x+1,y+1),&brush); + dc.FillRect(CRect(x,y,x+step,y+step),&brush); } else if ( rv->len == 4 ) { dc.MoveTo(rv->body[0]*ratio,rv->body[1]*ratio); dc.LineTo(rv->body[2]*ratio,rv->body[3]*ratio); @@ -160,7 +164,7 @@ void CChildView::OnPrint(CDC &dc) dc.SetViewportOrg(width/18,height/18); dc.SetViewportExt(width,height); - if ( can->mode == MODE_PLOT ) + if ( can->mode == modeNO(PLOT) ) dc.Polyline(can->pa[0].pos,can->pa[0].length); else ::StretchBlt(dc.m_hDC,0,0,can->width,can->height,can->pix, @@ -180,9 +184,9 @@ void CChildView::PrintAxis(CDC &dc) char buf[BUFSIZ]; /* XXX : should be cleaned up */ - if ( can->noaxis || (can->mode == MODE_PLOT && !can->pa) ) + if ( can->noaxis || (can->mode == modeNO(PLOT) && !can->pa) ) return; - if ( can->mode == MODE_INTERACTIVE ) + if ( can->mode == modeNO(INTERACTIVE) ) return; xadj = yadj = 0;