[gs-cvs] rev 7697 - trunk/gs/doc

henrys at ghostscript.com henrys at ghostscript.com
Wed Feb 14 09:31:06 PST 2007


Author: henrys
Date: 2007-02-14 09:31:05 -0800 (Wed, 14 Feb 2007)
New Revision: 7697

Modified:
   trunk/gs/doc/pscet_status.txt
Log:
Add analysis from Jan that might be useful in addressing 12-01-05.


Modified: trunk/gs/doc/pscet_status.txt
===================================================================
--- trunk/gs/doc/pscet_status.txt	2007-02-13 21:44:37 UTC (rev 7696)
+++ trunk/gs/doc/pscet_status.txt	2007-02-14 17:31:05 UTC (rev 7697)
@@ -2259,7 +2259,58 @@
 		CPSI output.  Strange result in Distiller 7.0 output.  Acrobat 7.0
 		reports incorrect number of values for setcolor operator.  Page is
 		blank.
-                Assign: raph.
+                Partial analysis from Jan (11/29/2006)
+                1. An uncolored pattern is created, and used to draw the region on       
+                   the left.  The pattern consists of a 9 unit x 9 unit tile, in the     
+                   center of which is a 7 unit x 7 unit colored square.  The pattern     
+                   receives its color at the time the setpattern operator is invoked.    
+                   For this test, that color is black.                                   
+                --                                                                         
+                2. Next, a colored pattern is created, and used to draw the figure       
+                   on the right.  This pattern also consists of a 9 unit x 9 unit tile,  
+                   whose PaintProc operates as follows:                                  
+                     - create a path consisting of a 5 unit x 5 unit square centered     
+                       in the 9 unit x 9 unit tile                                       
+                     - save graphic state                                                
+                     - set an approximately magenta color and fill the square            
+                     - restore the graphic state                                         
+                     - outline the same square with an approximately 4 unit wide line;   
+                       this line obscures all but a 1/2 unit x 1/2 unit square of the    
+                       magenta region                                                    
+                   The key step is the last one, because the PaintProc does not set a    
+                   color for drawing the line.  In this case it inherits the color       
+                   from the graphic state in effect when the makepattern operator was    
+                   invoked, which is the uncolored pattern created in Step (1).          
+                --                                                                         
+                3. Ghostscript renders the uncolored pattern into a gx_color_tile        
+                   structure when drawing the left region, and caches that strcuture.    
+                   When the second region is to be rendered, another gx_color_tile       
+                   is created, and the cached tile of the uncolored pattern is used      
+                   (in part) to render this new tile.  The caching accumulator           
+                   device is used for this purpose.                                      
+                --                                                                         
+                4. The problem arises because the cached gx_color_tile for the           
+                   uncolored pattern has its phase information set for the original      
+                   device, not the accumulator device being used to create the tile      
+                   for the colored pattern.                                              
+                   --                                                                      
+                   As we noted earlier, Ghostscript renders patterns to                  
+                   gx_color_tile structures of minimum size.  Such a mechanism           
+                   cannot handle the general case in which one pattern makes use of      
+                   another pattern.  Either the tile size must be increased to the       
+                   least common multiple of the patterns' step sizes, or some more       
+                   elaborate compositing technique must be used for final rendering.     
+                   --                                                                      
+                   However, in this case both patterns have the same step sizes (and     
+                   the same tile size), so Ghostscript should be able to handle the      
+                   situation correctly.  We thought the problem was that the             
+                   uncolored pattern was already cached, and so we modified the code     
+                   to discard cached patterns just before executing a pattern            
+                   PaintProc.  That resolves the phase issue, but the "inner"            
+                   pattern (the uncolored pattern in this case) is rendered using        
+                   the wrong transformation matrix.  We haven't yet had time to go       
+                   back and determine why this is happening.                             
+                   Assign: raph and tim                                                  
 
 12-01-6  OK	Minor differences in positions and character shapes - ADC
 



More information about the gs-cvs mailing list