diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-16 00:15:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-16 00:15:04 +0200 |
commit | b55577d0998160c0174e250b542016ecd6ca9056 (patch) | |
tree | 27093212d5ca3e6ffe4ae434c3ec094233ed37ba /metapost/context/base/mp-base.mpii | |
parent | 624cbb5da392e9403984dd1cf368c0d408b1c2a8 (diff) | |
download | context-b55577d0998160c0174e250b542016ecd6ca9056.tar.gz |
2015-05-15 23:06:00
Diffstat (limited to 'metapost/context/base/mp-base.mpii')
-rw-r--r-- | metapost/context/base/mp-base.mpii | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/metapost/context/base/mp-base.mpii b/metapost/context/base/mp-base.mpii index 0f8104447..7af4bc436 100644 --- a/metapost/context/base/mp-base.mpii +++ b/metapost/context/base/mp-base.mpii @@ -110,12 +110,15 @@ transform identity; for z=origin,right,up: z transformed identity = z; endfor % color constants -color black, white, red, green, blue, background; +color black, white, red, green, blue, cyan, magenta, yellow, background; black = (0,0,0); white = (1,1,1); red = (1,0,0); green = (0,1,0); blue = (0,0,1); +cyan = (0,1,1); +magenta = (1,0,1); +yellow = (1,1,0); background = white; % The user can reset this % color part selection for within @@ -360,9 +363,17 @@ enddef; def filldraw expr c = addto currentpicture contour c withpen currentpen _op_ enddef; -def drawdot expr z = - addto currentpicture contour makepath currentpen shifted z - _op_ enddef; +% def drawdot expr z = +% addto currentpicture contour makepath currentpen shifted z +% _op_ enddef; + +def drawdot expr p = + if pair p : + addto currentpicture doublepath p withpen currentpen _op_ + else : + errmessage("drawdot only accepts a pair expression") + fi +enddef ; def unfill expr c = fill c withcolor background enddef; def undraw expr p = draw p withcolor background enddef; |