summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r--Master/texmf-dist/metapost/context/base/mp-base.mpiv11
-rw-r--r--Master/texmf-dist/metapost/context/base/mp-form.mpiv2
-rw-r--r--Master/texmf-dist/metapost/context/base/mp-mlib.mpiv3
-rw-r--r--Master/texmf-dist/metapost/context/base/mp-tool.mpiv9
4 files changed, 19 insertions, 6 deletions
diff --git a/Master/texmf-dist/metapost/context/base/mp-base.mpiv b/Master/texmf-dist/metapost/context/base/mp-base.mpiv
index 0b655ef479a..94379050bc8 100644
--- a/Master/texmf-dist/metapost/context/base/mp-base.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mp-base.mpiv
@@ -714,10 +714,10 @@ enddef ;
def pen_pickup_ primary q =
currentpen := q ;
- pen_lft :=xpart penoffset down of currentpen ;
- pen_rt :=xpart penoffset up of currentpen ;
- pen_top :=ypart penoffset left of currentpen ;
- pen_bot :=ypart penoffset right of currentpen ;
+ pen_lft := xpart penoffset down of currentpen ;
+ pen_rt := xpart penoffset up of currentpen ;
+ pen_top := ypart penoffset left of currentpen ;
+ pen_bot := ypart penoffset right of currentpen ;
path currentpen_path ;
enddef ;
@@ -733,7 +733,8 @@ vardef savepen =
pen_count_
enddef ;
-def clearpen = currentpen:=nullpen;
+def clearpen =
+ currentpen := nullpen;
pen_lft := pen_rt := pen_top := pen_bot := 0 ;
path currentpen_path ;
enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mp-form.mpiv b/Master/texmf-dist/metapost/context/base/mp-form.mpiv
index b58792e1a01..88b15e09796 100644
--- a/Master/texmf-dist/metapost/context/base/mp-form.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mp-form.mpiv
@@ -27,4 +27,4 @@ string Fmfont_ ; Fmfont_ := "crap" ;
vardef mfun_format_number(expr fmt, i) =
"\ctxlua{metapost.formatnumber('" & fmt & "'," & if string i : i else : decimal i fi & ")}"
-enddef
+enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mp-mlib.mpiv b/Master/texmf-dist/metapost/context/base/mp-mlib.mpiv
index 252cd5fd06e..56815028e8f 100644
--- a/Master/texmf-dist/metapost/context/base/mp-mlib.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mp-mlib.mpiv
@@ -783,6 +783,9 @@ enddef ;
% passvariable("boolean",false) ;
% passvariable("path",fullcircle scaled 1cm) ;
+% we could use the new lua interface but there is not that much gain i.e.
+% we still need to serialize
+
vardef mfun_point_to_string(expr p,i) =
decimal xpart (point i of p) & " " &
decimal ypart (point i of p) & " " &
diff --git a/Master/texmf-dist/metapost/context/base/mp-tool.mpiv b/Master/texmf-dist/metapost/context/base/mp-tool.mpiv
index 4ca2ea0f93d..7845467a46c 100644
--- a/Master/texmf-dist/metapost/context/base/mp-tool.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mp-tool.mpiv
@@ -628,6 +628,15 @@ ultriangle := origin -- (0,+.5) -- (-.5,0) -- cycle ;
lltriangle := origin -- (-.5,0) -- (0,-.5) -- cycle ;
lrtriangle := origin -- (0,-.5) -- (+.5,0) -- cycle ;
+path triangle, uptriangle, downtriangle, lefttriangle, righttriangle ;
+
+triangle := (1,0) -- (1,0) rotated 120 -- (1,0) rotated -120 -- cycle ;
+
+uptriangle := triangle rotated 90 ;
+downtriangle := triangle rotated -90 ;
+lefttriangle := triangle rotated 180 ;
+righttriangle := triangle ;
+
path unitdiamond, fulldiamond ;
unitdiamond := (.5,0) -- (1,.5) -- (.5,1) -- (0,.5) -- cycle ;