You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2005/10/25 00:39:36 UTC

DO NOT REPLY [Bug 37236] - Fix gradients and patterns

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37236>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37236





------- Additional Comments From deweese@apache.org  2005-10-25 00:39 -------
Created an attachment (id=16799)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=16799&action=view)
Patch for majority of transform issues with patterns/gradients

This patch fixes most of the problems with 'simple' gradients
and patterns in PDF output.  However it does not cover
everything there are three major outstanding issues:
1) Gradients with an SVG setting of spreadMethod reflect or
   repeat, are rendered with just 'pad'.  Fixing this requires
   resorting to rasterizing the content (it might be possible to
   get around this for linear gradients but certainly not with
   radial).
2) Patterns that contain gradients generate 'bad' PDF.	I suspect
   the problem is resource referencing.  Since I am fairly sure the
   problem existed before my fidling I'm going to leave it as is.
3) Patterns with 'overflow="visible"' ignore overflow.

   Number 3 is pretty simple to fix (just need to render the
gn content multiple times to make the tile).  I suspect Number
2 is not too hard if you understand PDF (which I don't really).
Number 1 would require adding support for rasterizing unknown
paint's and using that as a pattern fill (just make the size 
of the pattern fill the same as shape being painted).

A few notes on the patch.
1) I simplified the PDFState.Data class, by removing the
   the 'concatenations' List.  It doesn't seem to be used
   by anything.
2) I changed PDFState.getTransform it now just returns the
   current transform as this already includes all the previous
   transforms.	Perhaps I misunderstood the code but things work
   now and the transforms make sense where as they didn't before.
3) I added the ability to provide a transform to 
   PDFFactory.makeGradient this is required to handle some of the
   more complex cases of gradients with non-uniform scaling 
   transforms.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.