diff options
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. |