diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-01 23:10:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-01 23:10:25 +0000 |
commit | 81abf43d2b32106102462c3fd1b6c52c0b74f6b7 (patch) | |
tree | 8ff3cf992c81a46d17219ac528c3cb6fe7467402 /Master/texmf-dist/asymptote/plain_arrows.asy | |
parent | 668f13d96ea148cade89c8813883c8b5a90cb55e (diff) |
asymptote 2.62 support files
git-svn-id: svn://tug.org/texlive/trunk@53988 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/plain_arrows.asy')
-rw-r--r-- | Master/texmf-dist/asymptote/plain_arrows.asy | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Master/texmf-dist/asymptote/plain_arrows.asy b/Master/texmf-dist/asymptote/plain_arrows.asy index d7d79217dd4..96a33dd5a44 100644 --- a/Master/texmf-dist/asymptote/plain_arrows.asy +++ b/Master/texmf-dist/asymptote/plain_arrows.asy @@ -629,3 +629,21 @@ frame[] fit(string prefix="", picture[] pictures, string format="", return fit2(pictures,all); } + +// Pad a picture to a specified size +frame pad(picture pic=currentpicture, real xsize=pic.xsize, + real ysize=pic.ysize, filltype filltype=NoFill) +{ + picture P; + size(P,xsize,ysize,IgnoreAspect); + draw(P,(0,0),invisible+thin()); + draw(P,(xsize,ysize),invisible+thin()); + add(P,pic.fit(xsize,ysize),(xsize,ysize)/2); + frame f=P.fit(); + if(filltype != NoFill) { + frame F; + filltype.fill(F,box(min(f),max(f)),invisible); + prepend(f,F); + } + return f; +} |