diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2009-11-25 21:47:49 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2009-11-25 21:47:49 +0000 |
commit | 10448afa6c23c9403daf4f67ebd5d01b556b531a (patch) | |
tree | 3b3708480f44540b1e076379209c8dea7a098f88 /Master/texmf-dist/metafont | |
parent | 69aadba877d0390d6f7305803b6bb80bd5251c0d (diff) |
mfpic update (1.02 2009/10/29)
Also prevent ctan2tds from using MAKEflatten with a tds-ready tree.
git-svn-id: svn://tug.org/texlive/trunk@16164 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metafont')
-rw-r--r-- | Master/texmf-dist/metafont/mfpic/grafbase.mf | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/Master/texmf-dist/metafont/mfpic/grafbase.mf b/Master/texmf-dist/metafont/mfpic/grafbase.mf index 2532e17cc3c..e3f6e5632b8 100644 --- a/Master/texmf-dist/metafont/mfpic/grafbase.mf +++ b/Master/texmf-dist/metafont/mfpic/grafbase.mf @@ -22,7 +22,7 @@ %% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost. %% %%% File: grafbase.dtx -%%% A part of mfpic 1.00 2009/09/22 +%%% A part of mfpic 1.02 2009/10/29 %%% if (known grafbaseversion) or (known grafbase): message "Grafbase (" & jobname & "): You have loaded grafbase more " @@ -32,7 +32,7 @@ fi boolean grafbase; grafbase := true; string fileversion, filedate; -fileversion := "1.00"; filedate := "2009/09/22"; +fileversion := "1.02"; filedate := "2009/10/29"; message " Loading grafbase macros, version " & fileversion & " " & filedate & "."; @@ -59,7 +59,7 @@ def checkversions (expr g)= fi enddef; -checkversions (100); +checkversions (102); if unknown base_name : input plain; elseif not string base_name: input plain; @@ -1860,17 +1860,27 @@ def axes (expr hlen) = xaxis (hlen); yaxis (hlen); enddef; laxis := baxis := raxis := taxis := 0; -vardef axisline.x = (xneg + laxis, 0)--(xpos - raxis, 0) enddef; -vardef axisline.y = (0, yneg + baxis)--(0, ypos - taxis) enddef; -vardef axisline.l = axisline.y shifted (xneg + laxis, 0) enddef; -vardef axisline.b = axisline.x shifted (0, yneg + baxis) enddef; -vardef axisline.r = axisline.y shifted (xpos - raxis, 0) enddef; -vardef axisline.t = axisline.x shifted (0, ypos - taxis) enddef; +vardef xlow = xneg + laxis enddef; +vardef xhigh = xpos - raxis enddef; +vardef ylow = yneg + baxis enddef; +vardef yhigh = ypos - taxis enddef; + +vardef axisline.x = (xlow, 0)--(xhigh, 0) enddef; +vardef axisline.y = (0, ylow)--(0, yhigh) enddef; +vardef axisline.l = axisline.y shifted (xlow, 0) enddef; +vardef axisline.b = axisline.x shifted (0, ylow) enddef; +vardef axisline.r = axisline.y shifted (xhigh, 0) enddef; +vardef axisline.t = axisline.x shifted (0, yhigh) enddef; vardef axis@# (expr len) = headpath (len, 0, 0) axisline@# enddef; vardef borderrect = - rect((xneg+laxis,yneg+baxis),(xpos-raxis,ypos-taxis)) + rect((xlow,ylow),(xhigh,yhigh)) +enddef; + +vardef inbounds (expr Z) = + (xpart Z >= xlow ) and (ypart Z >= ylow ) and + (xpart Z <= xhigh) and (ypart Z <= yhigh) enddef; numeric inside, outside, centered, onleft, onright, ontop, onbottom; @@ -1898,10 +1908,10 @@ enddef; def xmarks = axismarks ( 90, xtick, origin, right) enddef; def ymarks = axismarks (-90, ytick, origin, up) enddef; -def lmarks = axismarks (-90, ltick, (xneg + laxis, 0), up) enddef; -def bmarks = axismarks ( 90, btick, (0, yneg + baxis), right) enddef; -def rmarks = axismarks ( 90, rtick, (xpos - raxis, 0), up) enddef; -def tmarks = axismarks (-90, ttick, (0, ypos - taxis), right) enddef; +def lmarks = axismarks (-90, ltick, (xlow, 0), up) enddef; +def bmarks = axismarks ( 90, btick, (0, ylow), right) enddef; +def rmarks = axismarks ( 90, rtick, (xhigh, 0), up) enddef; +def tmarks = axismarks (-90, ttick, (0, yhigh), right) enddef; path griddotpath; griddotpath := fullcircle; def grid = vargrid (0.5bp) enddef; @@ -1909,8 +1919,8 @@ vardef vargrid (expr dsize, xsp, ysp) = save gdot, gridpic; picture gdot, gridpic; gdot := setdot (griddotpath, dsize); gridpic := nullpicture; - for n = ceiling ((xneg + laxis)/xsp) upto floor ((xpos - raxis)/xsp): - for m = ceiling ((yneg + baxis)/ysp) upto floor ((ypos - taxis)/ysp): + for n = ceiling ((xlow)/xsp) upto floor ((xhigh)/xsp): + for m = ceiling ((ylow)/ysp) upto floor ((yhigh)/ysp): picdot (gridpic, gdot, zconv ((n*xsp, m*ysp))); endfor endfor @@ -1919,13 +1929,13 @@ enddef; def vgrid = vargrid enddef; def hgridlines (expr ysp) = - for n = ceiling ((yneg + baxis)/ysp) upto floor ((ypos - taxis)/ysp): - safedraw zconv ((xneg + laxis, n*ysp)--(xpos - raxis, n*ysp)); + for n = ceiling ((ylow)/ysp) upto floor ((yhigh)/ysp): + safedraw zconv ((xlow, n*ysp)--(xhigh, n*ysp)); endfor enddef; def vgridlines (expr xsp) = - for n = ceiling ((xneg + laxis)/xsp) upto floor ((xpos - raxis)/xsp): - safedraw zconv ((n*xsp, yneg + baxis)--(n*xsp, ypos - taxis)); + for n = ceiling ((xlow)/xsp) upto floor ((xhigh)/xsp): + safedraw zconv ((n*xsp, ylow)--(n*xsp, yhigh)); endfor enddef; def gridlines (expr xsp, ysp) = @@ -1940,8 +1950,8 @@ def vectorfield (expr len, xsp, ysp) (text fcn) (text cond) = enddef; vardef mkvectorfield (expr len, xsp, ysp) (suffix vf, isOK) = - for n = ceiling ((xneg + laxis)/xsp) upto floor ((xpos - raxis)/xsp): - for m = ceiling ((yneg + baxis)/ysp) upto floor ((ypos - taxis)/ysp): + for n = ceiling ((xlow)/xsp) upto floor ((xhigh)/xsp): + for m = ceiling ((ylow)/ysp) upto floor ((yhigh)/ysp): if isOK (n*xsp,m*ysp): arrowdraw (len) (vf(n*xsp,m*ysp)); fi endfor endfor @@ -1949,8 +1959,8 @@ enddef; def plrvectorfield (expr len, rsp, tsp) (text fcn) (text cond) = save _vf, _is_OK, _A, _B, _C, _D; - _A := xneg + laxis; _B := xpos + raxis; - _C := yneg + baxis; _D := ypos + taxis; + _A := xlow; _B := xhigh; + _C := ylow; _D := yhigh; vardef _vf (expr r,t) = ((0,0)--(fcn)) shifted (r*dir t) enddef; vardef _is_OK (expr r,t) = save _X, _Y; _X := r*cosd t; _Y := r*sind t; |