From 3470f9c8287a1a28fba72a83038cd54ab64c6da9 Mon Sep 17 00:00:00 2001
From: Marius <mariausol@gmail.com>
Date: Sun, 6 May 2012 23:00:14 +0300
Subject: beta 2012.05.06 21:53

---
 .../lexers/data/scite-context-data-metafun.lua     |   2 +-
 .../scite/scite-context-data-metafun.properties    |  14 ++++-----
 metapost/context/base/mp-mlib.mpiv                 |  35 ++++++++++-----------
 metapost/context/base/mp-tool.mpiv                 |  17 ++++++++--
 tex/context/base/cont-new.mkii                     |   2 +-
 tex/context/base/cont-new.mkiv                     |   2 +-
 tex/context/base/context-version.pdf               | Bin 4065 -> 4071 bytes
 tex/context/base/context-version.png               | Bin 105265 -> 105736 bytes
 tex/context/base/context.mkii                      |   2 +-
 tex/context/base/context.mkiv                      |   2 +-
 tex/context/base/mlib-pps.mkiv                     |   6 ++--
 tex/context/base/status-files.pdf                  | Bin 24310 -> 24305 bytes
 tex/context/base/status-lua.pdf                    | Bin 173198 -> 173206 bytes
 tex/generic/context/luatex/luatex-fonts-merged.lua |   2 +-
 14 files changed, 48 insertions(+), 36 deletions(-)

diff --git a/context/data/scite/lexers/data/scite-context-data-metafun.lua b/context/data/scite/lexers/data/scite-context-data-metafun.lua
index 6f6e3f422..749be7663 100644
--- a/context/data/scite/lexers/data/scite-context-data-metafun.lua
+++ b/context/data/scite/lexers/data/scite-context-data-metafun.lua
@@ -1,4 +1,4 @@
 return {
- ["commands"]={ "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "acosh", "asinh", "sinh", "cosh", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", "withshading", "shadedinto", "withcircularshade", "withlinearshade", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "withmask", "figure", "register", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "transparent", "withtransparency", "asgroup", "infont", "set_linear_vector", "linear_shade", "define_linear_shade", "define_circular_linear_shade", "define_sampled_linear_shade", "set_circular_vector", "circular_shade", "define_circular_shade", "define_circular_linear_shade", "define_sampled_circular_shade", "space", "CRLF", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedpath", "constructedpairs", "punkedfunction", "curvedfunction", "tightfunction", "punkedpath", "curvedpath", "tightpath", "punkedpairs", "curvedpairs", "tightpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "normalfill", "normaldraw", "visualizepaths", "naturalizepaths", "drawboundary", "drawwholepath", "visualizeddraw", "visualizedfill", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions" },
+ ["commands"]={ "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "acosh", "asinh", "sinh", "cosh", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", "withshading", "shadedinto", "withcircularshade", "withlinearshade", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "withmask", "figure", "register", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "transparent", "withtransparency", "asgroup", "infont", "set_linear_vector", "linear_shade", "define_linear_shade", "define_circular_linear_shade", "define_sampled_linear_shade", "set_circular_vector", "circular_shade", "define_circular_shade", "define_circular_linear_shade", "define_sampled_circular_shade", "space", "CRLF", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedpath", "constructedpairs", "punkedfunction", "curvedfunction", "tightfunction", "punkedpath", "curvedpath", "tightpath", "punkedpairs", "curvedpairs", "tightpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "normalfill", "normaldraw", "visualizepaths", "naturalizepaths", "drawboundary", "drawwholepath", "visualizeddraw", "visualizedfill", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions" },
  ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "textextoffset", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent" },
 }
\ No newline at end of file
diff --git a/context/data/scite/scite-context-data-metafun.properties b/context/data/scite/scite-context-data-metafun.properties
index 753dcf3e6..e0413b2dd 100644
--- a/context/data/scite/scite-context-data-metafun.properties
+++ b/context/data/scite/scite-context-data-metafun.properties
@@ -43,11 +43,11 @@ infinite break xstretched ystretched snapped \
 pathconnectors function constructedpath constructedpairs punkedfunction \
 curvedfunction tightfunction punkedpath curvedpath tightpath \
 punkedpairs curvedpairs tightpairs evenly oddly \
-condition pushcurrentpicture popcurrentpicture tensecircle roundedsquare \
-colortype whitecolor blackcolor normalfill normaldraw \
-visualizepaths naturalizepaths drawboundary drawwholepath visualizeddraw \
-visualizedfill draworigin drawboundingbox drawpath drawpoint \
-drawpoints drawcontrolpoints drawcontrollines drawpointlabels drawlineoptions \
-drawpointoptions drawcontroloptions drawlabeloptions draworiginoptions drawboundoptions \
-drawpathoptions resetdrawoptions 
+condition pushcurrentpicture popcurrentpicture arrowpath tensecircle \
+roundedsquare colortype whitecolor blackcolor normalfill \
+normaldraw visualizepaths naturalizepaths drawboundary drawwholepath \
+visualizeddraw visualizedfill draworigin drawboundingbox drawpath \
+drawpoint drawpoints drawcontrolpoints drawcontrollines drawpointlabels \
+drawlineoptions drawpointoptions drawcontroloptions drawlabeloptions draworiginoptions \
+drawboundoptions drawpathoptions resetdrawoptions 
 
diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv
index f89e7a491..ef3408198 100644
--- a/metapost/context/base/mp-mlib.mpiv
+++ b/metapost/context/base/mp-mlib.mpiv
@@ -596,22 +596,21 @@ enddef ;
 
 primarydef t asgroup s = % s = isolated|knockout
     begingroup
-    save savedpicture ;
-    picture savedpicture ;
-    save currentbounds ;
-    path currentbounds ;
-    savedpicture := if picture t : t else : image(draw t) fi ;
-    currentbounds := boundingbox savedpicture ;
-    image (
-        draw currentbounds
-            withprescript "gr_state=start"
-            withprescript "gr_type=" & s
-            withprescript "gr_llx=" & decimal xpart llcorner currentbounds
-            withprescript "gr_lly=" & decimal ypart llcorner currentbounds
-            withprescript "gr_urx=" & decimal xpart urcorner currentbounds
-            withprescript "gr_ury=" & decimal ypart urcorner currentbounds ;
-        draw savedpicture ;
-        draw currentbounds
-            withprescript "gr_state=stop" ;
-    ) endgroup
+    save grouppicture, wrappedpicture, groupbounds ;
+    picture grouppicture, wrappedpicture ; path groupbounds ;
+    grouppicture := if picture t : t else : image(draw t) fi ;
+    groupbounds := boundingbox grouppicture ;
+    wrappedpicture:= nullpicture ;
+    addto wrappedpicture contour groupbounds
+        withprescript "gr_state=start"
+        withprescript "gr_type=" & s
+        withprescript "gr_llx=" & decimal xpart llcorner groupbounds
+        withprescript "gr_lly=" & decimal ypart llcorner groupbounds
+        withprescript "gr_urx=" & decimal xpart urcorner groupbounds
+        withprescript "gr_ury=" & decimal ypart urcorner groupbounds ;
+    addto wrappedpicture also grouppicture ;
+    addto wrappedpicture contour groupbounds
+        withprescript "gr_state=stop" ;
+    wrappedpicture
+    endgroup
 enddef ;
diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mp-tool.mpiv
index d52820d13..39449b511 100644
--- a/metapost/context/base/mp-tool.mpiv
+++ b/metapost/context/base/mp-tool.mpiv
@@ -1144,15 +1144,26 @@ enddef ;
 %D The next two macros are adapted versions of plain
 %D \METAPOST\ definitions.
 
+vardef arrowpath expr p = % patch by Peter Rolf: supports squared pen and shifting (hh: maybe just use center of head as first)
+    (p cutafter makepath(pencircle scaled 2(ahlength*cosd(.5ahangle)) shifted point length p of p))
+enddef;
+
+% def _finarr text t =
+%     if autoarrows : set_ahlength (t) fi ;
+%     draw     arrowpath _apth t ; % arrowpath added
+%     filldraw arrowhead _apth t ;
+% enddef;
+
 def _finarr text t =
     if autoarrows : set_ahlength (t) fi ;
-    draw               _apth t ;
-    filldraw arrowhead _apth t ;
+    draw arrowpath _apth t ; % arrowpath added
+    fill arrowhead _apth t ;
+    draw arrowhead _apth t ;
 enddef;
 
 def _findarr text t =
     if autoarrows : set_ahlength (t) fi ;
-    draw                   _apth                    t ;
+    draw arrowpath         _apth                    t ;
     fill arrowhead         _apth withpen currentpen t ;
     fill arrowhead reverse _apth withpen currentpen t ;
 enddef ;
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 0465870a8..f9ca34b97 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
 %C details.
 
-\newcontextversion{2012.05.05 13:20}
+\newcontextversion{2012.05.06 21:53}
 
 %D This file is loaded at runtime, thereby providing an
 %D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index f77ac2a53..3e3df80b8 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
 %C details.
 
-\newcontextversion{2012.05.05 13:20}
+\newcontextversion{2012.05.06 21:53}
 
 %D This file is loaded at runtime, thereby providing an
 %D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 325c833fd..55a7f5e2e 100644
Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 46f1d7e81..36eefb786 100644
Binary files a/tex/context/base/context-version.png and b/tex/context/base/context-version.png differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index ba093fdc7..8dfcf312d 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
 %D your styles an modules.
 
 \edef\contextformat {\jobname}
-\edef\contextversion{2012.05.05 13:20}
+\edef\contextversion{2012.05.06 21:53}
 
 %D For those who want to use this:
 
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 5f858c499..a8be45840 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -23,7 +23,7 @@
 %D up and the dependencies are more consistent.
 
 \edef\contextformat {\jobname}
-\edef\contextversion{2012.05.05 13:20}
+\edef\contextversion{2012.05.06 21:53}
 
 %D For those who want to use this:
 
diff --git a/tex/context/base/mlib-pps.mkiv b/tex/context/base/mlib-pps.mkiv
index 4a6b89909..cb6120066 100644
--- a/tex/context/base/mlib-pps.mkiv
+++ b/tex/context/base/mlib-pps.mkiv
@@ -124,14 +124,16 @@
 
 \def\doMPLIBstopgroup#1#2#3#4#5#6% some day this might happen elsewhere
   {\egroup
-   \wd\scratchbox \dimexpr#5\onebasepoint-#3\onebasepoint\relax
+   \setbox\scratchbox\hbox{\hskip\onebasepoint\box\scratchbox}% weird correction
+   \wd\scratchbox \dimexpr#5\onebasepoint-#3\onebasepoint+2\onebasepoint\relax
    \ht\scratchbox #6\onebasepoint
    \dp\scratchbox-#4\onebasepoint
    \pdfxform
      attr      {/Group << /S /Transparency /I \ifnum#1=1 true \else false \fi /K \ifnum#1=1 true \else false \fi >>}
      resources {\pdfbackendcurrentresources}
      \scratchbox
-   \setbox\scratchbox\hbox\bgroup\pdfrefxform\pdflastxform\egroup
+   \setbox\scratchbox\hbox\bgroup\hskip-\onebasepoint\pdfrefxform\pdflastxform\egroup
+   \setbox\scratchbox\hbox\bgroup\hskip-\onebasepoint\pdfrefxform\pdflastxform\egroup
    \wd\scratchbox\zeropoint
    \ht\scratchbox\zeropoint
    \dp\scratchbox\zeropoint
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 4bae51be9..4ffaf6620 100644
Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 9b404f7d2..88e501874 100644
Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 89fa50f3f..9f4443649 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
 -- merged file : luatex-fonts-merged.lua
 -- parent file : luatex-fonts.lua
--- merge date  : 05/05/12 13:20:11
+-- merge date  : 05/06/12 21:53:04
 
 do -- begin closure to overcome local limits and interference
 
-- 
cgit v1.2.3