[
https://issues.apache.org/jira/browse/PDFBOX-1887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13895631#comment-13895631
]
Tilman Hausherr commented on PDFBOX-1887:
-----------------------------------------
removed @override because Java 6 which doesn't support @Override annotations
for methods inherited when implementing an interface; committed this in rev
1566051 for the 1.8 version.
> Bugfixes + Optimization of Gouraud Shading
> ------------------------------------------
>
> Key: PDFBOX-1887
> URL: https://issues.apache.org/jira/browse/PDFBOX-1887
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.0
> Environment: W7
> Reporter: Tilman Hausherr
> Priority: Minor
> Labels: Shading
> Fix For: 1.8.5, 2.0.0
>
> Attachments: GouraudShadingContext.patch, GouraudTriangle.patch,
> ch14.pdf-1-better.png, ch14.pdf-1-svn.png
>
>
> Optimizations:
> - new float[] done only when needed, i.e. when point in a triangle
> - after a triangle is hit, other triangles aren't checked
> - keeping some constants for each triangle object
> Bugfixes:
> - the current code has a possibility that the tinttransform function is
> called with an array that was transformed before, because the values array is
> created too early. This resulted in array bounds exceptions for page 20 of
> ch14.pdf, which in turn resulted in white triangles.
> - polygon.contains() doesn't do the job properly, because it uses integers.
> The triangle corners must be kept as double to be exact. This bug resulted in
> black artefacts (points that were not in a triangle but were detected as
> such). The fix is not to use java functions anymore.
> - checking the combined area doesn't work either and resulted in white
> artefacts (points that were not detected as part of a triangle).
> It is still very slow. This is "by design", because in that file, the Gouraud
> mesh is split into so many items instead of being submitted as one.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)