summaryrefslogtreecommitdiff
path: root/metapost/context/base/mp-base.mpiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-10-20 01:21:09 +0300
committerMarius <mariausol@gmail.com>2013-10-20 01:21:09 +0300
commitb8ac6d7b7fdb16293c28034c349efd5b0b7b20b3 (patch)
tree0e9051dbe21b4e9cfc72fe594df5b0fe7bc511f3 /metapost/context/base/mp-base.mpiv
parent965214d981e6129b782c67adcaf3a81aedcb0bac (diff)
downloadcontext-b8ac6d7b7fdb16293c28034c349efd5b0b7b20b3.tar.gz
beta 2013.10.20 07:09
Diffstat (limited to 'metapost/context/base/mp-base.mpiv')
-rw-r--r--metapost/context/base/mp-base.mpiv32
1 files changed, 27 insertions, 5 deletions
diff --git a/metapost/context/base/mp-base.mpiv b/metapost/context/base/mp-base.mpiv
index 7b3a69bb0..2887cc462 100644
--- a/metapost/context/base/mp-base.mpiv
+++ b/metapost/context/base/mp-base.mpiv
@@ -13,9 +13,9 @@
string base_name, base_version ;
base_name := "plain" ;
-base_version := "0.63" ;
+base_version := "1.004 for metafun iv" ;
-message "Preloading the plain mem file, version " & base_version ;
+message "loading metafun, including plain.mp version " & base_version ;
delimiters () ; % this makes parentheses behave like parentheses
@@ -197,6 +197,28 @@ background := white ; % obsolete
let graypart = greypart ;
let graycolor = greycolor ;
+% color part (will be overloaded)
+
+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
+ elseif defaultcolormodel = 7 :
+ (0,0,0,1)
+ elseif defaultcolormodel = 5 :
+ black
+ elseif defaultcolormodel = 3 :
+ 0
+ else :
+ false
+ fi
+enddef ;
+
% picture constants
picture blankpicture, evenly, withdots ;
@@ -704,10 +726,10 @@ def _finarr text t =
filldraw arrowhead _apth t
enddef ;
-def _findarr text t =
+def _findarr text t = % this had fill in 0.63 (potential incompatibility)
draw _apth t ;
- fill arrowhead _apth withpen currentpen t ;
- fill arrowhead reverse _apth withpen currentpen t ; % ; added HH
+ filldraw arrowhead _apth withpen currentpen t ;
+ filldraw arrowhead reverse _apth withpen currentpen t ; % ; added HH
enddef ;
%% macros for labels