From: W. Trevor King Date: Thu, 13 Jan 2011 12:24:40 +0000 (-0500) Subject: Add labelOffsetAdjustment to Mechanics.Angle.draw(). X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c82209cc27cfe16a30e27702c094a5bc501dc189;p=course.git Add labelOffsetAdjustment to Mechanics.Angle.draw(). For situations where the automatic positioning needs manual tweaking. --- diff --git a/asymptote/Mechanics.asy b/asymptote/Mechanics.asy index 34360ff..8bf8bf3 100644 --- a/asymptote/Mechanics.asy +++ b/asymptote/Mechanics.asy @@ -219,7 +219,8 @@ struct Angle { this.L = L; } - void draw(picture pic=currentpicture, bool rotateLabel=false) { + void draw(picture pic=currentpicture, bool rotateLabel=false, + real labelOffsetAdjustment=0) { picture picF; picture picL; bool direction; @@ -246,7 +247,7 @@ struct Angle { draw(picF, p, outline); label(pic = picF, L = rotate(degrees(label_rotate)) * L, - position = P + unit(P) * pLabelSize.y / 2); + position = P + unit(P) * (pLabelSize.y / 2 + labelOffsetAdjustment)); add(pic, picF, A); } }