diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2008-05-01 09:53:43 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2008-05-01 09:53:43 +0000 |
commit | 1a60c8109303e835e95a5683b014d39771498e22 (patch) | |
tree | 6fe960edeb96dceeb4001da006ba48edcde59e9c /Master/texmf-dist/metapost | |
parent | 069463624f706dd7058f2b0f266cf26f0115d507 (diff) |
metapost 1.004
git-svn-id: svn://tug.org/texlive/trunk@7768 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r-- | Master/texmf-dist/metapost/base/graph.mp | 12 | ||||
-rw-r--r-- | Master/texmf-dist/metapost/base/plain.mp | 22 |
2 files changed, 31 insertions, 3 deletions
diff --git a/Master/texmf-dist/metapost/base/graph.mp b/Master/texmf-dist/metapost/base/graph.mp index 5f8286e1e86..d7c61ecd961 100644 --- a/Master/texmf-dist/metapost/base/graph.mp +++ b/Master/texmf-dist/metapost/base/graph.mp @@ -146,10 +146,18 @@ pair Gboff_; Gboff_=epsilon*(3,3); % allowance to avoid numerical trouble def Gwithpc_(expr q) = - withpen penpart q withcolor (redpart q, greenpart q, bluepart q) + withpen penpart q withcolor + if colormodel q=1: + false + elseif colormodel q=3: + (greypart q) + elseif colormodel q=5: + (redpart q, greenpart q, bluepart q) + elseif colormodel q=7: + (cyanpart q, magentapart q, yellowpart q, blackpart q) + fi enddef; - % Add picture component q to picture @# and change part p to tp, where p is % something from q that needs coordinate transformation. The type of p is pair % or path. diff --git a/Master/texmf-dist/metapost/base/plain.mp b/Master/texmf-dist/metapost/base/plain.mp index 52774f6fc67..d1a6212f303 100644 --- a/Master/texmf-dist/metapost/base/plain.mp +++ b/Master/texmf-dist/metapost/base/plain.mp @@ -5,7 +5,7 @@ % 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.99"; +string base_name, base_version; base_name="plain"; base_version="1.004"; message "Preloading the plain mem file, version "&base_version; @@ -114,6 +114,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...' |