
| Current Path : /proc/thread-self/root/usr/share/asymptote/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //proc/thread-self/root/usr/share/asymptote/labelpath.asy |
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);
}