summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2015-01-13 16:15:03 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2015-01-13 16:15:03 +0100
commit9038785580cd32664ad91b25a2e564899fc2651e (patch)
tree9204bb96be954a717395f0b61e9f12138fc1a36e /metapost
parenta72850024a910d5f83e76d26137403666b3c7902 (diff)
downloadcontext-9038785580cd32664ad91b25a2e564899fc2651e.tar.gz
2015-01-13 15:56:00
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mp-func.mpiv15
-rw-r--r--metapost/context/base/mp-tool.mpiv19
2 files changed, 9 insertions, 25 deletions
diff --git a/metapost/context/base/mp-func.mpiv b/metapost/context/base/mp-func.mpiv
index 58df711f2..1ff330038 100644
--- a/metapost/context/base/mp-func.mpiv
+++ b/metapost/context/base/mp-func.mpiv
@@ -31,16 +31,17 @@ vardef mfun_function (expr f) (expr u, t, b, e, s) =
for xx := b step s until e :
hide (x := xx ;)
if xx > b :
- scantokens(mfun_pathconnectors[f])
+ scantokens(mfun_pathconnectors[f])
fi
(scantokens(u),scantokens(t))
endfor
enddef ;
-def function = mfun_function enddef ; % let doesn't work here
-def punkedfunction = mfun_function (1) enddef ;
-def curvedfunction = mfun_function (2) enddef ;
-def tightfunction = mfun_function (3) enddef ;
+def function = mfun_function enddef ; % let doesn't work here
+def straightfunction = mfun_function (1) enddef ;
+def punkedfunction = mfun_function (1) enddef ;
+def curvedfunction = mfun_function (2) enddef ;
+def tightfunction = mfun_function (3) enddef ;
vardef mfun_constructedpath (expr f) (text t) =
save ok ; boolean ok ; ok := false ;
@@ -55,6 +56,7 @@ vardef mfun_constructedpath (expr f) (text t) =
enddef ;
def constructedpath = mfun_constructedpath enddef ; % let doesn't work here
+def straightpath = mfun_constructedpath (1) enddef ;
def punkedpath = mfun_constructedpath (1) enddef ;
def curvedpath = mfun_constructedpath (2) enddef ;
def tightpath = mfun_constructedpath (3) enddef ;
@@ -71,8 +73,7 @@ vardef mfun_constructedpairs (expr f) (text p) =
enddef ;
def constructedpairs = mfun_constructedpairs enddef ; % let doesn't work here
+def straightpairs = mfun_constructedpairs (1) enddef ;
def punkedpairs = mfun_constructedpairs (1) enddef ;
def curvedpairs = mfun_constructedpairs (2) enddef ;
def tightpairs = mfun_constructedpairs (3) enddef ;
-
-
diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mp-tool.mpiv
index e083a5b18..bf7f2bccb 100644
--- a/metapost/context/base/mp-tool.mpiv
+++ b/metapost/context/base/mp-tool.mpiv
@@ -2043,7 +2043,7 @@ enddef ;
% handy
def withgray primary g =
- withcolor (g,g,g)
+ withcolor g
enddef ;
% for metafun
@@ -2279,23 +2279,6 @@ primarydef p ystretched h = (
p if (bbheight(p)>0) and (h>0) : yscaled (h/bbheight(p)) fi
) enddef ;
-primarydef p snapped s =
- hide (
- if path p :
- forever :
- exitif (bbheight(p) <= s) and (bbwidth(p) <= s) ;
- p := p scaled (1/2) ;
- endfor ;
- elseif numeric p :
- forever :
- exitif p <= s ;
- p := p scaled (1/2) ;
- endfor ;
- fi ;
- )
- p
-enddef ;
-
%D Newer:
vardef area expr p =