18 Nov 2007

Official Asymptote example – strokepath

Figure 0225
(Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */
    
path g=scale(100)*unitcircle;
pen p=linewidth(1cm);

frame f;
// Equivalent to draw(f,g,p):
fill(f,strokepath(g,p),red);
shipout("strokepathframe",f);
shipped=false;

size(400);

// Equivalent to draw(g,p):
add(new void(frame f, transform t) {
    fill(f,strokepath(t*g,p),red);
  });
currentpicture.addPath(g,p);


Étiquettes : , ,