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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jul 22 22:45:18 PDT 2014


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

          Priority: medium
            Bug ID: 81657
          Assignee: chris at chris-wilson.co.uk
           Summary: Does not draw with radial pattern if scaling is too
                    small
        QA Contact: cairo-bugs at cairographics.org
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: jason at aquaticape.us
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: unspecified
         Component: image backend
           Product: cairo

Cairo will not fill with a radial pattern if the matrix scaling is too small. 
The following code is inspired by poppler bug #22098, 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.

-- 
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/b9c8373c/attachment.html>


More information about the cairo-bugs mailing list