diff options
author | Marius <mariausol@gmail.com> | 2011-12-13 17:40:23 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-12-13 17:40:23 +0200 |
commit | 008b7b212da48ca7ef8fc8ac876dbf13ca7b21a5 (patch) | |
tree | 8571937aba1460b4bf7daa0e08738f8768c48d03 /metapost/context/base/mp-tool.mpiv | |
parent | 0396ead2bd0816d7e546848690271bbbe9077334 (diff) | |
download | context-008b7b212da48ca7ef8fc8ac876dbf13ca7b21a5.tar.gz |
beta 2011.12.13 15:17
Diffstat (limited to 'metapost/context/base/mp-tool.mpiv')
-rw-r--r-- | metapost/context/base/mp-tool.mpiv | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mp-tool.mpiv index 006e16e82..33c5b7d9a 100644 --- a/metapost/context/base/mp-tool.mpiv +++ b/metapost/context/base/mp-tool.mpiv @@ -2057,25 +2057,22 @@ enddef ; def showgrid (expr MinX, MaxX, DeltaX, MinY, MaxY, DeltaY) = % will move begingroup - save defaultfont, defaultscale, size ; - string defaultfont ; defaultfont := "cmtt10"; % i.e. infofont - numeric defaultscale ; defaultscale := 8pt / fontsize defaultfont; - numeric size ; size := 2pt ; + save size ; numeric size ; size := 2pt ; for x=MinX upto MaxX : for y=MinY upto MaxY : draw (x*DeltaX, y*DeltaY) withpen pencircle scaled if (x mod 5 = 0) and (y mod 5 = 0) : 1.5size withcolor .50white else : - size withcolor .75white + size withcolor .75white fi ; endfor ; endfor ; for x=MinX upto MaxX: - label.bot(decimal x, (x*DeltaX,-size)) ; + label.bot(textext("\infofont " & decimal x), (x*DeltaX,-size)) ; endfor ; for y=MinY upto MaxY: - label.lft(decimal y, (-size,y*DeltaY)) ; + label.lft(textext("\infofont " & decimal y), (-size,y*DeltaY)) ; endfor ; endgroup enddef; |