diff options
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mpii/mp-base.mpii | 21 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-tool.mpii | 6 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-base.mpiv | 22 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-grap.mpiv | 8 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-mlib.mpiv | 6 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-tool.mpiv | 6 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-base.mpxl | 22 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-mlib.mpxl | 6 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-tool.mpxl | 6 |
9 files changed, 52 insertions, 51 deletions
diff --git a/metapost/context/base/mpii/mp-base.mpii b/metapost/context/base/mpii/mp-base.mpii index 7af4bc436..894af63f1 100644 --- a/metapost/context/base/mpii/mp-base.mpii +++ b/metapost/context/base/mpii/mp-base.mpii @@ -122,20 +122,27 @@ yellow = (1,1,0); background = white; % The user can reset this % color part selection for within + +newinternal nocolormodel ; nocolormodel := 1 ; +newinternal greycolormodel ; greycolormodel := 3 ; +newinternal graycolormodel ; graycolormodel := 3 ; +newinternal rgbcolormodel ; rgbcolormodel := 5 ; +newinternal cmykcolormodel ; cmykcolormodel := 7 ; + def colorpart primary t = - if colormodel t=7: + if colormodel t=cmykcolormodel: (cyanpart t, magentapart t, yellowpart t, blackpart t) - elseif colormodel t=5: + elseif colormodel t=rgbcolormodel: (redpart t, greenpart t, bluepart t) - elseif colormodel t=3: + elseif colormodel t=graycolormodel: (greypart t) - elseif colormodel t=1: + elseif colormodel t=nocolormodel: false else: %%% For clipping and bounding paths, etc. - if defaultcolormodel=7: (0,0,0,1) - elseif defaultcolormodel=5: black - elseif defaultcolormodel=3: 0 + if defaultcolormodel=cmykcolormodel: (0,0,0,1) + elseif defaultcolormodel=rgbcolormodel: black + elseif defaultcolormodel=graycolormodel: 0 else: false fi fi diff --git a/metapost/context/base/mpii/mp-tool.mpii b/metapost/context/base/mpii/mp-tool.mpii index 27c90de38..1e45b6fba 100644 --- a/metapost/context/base/mpii/mp-tool.mpii +++ b/metapost/context/base/mpii/mp-tool.mpii @@ -131,12 +131,6 @@ enddef ; %D Colors: -newinternal nocolormodel ; nocolormodel := 1 ; -newinternal greycolormodel ; greycolormodel := 3 ; -newinternal graycolormodel ; graycolormodel := 3 ; -newinternal rgbcolormodel ; rgbcolormodel := 5 ; -newinternal cmykcolormodel ; cmykcolormodel := 7 ; - let grayscale = numeric ; let greyscale = numeric ; diff --git a/metapost/context/base/mpiv/mp-base.mpiv b/metapost/context/base/mpiv/mp-base.mpiv index 8ca072dcd..9b85d5ffd 100644 --- a/metapost/context/base/mpiv/mp-base.mpiv +++ b/metapost/context/base/mpiv/mp-base.mpiv @@ -192,26 +192,32 @@ yellow := (1,1,0) ; background := white ; % obsolete -let graypart = greypart ; +let graypart = greypart ; let greycolor = numeric ; let graycolor = numeric ; % color part (will be overloaded) +newinternal nocolormodel ; nocolormodel := 1 ; +newinternal greycolormodel ; greycolormodel := 3 ; +newinternal graycolormodel ; graycolormodel := 3 ; +newinternal rgbcolormodel ; rgbcolormodel := 5 ; +newinternal cmykcolormodel ; cmykcolormodel := 7 ; + def colorpart primary t = - if colormodel t = 7: + if colormodel t = cmykcolormodel: (cyanpart t, magentapart t, yellowpart t, blackpart t) - elseif colormodel t = 5 : + elseif colormodel t = rgbcolormodel : (redpart t, greenpart t, bluepart t) - elseif colormodel t = 3 : + elseif colormodel t = graycolormodel : (greypart t) - elseif colormodel t = 1 : + elseif colormodel t = nocolormodel : false - elseif defaultcolormodel = 7 : + elseif defaultcolormodel = cmykcolormodel : (0,0,0,1) - elseif defaultcolormodel = 5 : + elseif defaultcolormodel = rgbcolormodel : black - elseif defaultcolormodel = 3 : + elseif defaultcolormodel = graycolormodel : 0 else : false diff --git a/metapost/context/base/mpiv/mp-grap.mpiv b/metapost/context/base/mpiv/mp-grap.mpiv index 2c1cb301f..55a7c5795 100644 --- a/metapost/context/base/mpiv/mp-grap.mpiv +++ b/metapost/context/base/mpiv/mp-grap.mpiv @@ -279,13 +279,13 @@ 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 : +% if colormodel q=nocolormodel : % false -% elseif colormodel q=3 : +% elseif colormodel q=graycolormodel : % (greypart q) -% elseif colormodel q=5 : +% elseif colormodel q=rgbcolormodel : % (redpart q, greenpart q, bluepart q) -% elseif colormodel q=7 : +% elseif colormodel q=cmykcolormodel : % (cyanpart q, magentapart q, yellowpart q, blackpart q) % fi % withprescript prescriptpart q diff --git a/metapost/context/base/mpiv/mp-mlib.mpiv b/metapost/context/base/mpiv/mp-mlib.mpiv index 173fd9529..a787bc0db 100644 --- a/metapost/context/base/mpiv/mp-mlib.mpiv +++ b/metapost/context/base/mpiv/mp-mlib.mpiv @@ -1334,11 +1334,11 @@ vardef properties(text t) = enddef ; def withproperties expr p = - if colormodel p = 3 : + if colormodel p = graycolormodel : withcolor greypart p - elseif colormodel p = 5 : + elseif colormodel p = rgbcolor : withcolor (redpart p,greenpart p,bluepart p) - elseif colormodel p = 7 : + elseif colormodel p = cmykcolormodel : withcolor (cyanpart p,magentapart p,yellowpart p,blackpart p) fi withpen penpart p diff --git a/metapost/context/base/mpiv/mp-tool.mpiv b/metapost/context/base/mpiv/mp-tool.mpiv index c84d8dfbf..fc983d5a8 100644 --- a/metapost/context/base/mpiv/mp-tool.mpiv +++ b/metapost/context/base/mpiv/mp-tool.mpiv @@ -138,12 +138,6 @@ enddef ; %D Colors: -newinternal nocolormodel ; nocolormodel := 1 ; -newinternal greycolormodel ; greycolormodel := 3 ; -newinternal graycolormodel ; graycolormodel := 3 ; -newinternal rgbcolormodel ; rgbcolormodel := 5 ; -newinternal cmykcolormodel ; cmykcolormodel := 7 ; - let grayscale = graycolor ; let greyscale = greycolor ; diff --git a/metapost/context/base/mpxl/mp-base.mpxl b/metapost/context/base/mpxl/mp-base.mpxl index c6242b787..4cb44d69f 100644 --- a/metapost/context/base/mpxl/mp-base.mpxl +++ b/metapost/context/base/mpxl/mp-base.mpxl @@ -206,20 +206,26 @@ let graycolor = numeric ; % color part (will be overloaded) +newinternal nocolormodel ; nocolormodel := 0 ; +newinternal greycolormodel ; greycolormodel := 1 ; +newinternal graycolormodel ; graycolormodel := 1 ; +newinternal rgbcolormodel ; rgbcolormodel := 2 ; +newinternal cmykcolormodel ; cmykcolormodel := 3 ; + def colorpart primary t = - if colormodel t = 7: + if colormodel t = cmykcolormodel: (cyanpart t, magentapart t, yellowpart t, blackpart t) - elseif colormodel t = 5 : + elseif colormodel t = rgbcolormodel : (redpart t, greenpart t, bluepart t) - elseif colormodel t = 3 : + elseif colormodel t = graycolormodel : (greypart t) - elseif colormodel t = 1 : + elseif colormodel t = nocolormodel : false - elseif defaultcolormodel = 7 : + elseif defaultcolormodel = cmykcolormodel : (0,0,0,1) - elseif defaultcolormodel = 5 : + elseif defaultcolormodel = rgbcolormodel : black - elseif defaultcolormodel = 3 : + elseif defaultcolormodel = graycolormodel : 0 else : false @@ -995,7 +1001,7 @@ def beginfig(expr c) = clearpen ; pickup defaultpen ; drawoptions() ; - stacking := 0 ; + interim stacking := 0 ; scantokens extra_beginfig ; enddef ; diff --git a/metapost/context/base/mpxl/mp-mlib.mpxl b/metapost/context/base/mpxl/mp-mlib.mpxl index 753fdff74..c81b4fe39 100644 --- a/metapost/context/base/mpxl/mp-mlib.mpxl +++ b/metapost/context/base/mpxl/mp-mlib.mpxl @@ -1402,11 +1402,11 @@ vardef properties(text t) = enddef ; def withproperties expr p = - if colormodel p = 3 : + if colormodel p = graycolormodel : withcolor greypart p - elseif colormodel p = 5 : + elseif colormodel p = rgbcolormodel : withcolor (redpart p,greenpart p,bluepart p) - elseif colormodel p = 7 : + elseif colormodel p = cmykcolormodel : withcolor (cyanpart p,magentapart p,yellowpart p,blackpart p) fi withpen penpart p diff --git a/metapost/context/base/mpxl/mp-tool.mpxl b/metapost/context/base/mpxl/mp-tool.mpxl index 630bd58c1..9c469b03a 100644 --- a/metapost/context/base/mpxl/mp-tool.mpxl +++ b/metapost/context/base/mpxl/mp-tool.mpxl @@ -142,12 +142,6 @@ permanent dispose ; %D Colors: -newinternal nocolormodel ; nocolormodel := 1 ; -newinternal greycolormodel ; greycolormodel := 3 ; -newinternal graycolormodel ; graycolormodel := 3 ; -newinternal rgbcolormodel ; rgbcolormodel := 5 ; -newinternal cmykcolormodel ; cmykcolormodel := 7 ; - let grayscale = graycolor ; let greyscale = greycolor ; |