diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-06-02 23:42:05 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-06-02 23:42:05 +0200 |
commit | ac0e3262fb027e4ab586204bf2d5a05e9a831933 (patch) | |
tree | aa43c752abe60ee65a9a9b09b32fa19ee10bd787 /metapost | |
parent | e52e58ff4a7007ca774905727391e5f78135f98d (diff) | |
download | context-ac0e3262fb027e4ab586204bf2d5a05e9a831933.tar.gz |
2018-06-02 22:41:00
Diffstat (limited to 'metapost')
-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. |