From c82209cc27cfe16a30e27702c094a5bc501dc189 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 13 Jan 2011 07:24:40 -0500 Subject: [PATCH] Add labelOffsetAdjustment to Mechanics.Angle.draw(). For situations where the automatic positioning needs manual tweaking. --- asymptote/Mechanics.asy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } } -- 2.26.2