The R Project SVN R

Rev

Rev 32748 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32748 Rev 34215
Line 215... Line 215...
215
	else
215
	else
216
	    gpen = ExtCreatePen(PS_GEOMETRIC|PS_SOLID|lend|ljoin,
216
	    gpen = ExtCreatePen(PS_GEOMETRIC|PS_SOLID|lend|ljoin,
217
				width, &lb, 0, NULL);
217
				width, &lb, 0, NULL);
218
	SelectObject(dc, gpen);
218
	SelectObject(dc, gpen);
219
	SetROP2(dc, R2_COPYPEN);
219
	SetROP2(dc, R2_COPYPEN);
-
 
220
	npieces = 0;
220
	BeginPath(dc);
221
	BeginPath(dc);
221
        MoveToEx(dc, p[0].x, p[0].y, NULL);
222
        MoveToEx(dc, p[0].x, p[0].y, NULL);
222
        for (i = 1; i < n ; i++)
223
        for (i = 1; i < n ; i++) {
223
	      LineTo(dc, p[i].x, p[i].y);
224
	    LineTo(dc, p[i].x, p[i].y);
-
 
225
	    npieces++;
-
 
226
	    if(npieces > 1000) {
-
 
227
		EndPath(dc);
-
 
228
		StrokePath(dc);
-
 
229
		npieces = 0;
-
 
230
		BeginPath(dc);
-
 
231
	    }
-
 
232
	}
224
        if (closepath) LineTo(dc, p[0].x, p[0].y);
233
        if (closepath) LineTo(dc, p[0].x, p[0].y);
225
	EndPath(dc);
234
	EndPath(dc);
226
	StrokePath(dc);
235
	StrokePath(dc);
227
	SelectObject(dc, GetStockObject(NULL_PEN));
236
	SelectObject(dc, GetStockObject(NULL_PEN));
228
	DeleteObject(gpen);
237
	DeleteObject(gpen);
Line 256... Line 265...
256
	      tmp = tmpx*tmpx + tmpy*tmpy;
265
	      tmp = tmpx*tmpx + tmpy*tmpy;
257
	      a.len2 = a.len2 + tmp - 2*sqrt((double)(tmp*a.len2));
266
	      a.len2 = a.len2 + tmp - 2*sqrt((double)(tmp*a.len2));
258
	      a.curx = p[i].x;
267
	      a.curx = p[i].x;
259
	      a.cury = p[i].y;
268
	      a.cury = p[i].y;
260
	  }
269
	  }
-
 
270
	  npieces++;
261
	  if(npieces > 5000) {
271
	  if(npieces > 1000) {
262
	      EndPath(dc);
272
	      EndPath(dc);
263
	      StrokePath(dc);
273
	      StrokePath(dc);
264
	      npieces = 0;
274
	      npieces = 0;
265
	      BeginPath(dc);
275
	      BeginPath(dc);
266
	  }
276
	  }