[BACK]Return to ChildView.cpp CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / windows / engine2000

Diff for /OpenXM_contrib2/windows/engine2000/ChildView.cpp between version 1.2 and 1.3

version 1.2, 2001/10/09 01:36:28 version 1.3, 2002/10/02 09:33:31
Line 96  void CChildView::OnPrint(CDC &dc) 
Line 96  void CChildView::OnPrint(CDC &dc) 
 {  {
         DOCINFO docinfo;          DOCINFO docinfo;
         NODE n;          NODE n;
         int width,height,ratio,x,y;          int width,height,ratio,x,y,step;
   
         memset(&docinfo,0,sizeof(DOCINFO));          memset(&docinfo,0,sizeof(DOCINFO));
         docinfo.cbSize = sizeof(DOCINFO);          docinfo.cbSize = sizeof(DOCINFO);
Line 123  void CChildView::OnPrint(CDC &dc) 
Line 123  void CChildView::OnPrint(CDC &dc) 
         dc.StartPage();          dc.StartPage();
   
         if ( can->mode == MODE_INTERACTIVE ) {          if ( can->mode == MODE_INTERACTIVE ) {
                 // We want to associate precisely one printer pixel to  
                   // We want to associate a rectangle of a fixed size to
                 // one bitmap pixel                  // one bitmap pixel
                 // if can->width/can->height > width/height                  // if can->width/can->height > width/height
                 // then match the widths, else match the height                  // then match the widths, else match the height
Line 139  void CChildView::OnPrint(CDC &dc) 
Line 140  void CChildView::OnPrint(CDC &dc) 
                 dc.SetViewportOrg(width/18,height/18);                  dc.SetViewportOrg(width/18,height/18);
                 dc.SetViewportExt(width,height);                  dc.SetViewportExt(width,height);
   
                   step = (ratio+4)/5;
                 for ( n = can->history; n; n = NEXT(n) ) {                  for ( n = can->history; n; n = NEXT(n) ) {
                         RealVect *rv = (RealVect *)n->body;                          RealVect *rv = (RealVect *)n->body;
                         if ( rv->len == 2 ) {                          if ( rv->len == 2 ) {
Line 146  void CChildView::OnPrint(CDC &dc) 
Line 148  void CChildView::OnPrint(CDC &dc) 
                                 x = rv->body[0]*ratio;                                  x = rv->body[0]*ratio;
                                 y = rv->body[1]*ratio;                                  y = rv->body[1]*ratio;
 //                              dc.FillRect(CRect(x,y,x+1,y+1),&brush);  //                              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 ) {                          } else if ( rv->len == 4 ) {
                                 dc.MoveTo(rv->body[0]*ratio,rv->body[1]*ratio);                                  dc.MoveTo(rv->body[0]*ratio,rv->body[1]*ratio);
                                 dc.LineTo(rv->body[2]*ratio,rv->body[3]*ratio);                                  dc.LineTo(rv->body[2]*ratio,rv->body[3]*ratio);

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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