[
https://issues.apache.org/jira/browse/PDFBOX-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837056#action_12837056
]
Daniel Wilson commented on PDFBOX-615:
--------------------------------------
Pages 302 - 331 of the PDF spec 1.7 describe the shading operation.
Shading is one set of the Pattern operations ... the other set being Tiling
Patterns. Those don't concern me at the moment, and we have some support for
them in the org.apache.pdfbox.pdmodel.graphics.color.PDPattern class.
The set of Shading operations does gradient fills -- and there are 7 different
types of these gradient fill shadings.
Now, I could use some implementation thoughts as I bring the concept back to
our object model.
Since the shading operation is used for stroking & filling operations, is
deriving it from PDColorSpace as was done with PDPattern the right answer?
Since there are 7 different types of shading operations, do we need 7 different
classes?
Or should the method that does the fill/stroke check the class's type and do
the operation? And ... which method is that? PDPattern has next to no
methods. And neither do the PDColorSpace derivatives that we use frequently
like PDDeviceRGB. The only thing that really appears to matter there is
createColorModel. In the case of a shading / gradient fill, is
createColorModel possibly enough? It hardly seems it ...
Any thoughts along this line are MUCH appreciated.
> shfill operator needs implementation
> ------------------------------------
>
> Key: PDFBOX-615
> URL: https://issues.apache.org/jira/browse/PDFBOX-615
> Project: PDFBox
> Issue Type: New Feature
> Components: PDModel
> Reporter: Daniel Wilson
> Assignee: Daniel Wilson
>
> I have a PDF file (for which I do not yet have release permission) that uses
> the "sh" operator, equivalent to PostScript's shfill (per PDF spec 1.7 page
> 987).
> Adobe provides implementation guidance in a 78-page document at
> http://www.adobe.com/devnet/postscript/pdfs/TN5600.SmoothShading.pdf#17
> I will be trying to add this functionality this week, but if anyone has
> hints, suggestions, etc. they are most certainly welcome!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.