<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Does not draw with radial pattern if scaling is too small"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=81657">81657</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>chris@chris-wilson.co.uk
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Does not draw with radial pattern if scaling is too small
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jason@aquaticape.us
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>image backend
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Cairo will not fill with a radial pattern if the matrix scaling is too small. 
The following code is inspired by poppler <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Incorrect rendering of shadings"
   href="show_bug.cgi?id=22098">bug #22098</a>, regarding an incorrectly
rendered PDF:

    cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
300, 300);
    cairo_t *cr = cairo_create (surface);
    cairo_scale (cr, 0.001, 0.001);

    cairo_pattern_t *pattern = cairo_pattern_create_radial (0, 0, 0, 0, 0,
50000);
    cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
    cairo_pattern_add_color_stop_rgb (pattern, 0, 0, 1, 0);
    cairo_pattern_add_color_stop_rgb (pattern, 1, 0, 0, 1);

    cairo_rectangle (cr, 0, 0, 300000, 300000);
    cairo_set_source (cr, pattern);
    cairo_fill (cr);
    cairo_surface_write_to_png (surface, "a.png");

Cairo will not draw anything with the scaling "0.001", but it will draw if the
scaling is larger, such as "0.005".  The exact value seems to change depending
on the pattern's matrix, so I might be able to work around the problem with
cairo_pattern_set_matrix.  I've noticed the same problem with a surface
pattern.

Using cairo and pixman from git master.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>