diff options
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mpiv/mp-base.mpiv | 6 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-apos.mpxl | 6 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-base.mpxl | 2 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-lmtx.mpxl | 22 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-tool.mpxl | 11 |
5 files changed, 38 insertions, 9 deletions
diff --git a/metapost/context/base/mpiv/mp-base.mpiv b/metapost/context/base/mpiv/mp-base.mpiv index 75dd4b4b0..08bd42c05 100644 --- a/metapost/context/base/mpiv/mp-base.mpiv +++ b/metapost/context/base/mpiv/mp-base.mpiv @@ -237,11 +237,13 @@ EOF = char 0 ; % end-of-file for readfrom and write..to % pen constants -pen pensquare, penrazor, penspeck ; +pen pensquare, penrazor, penspec ; pensquare = makepen(unitsquare shifted -(.5,.5)) ; penrazor = makepen((-.5,0) -- (.5,0) -- cycle) ; -penspeck = pensquare scaled eps ; +penspec = pensquare scaled eps ; + +def penspeck = penspec enddef ; % nullary operators diff --git a/metapost/context/base/mpxl/mp-apos.mpxl b/metapost/context/base/mpxl/mp-apos.mpxl index 3e7524b11..e3746540f 100644 --- a/metapost/context/base/mpxl/mp-apos.mpxl +++ b/metapost/context/base/mpxl/mp-apos.mpxl @@ -105,6 +105,8 @@ enddef ; % new interface -newscriptindex mfid_getposboxes ; mfid_getposboxes := scriptindex "getposboxes" ; +newscriptindex mfid_getposboxes ; mfid_getposboxes := scriptindex "getposboxes" ; +newscriptindex mfid_getmultipars ; mfid_getmultipars := scriptindex "getmultipars" ; -def getposboxes(expr tags, anchor) = runscript mfid_getposboxes tags anchor ; enddef ; +def getposboxes (expr tags, anchor) = runscript mfid_getposboxes tags anchor ; enddef ; +def getmultipars(expr tags, anchor) = runscript mfid_getmultipars tags anchor ; enddef ; diff --git a/metapost/context/base/mpxl/mp-base.mpxl b/metapost/context/base/mpxl/mp-base.mpxl index 430e75a62..8086ee799 100644 --- a/metapost/context/base/mpxl/mp-base.mpxl +++ b/metapost/context/base/mpxl/mp-base.mpxl @@ -895,7 +895,7 @@ defaultscale := 1 ; labeloffset := 3bp ; dotlabeldiam := 3bp ; -permanent defaultfont, defaultscale, labeloffset, dotlabeldiam ; +mutable defaultfont, defaultscale, labeloffset, dotlabeldiam ; vardef thelabel@#(expr s,z) = % Position s near z save p ; picture p ; diff --git a/metapost/context/base/mpxl/mp-lmtx.mpxl b/metapost/context/base/mpxl/mp-lmtx.mpxl index a3866dff4..93791e7c5 100644 --- a/metapost/context/base/mpxl/mp-lmtx.mpxl +++ b/metapost/context/base/mpxl/mp-lmtx.mpxl @@ -2346,3 +2346,25 @@ primarydef p scrutenized n = enddef ; permanent scrutenized ; + +% for now here + +% newscriptindex mfid_mpv_numeric ; mfid_mpv_numeric := scriptindex "mpv_numeric" ; +% newscriptindex mfid_mpv_dimension ; mfid_mpv_dimension := scriptindex "mpv_dimension" ; +% newscriptindex mfid_mpv_string ; mfid_mpv_string := scriptindex "mpv_string" ; +% +% def mpv_numeric = runscript mfid_mpv_numeric enddef ; +% def mpv_dimension = runscript mfid_mpv_dimension enddef ; +% def mpv_string = runscript mfid_mpv_string enddef ; +% +% permanent mpv_numeric, mpv_dimension, mpv_string ; + +newscriptindex mfid_mpvar ; mfid_mpvar := scriptindex "mpvar" ; + +def mpvar = runscript mfid_mpvar enddef ; + +permanent mpvar ; + +% for old times sake (metafun manual) + +vardef textual primary p = false enddef ; 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 |