diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-02-18 11:28:41 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-02-18 11:28:41 +0100 |
commit | 298afdcdcb9d3c88fcc9abdbf17ac66f2f5006a1 (patch) | |
tree | 44bbefa57072479622fa253684ec3cb96258255f /metapost/context/base/mpxl/mp-tool.mpxl | |
parent | 84aae20fa32c9a50ae1c63576573f52d010de43b (diff) | |
download | context-298afdcdcb9d3c88fcc9abdbf17ac66f2f5006a1.tar.gz |
2021-02-18 10:24:00
Diffstat (limited to 'metapost/context/base/mpxl/mp-tool.mpxl')
-rw-r--r-- | metapost/context/base/mpxl/mp-tool.mpxl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/metapost/context/base/mpxl/mp-tool.mpxl b/metapost/context/base/mpxl/mp-tool.mpxl index 59b29c148..1d515ffc8 100644 --- a/metapost/context/base/mpxl/mp-tool.mpxl +++ b/metapost/context/base/mpxl/mp-tool.mpxl @@ -1446,7 +1446,8 @@ vardef arrowhead expr p = enddef ; vardef drawarrowpath expr p = - save autoarrows ; boolean autoarrows ; autoarrows := true ; +% save autoarrows ; boolean autoarrows ; autoarrows := true ; + interim autoarrows := true ; drawarrow p mfun_opt_pth enddef ; @@ -1455,8 +1456,8 @@ def midarrowhead expr p = enddef ; vardef arrowheadonpath (expr p, s) = - save autoarrows ; boolean autoarrows ; - autoarrows := true ; +% save autoarrows ; boolean autoarrows ; + interim autoarrows := true ; set_ahlength(scaled ahfactor) ; % added arrowhead p if s < 1 : cutafter (point (s*arclength(p) + (ahlength/2)) on p) fi enddef ; @@ -1709,9 +1710,11 @@ extra_beginfig := extra_beginfig & " linecap := rounded ; " ; % restores %D Normally, arrowheads don't scale well. So we provide a hack. -boolean autoarrows ; autoarrows := false ; % todo: newinternal boolean autoarrows ; +% boolean autoarrows ; autoarrows := false ; % todo: newinternal boolean autoarrows ; numeric ahfactor ; ahfactor := 2.5 ; % todo: newinternal ahfactor ; +newinternal boolean autoarrows ; + permanent ahfactor, ahlength, autoarrows ; def set_ahlength (text t) = % called to often |