diff options
author | Marius <mariausol@gmail.com> | 2013-08-17 02:00:14 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-08-17 02:00:14 +0300 |
commit | 58d0e80f6d6bca23135f7d475a68b6a75853015b (patch) | |
tree | f9a3698231ae6e2e8dd31ec5d0d345d27ae746a9 /metapost/context/base/mp-base.mpii | |
parent | df40fcf9fdc193a2c5c2a16166250f675ea89567 (diff) | |
download | context-58d0e80f6d6bca23135f7d475a68b6a75853015b.tar.gz |
beta 2013.08.17 00:58
Diffstat (limited to 'metapost/context/base/mp-base.mpii')
-rw-r--r-- | metapost/context/base/mp-base.mpii | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/metapost/context/base/mp-base.mpii b/metapost/context/base/mp-base.mpii index 20b346cfc..0f8104447 100644 --- a/metapost/context/base/mp-base.mpii +++ b/metapost/context/base/mp-base.mpii @@ -1,14 +1,17 @@ % This is (currently) a copy of the plain.mp file. We use a copy % because (1) we want to make sure that there are no unresolved % dependencies, and (2) we may patch this file eventually. +% +% colorpart will be overloaded later (we already had that one) +% _findarr now has a filldraw, was fill in 0.63 % This file gives the macros for plain MetaPost % It contains all the features of plain METAFONT except those specific to % font-making. (See The METAFONTbook by D.E. Knuth). % There are also a number of macros for labeling figures, etc. -string base_name, base_version; base_name="plain"; base_version="0.63"; +string base_name, base_version; base_name="plain"; base_version="1.004 for metafun ii"; -message "loading metafun, including plain.mp version " & base_version ; +message "Preloading the plain mem file, version "&base_version; delimiters (); % this makes parentheses behave like parentheses def upto = step 1 until enddef; % syntactic sugar @@ -115,6 +118,26 @@ green = (0,1,0); blue = (0,0,1); background = white; % The user can reset this +% color part selection for within +def colorpart primary t = + if colormodel t=7: + (cyanpart t, magentapart t, yellowpart t, blackpart t) + elseif colormodel t=5: + (redpart t, greenpart t, bluepart t) + elseif colormodel t=3: + (greypart t) + elseif colormodel t=1: + false + else: + %%% For clipping and bounding paths, etc. + if defaultcolormodel=7: (0,0,0,1) + elseif defaultcolormodel=5: black + elseif defaultcolormodel=3: 0 + else: false + fi + fi +enddef; + % picture constants picture blankpicture,evenly,withdots; blankpicture=nullpicture; % `display blankpicture...' @@ -441,8 +464,8 @@ enddef; def _findarr text t = draw _apth t; - fill arrowhead _apth withpen currentpen t; - fill arrowhead reverse _apth withpen currentpen t + filldraw arrowhead _apth withpen currentpen t; + filldraw arrowhead reverse _apth withpen currentpen t enddef; @@ -479,7 +502,6 @@ def label = draw thelabel enddef; newinternal dotlabeldiam; dotlabeldiam:=3bp; vardef dotlabel@#(expr s,z) text t_ = label@#(s,z) t_; -% label@#(s,z); interim linecap:=rounded; draw z withpen pencircle scaled dotlabeldiam t_; enddef; |