diff options
Diffstat (limited to 'metapost/context/base/mpii/mp-tool.mpii')
-rw-r--r-- | metapost/context/base/mpii/mp-tool.mpii | 76 |
1 files changed, 39 insertions, 37 deletions
diff --git a/metapost/context/base/mpii/mp-tool.mpii b/metapost/context/base/mpii/mp-tool.mpii index f476361c7..a3300f5bb 100644 --- a/metapost/context/base/mpii/mp-tool.mpii +++ b/metapost/context/base/mpii/mp-tool.mpii @@ -28,7 +28,9 @@ let @## = @# ; if not known mpversion : string mpversion ; mpversion := "0.641" ; fi ; -newinternal metapostversion ; metapostversion := scantokens(mpversion) ; +% newinternal metapostversion ; metapostversion := scantokens(mpversion) ; + +newinternal metapostversion ; metapostversion := 2.0 ; % vardef mpversiongt(expr s) = % scantokens (mpversion & " > " & if numeric s : decimal s else : s fi) @@ -2661,41 +2663,41 @@ vardef undecorated (text imagedata) text decoration = enddef ; -if metapostversion < 1.770 : - - vardef decorated (text imagedata) text decoration = - save mfun_decorated_path, currentpicture ; - picture mfun_decorated_path, currentpicture ; - currentpicture := nullpicture ; - imagedata ; - mfun_decorated_path := currentpicture ; - currentpicture := nullpicture ; - for i within mfun_decorated_path : - addto currentpicture - if stroked i : - doublepath pathpart i - dashed dashpart i - withpen penpart i - withcolor colorpart i - decoration - elseif filled i : - contour pathpart i - withpen penpart i - withcolor colorpart i - decoration - elseif textual i : - also i - withcolor colorpart i - decoration - else : - also i - fi - ; - endfor ; - currentpicture - enddef ; - -else: +% if metapostversion < 1.770 : +% +% vardef decorated (text imagedata) text decoration = +% save mfun_decorated_path, currentpicture ; +% picture mfun_decorated_path, currentpicture ; +% currentpicture := nullpicture ; +% imagedata ; +% mfun_decorated_path := currentpicture ; +% currentpicture := nullpicture ; +% for i within mfun_decorated_path : +% addto currentpicture +% if stroked i : +% doublepath pathpart i +% dashed dashpart i +% withpen penpart i +% withcolor colorpart i +% decoration +% elseif filled i : +% contour pathpart i +% withpen penpart i +% withcolor colorpart i +% decoration +% elseif textual i : +% also i +% withcolor colorpart i +% decoration +% else : +% also i +% fi +% ; +% endfor ; +% currentpicture +% enddef ; +% +% else: vardef decorated (text imagedata) text decoration = save mfun_decorated_path, currentpicture ; @@ -2735,7 +2737,7 @@ else: currentpicture enddef ; -fi ; +% fi ; vardef redecorated (text imagedata) text decoration = save mfun_decorated_path, currentpicture ; |