From 752012c605d34cd943795527a9738475a6958fcc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 7 Apr 2013 18:19:31 +0000 Subject: texmf -> texmf-dist: start with unique dirs from texmf git-svn-id: svn://tug.org/texlive/trunk@29712 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/asymptote/labelpath.asy | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Master/texmf-dist/asymptote/labelpath.asy (limited to 'Master/texmf-dist/asymptote/labelpath.asy') diff --git a/Master/texmf-dist/asymptote/labelpath.asy b/Master/texmf-dist/asymptote/labelpath.asy new file mode 100644 index 00000000000..39c1908efd3 --- /dev/null +++ b/Master/texmf-dist/asymptote/labelpath.asy @@ -0,0 +1,28 @@ +usepackage("pstricks"); +usepackage("pst-text"); + +string LeftJustified="l"; +string RightJustified="r"; +string Centered="c"; + +void labelpath(frame f, Label L, path g, string justify=Centered, + pen p=currentpen) +{ + if(latex() && !pdf()) { + _labelpath(f,L.s,L.size,g,justify,(L.T.x,L.T.y+0.5linewidth(p)),p); + return; + } + warning("labelpathlatex","labelpath requires -tex latex"); +} + +void labelpath(picture pic=currentpicture, Label L, path g, + string justify=Centered, pen p=currentpen) +{ + pic.add(new void(frame f, transform t) { + labelpath(f,L,t*g,justify,p); + }); + frame f; + label(f,Label(L.s,L.size)); + real w=size(f).y+L.T.y+0.5linewidth(p); + pic.addBox(min(g),max(g),-w,w); +} -- cgit v1.2.3