Summary: | Rounding error introduced in recent commit | ||
---|---|---|---|
Product: | cairo | Reporter: | Jens Taprogge <jlt_fdo> |
Component: | pdf backend | Assignee: | Kristian Høgsberg <krh> |
Status: | RESOLVED NOTABUG | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | high | ||
Version: | 1.1.1 | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Jens Taprogge
2006-02-07 02:16:55 UTC
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... |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.