Skip to content

Commit

Permalink
Initial add. DXF test case for n*8192 multiple byte truncated file cr…
Browse files Browse the repository at this point in the history
…eation.
  • Loading branch information
clothbot committed Aug 20, 2010
1 parent feae234 commit 260c889
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/DXFTest/DXFTest.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// DXF Tests.
// - creates DXF files.
// - bug in Mac OS X (and others?) makes dxf n*8192 byte truncated files=

import processing.dxf.*;

PGraphics pgDxf;

void setup() {
size(screen.width/2, screen.height/2, P2D);
background(153);
}

void draw() {
noLoop();
for(int count=0;count<10;count++) {
background(153);
pgDxf=createGraphics(screen.width/2,screen.height/2,DXF,"DXF.createGraphics."+count+".dxf");
pgDxf.beginDraw();
for(int i=0;i<count;i++) {
for(int j=0;j<100;j++) {
pgDxf.line(2*i,2*j,2*(i+1),2*(j+1));
line(2*i,2*j,2*(i+1),2*(j+1));
}
}
pgDxf.endDraw();
}
}

0 comments on commit 260c889

Please sign in to comment.