[gs-cvs] rev 7202 - trunk/gs/lib

ray at ghostscript.com ray at ghostscript.com
Wed Nov 15 08:15:30 PST 2006


Author: ray
Date: 2006-11-15 08:15:30 -0800 (Wed, 15 Nov 2006)
New Revision: 7202

Modified:
   trunk/gs/lib/gs_ciecs3.ps
   trunk/gs/lib/gs_cspace.ps
Log:
Set the correct default value for CIEBasedDEF and CIEBasedDEFG colorspaces.
PLRM p. 233 states value is to be as close to 0.0 as is valid in RangeDEF[G].
Fixes 09-03-3


Modified: trunk/gs/lib/gs_ciecs3.ps
===================================================================
--- trunk/gs/lib/gs_ciecs3.ps	2006-11-15 16:12:42 UTC (rev 7201)
+++ trunk/gs/lib/gs_ciecs3.ps	2006-11-15 16:15:30 UTC (rev 7202)
@@ -47,7 +47,15 @@
           }
         bind
 
-        /cs_get_default_color { pop 0 0 0 } bind
+	% per Page 233 of the PLRM, default color should be as close to 0.0 as possible
+	% within the RangeDEF
+        /cs_get_default_color { pop 0.0 0.0 0.0 } bind
+        /cs_get_default_color { 1 get /RangeDEF .knownget {
+	    aload pop pop 5 1 roll pop 4 1 roll pop 3 1 roll
+	  } {
+	    0.0 0.0 0.0 
+	  } ifelse 
+	} bind
         /cs_get_currentgray //no_currentgray
         /cs_get_currentrgb //no_currentrgb
         /cs_get_currentcmyk //no_currentcmyk
@@ -92,7 +100,14 @@
           }
         bind
 
-        /cs_get_default_color { pop 0 0 0 0 } bind
+	% per Page 233 of the PLRM, default color should be as close to 0.0 as possible
+	% within the RangeDEFG
+        /cs_get_default_color { 1 get /RangeDEFG .knownget {
+	    aload pop pop 7 1 roll pop 6 1 roll pop 5 1 roll pop 4 1 roll
+	  } {
+	    0.0 0.0 0.0 0.0
+	  } ifelse 
+	} bind
         /cs_get_currentgray //no_currentgray
         /cs_get_currentrgb //no_currentrgb
         /cs_get_currentcmyk //no_currentcmyk

Modified: trunk/gs/lib/gs_cspace.ps
===================================================================
--- trunk/gs/lib/gs_cspace.ps	2006-11-15 16:12:42 UTC (rev 7201)
+++ trunk/gs/lib/gs_cspace.ps	2006-11-15 16:15:30 UTC (rev 7202)
@@ -497,7 +497,8 @@
             //.cs_substitute exec
             //.cs_prepare exec
             //.cs_install exec
-            //make_array1 exec //setcolorspace
+            dup //make_array1 exec //setcolorspace
+	    //.cs_get_default_color exec setcolor
           }
         ifelse
       }



More information about the gs-cvs mailing list