[cairo-bugs] [Bug 5824] Rounding error introduced in recent commit
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Feb 6 07:37:52 PST 2006
Please do not reply to this email: if you want to comment on the bug, go to
the URL shown below and enter yourcomments there.
https://bugs.freedesktop.org/show_bug.cgi?id=5824
freedesktop at behdad.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |NOTABUG
------- Additional Comments From freedesktop at behdad.org 2006-02-07 02:33 -------
Given the old code, the correct conversion is what I noted here:
http://lists.freedesktop.org/archives/cairo/2005-October/005433.html
ie,
stops[i].color_char[0] = pattern->stops[i].color.red * 0xff + 0.5;
should be changed to something like this:
stops[i].color_char[0] = pattern->stops[i].color.red * (256 - 1e-5);
but now that stops[i].color_char[0] are uchars, the current code is correct,
cause, we want to have a uniform mapping, and that's what we've got:
0000-00ff -> 00
0100-01ff -> 01
...
ff00-ffff -> ff
So each target bin is stuffed with exactly 0x100 source items. Perfect.
In other words, no, 0x12ff should map to 0x12, cause we cannot map 0xffff to
0x100 anyway...
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the cairo-bugs
mailing list