From 81abf43d2b32106102462c3fd1b6c52c0b74f6b7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 1 Mar 2020 23:10:25 +0000 Subject: asymptote 2.62 support files git-svn-id: svn://tug.org/texlive/trunk@53988 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/asymptote/plain_arrows.asy | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Master/texmf-dist/asymptote/plain_arrows.asy') 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; +} -- cgit v1.2.3