Skip to content

Commit

Permalink
Minor optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
johncbowman committed Jul 30, 2018
1 parent 541b401 commit 67f0c4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base/plain_boxes.asy
Expand Up @@ -131,8 +131,9 @@ frame bbox(picture pic=currentpicture,
real xmargin=0, real ymargin=xmargin,
pen p=currentpen, filltype filltype=NoFill)
{
frame f=pic.fit(max(pic.xsize-2*(xmargin+linewidth(p)),0),
max(pic.ysize-2*(ymargin+linewidth(p)),0));
real penwidth=linewidth(p);
frame f=pic.fit(max(pic.xsize-2*(xmargin+penwidth),0),
max(pic.ysize-2*(ymargin+penwidth),0));
box(f,xmargin,ymargin,p,filltype,above=false);
return f;
}

0 comments on commit 67f0c4b

Please sign in to comment.