summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost/base/graph.mp
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/metapost/base/graph.mp')
-rw-r--r--Master/texmf-dist/metapost/base/graph.mp12
1 files changed, 10 insertions, 2 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.