You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/06/03 18:07:01 UTC
[jira] [Resolved] (PDFBOX-2111) Cast error in Gouraud shadings
[ https://issues.apache.org/jira/browse/PDFBOX-2111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr resolved PDFBOX-2111.
-------------------------------------
Resolution: Fixed
Fixed in rev 1599647 for the trunk and rev 1599642 for the 1.8 branch.
> Cast error in Gouraud shadings
> ------------------------------
>
> Key: PDFBOX-2111
> URL: https://issues.apache.org/jira/browse/PDFBOX-2111
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 1.8.5, 1.8.6, 2.0.0
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Labels: shading, shadingpattern
> Fix For: 1.8.6, 2.0.0
>
>
> There's a bug in Type4ShadingContext and Type5ShadingContext:
> {code}
> long maxSrcCoord = (int) Math.pow(2, bitsPerCoordinate) - 1;
> long maxSrcColor = (int) Math.pow(2, bitsPerColorComponent) - 1;
> {code}
> should be
> {code}
> long maxSrcCoord = (long) (Math.pow(2, bitsPerCoordinate) - 1);
> long maxSrcColor = (long) (Math.pow(2, bitsPerColorComponent) - 1);
> {code}
> The problem is that maxSrcCoord is 7FFFFFFF instead of FFFFFFFF when bitsPerCoordinate is 32.
--
This message was sent by Atlassian JIRA
(v6.2#6252)