diff options
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mpiv/mp-base.mpiv | 11 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-mlib.mpiv | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/metapost/context/base/mpiv/mp-base.mpiv b/metapost/context/base/mpiv/mp-base.mpiv index 0cc209302..95d1e8d11 100644 --- a/metapost/context/base/mpiv/mp-base.mpiv +++ b/metapost/context/base/mpiv/mp-base.mpiv @@ -250,7 +250,7 @@ vardef whatever = ? enddef ; -% unary operators +% unary operators (with patched round) let abs = length ; @@ -258,7 +258,14 @@ vardef round primary u = if numeric u : floor(u+.5) elseif pair u : - (round xpart u, round ypart u) + (floor(xpart u+.5), floor(ypart u+.5)) + elseif path u : + % added by HH + for i=0 upto length u-1 : + round(point i of u) .. + controls round(postcontrol i of u) and round(precontrol i+1 of u) .. + endfor + if cycle u : cycle else : point infinity of u fi else : u fi diff --git a/metapost/context/base/mpiv/mp-mlib.mpiv b/metapost/context/base/mpiv/mp-mlib.mpiv index 4308111d0..a1517ea61 100644 --- a/metapost/context/base/mpiv/mp-mlib.mpiv +++ b/metapost/context/base/mpiv/mp-mlib.mpiv @@ -180,6 +180,8 @@ extra_beginfig := extra_beginfig & "mfun_reset_tex_texts ;" ; boolean mfun_onetime_textext ; mfun_onetime_textext := false ; +def notcached = withprescript "tx_cache=no" enddef ; + if mfun_use_one_pass : % todo: onetime |