[cairo-bugs] [Bug 81657] Does not draw with radial pattern if scaling is too small

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jul 23 02:31:59 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=81657

--- Comment #1 from Andrea Canciani <ranma42 at gmail.com> ---
As you also stated, this does not seems to be radial-specific.
For that code, cairo will apply the following pixman trasform to the pattern:

matrix = {
  [0] = ([0] = 21473526, [1] = 0, [2] = 0)
  [1] = ([0] = 0, [1] = 21473526, [2] = 0)
  [2] = ([0] = 0, [1] = 0, [2] = 65536)
}

(pixman numbers are 16.16 fixed point)

Then in analyze_extents() pixman will try to check that the extents can be
transformed by that matrix and still be represented with the internal 31.16
format. This unfortunately is not true (300 * 21473526 > 0x7fffffff), hence
pixman bails out.

With the 0.005 scale factor, the matrix has smaller coefficients:

matrix = {
  [0] = ([0] = 4294705, [1] = 0, [2] = 23)
  [1] = ([0] = 0, [1] = 4294705, [2] = 23)
  [2] = ([0] = 0, [1] = 0, [2] = 65536)
}

In this case the extents can be represented internally by pixman (300 * 4294705
< 0x7fffffff), so the gradient is drawn.

It might be possible to improve the pixman transformation generated by cairo
and/or to make pixman more forgiving about these kind of numbers.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20140723/15285900/attachment.html>


More information about the cairo-bugs mailing list