diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-04-27 00:21:27 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-04-27 00:21:27 +0200 |
commit | dc28d14e7a7774340b8929572f24517a14bf0ebd (patch) | |
tree | ebf3364df285341ffee6c5dfb1d24d008972b502 /metapost | |
parent | 4668b7323a6bc1b01e72418fb646b697d68bbcb7 (diff) | |
download | context-dc28d14e7a7774340b8929572f24517a14bf0ebd.tar.gz |
2016-04-27 00:05:00
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mpiv/mp-luas.mpiv | 4 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-tool.mpiv | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/metapost/context/base/mpiv/mp-luas.mpiv b/metapost/context/base/mpiv/mp-luas.mpiv index c919ba215..c30798247 100644 --- a/metapost/context/base/mpiv/mp-luas.mpiv +++ b/metapost/context/base/mpiv/mp-luas.mpiv @@ -56,7 +56,7 @@ vardef mlib_luas_luacall(text t) = elseif numeric s : & decimal s elseif boolean s : - & if s : "true" else "false" fi + & if s : "true" else : "false" fi fi endfor ) enddef ; @@ -74,7 +74,7 @@ vardef mlib_luas_lualist(expr c)(text t) = elseif numeric s : & decimal s elseif boolean s : - & if s : "true" else "false" fi + & if s : "true" else : "false" fi fi endfor & ")" ) enddef ; diff --git a/metapost/context/base/mpiv/mp-tool.mpiv b/metapost/context/base/mpiv/mp-tool.mpiv index 05f9d9edc..7696eb372 100644 --- a/metapost/context/base/mpiv/mp-tool.mpiv +++ b/metapost/context/base/mpiv/mp-tool.mpiv @@ -330,6 +330,11 @@ vardef set_outer_boundingbox text q = % obsolete setbounds q to outerboundingbox q; enddef; +% secondarydef a boundedto b = % will this cleanup ? +% hide(picture mfun_a_b ; mfun_a_b := a ; setbounds mfun_a_b to b;) +% mfun_a_b +% enddef ; + %D Some missing functions can be implemented rather straightforward (thanks to %D Taco and others): @@ -876,6 +881,12 @@ primarydef p rightenlarged d = ( llcorner p -- (lrcorner p) shifted (d,0) -- (u primarydef p topenlarged d = ( llcorner p -- lrcorner p -- (urcorner p) shifted (0,d) -- (ulcorner p) shifted (0,d) -- cycle ) enddef ; primarydef p bottomenlarged d = ( llcorner p shifted (0,-d) -- lrcorner p shifted (0,-d) -- urcorner p -- ulcorner p -- cycle ) enddef ; +%D Handy as stepper: + +vardef rotation(expr i, n) = + if (n == 0) : 0 else : i * 360 / n fi +enddef ; + %D Handy for testing/debugging: primarydef p crossed d = ( |