diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-02-22 20:29:46 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-02-22 20:29:46 +0100 |
commit | 7b271baae19db1528fbe6621bdf50af89a5a336b (patch) | |
tree | 4fc24a8f2be20aa90e90f6e1bcb62d69f4946235 /metapost/context/base/mpiv/mp-grap.mpiv | |
parent | 67b9965fe473d18f13ed4c40f1e4e008eb870322 (diff) | |
download | context-7b271baae19db1528fbe6621bdf50af89a5a336b.tar.gz |
2019-02-22 19:43:00
Diffstat (limited to 'metapost/context/base/mpiv/mp-grap.mpiv')
-rw-r--r-- | metapost/context/base/mpiv/mp-grap.mpiv | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/metapost/context/base/mpiv/mp-grap.mpiv b/metapost/context/base/mpiv/mp-grap.mpiv index e799f629c..0299c0587 100644 --- a/metapost/context/base/mpiv/mp-grap.mpiv +++ b/metapost/context/base/mpiv/mp-grap.mpiv @@ -266,19 +266,27 @@ enddef ; graph_margin_fraction.low=-.07 ; % bbox fraction for default range start graph_margin_fraction.high=1.07 ; % bbox fraction for default range stop +%def graph_with_pen_and_color(expr 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 +% withprescript prescriptpart q +% withpostscript postscriptpart q +%enddef ; + def graph_with_pen_and_color(expr 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 + withproperties q 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. |