[cairo-bugs] [Bug 29422] New: cairo_path_extents doesn't consider single moveto followed by closepath

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Aug 6 09:32:57 PDT 2010


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

           Summary: cairo_path_extents doesn't consider single moveto
                    followed by closepath
           Product: cairo
           Version: 1.9.15
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
        AssignedTo: cworth at cworth.org
        ReportedBy: cujyaz at googlemail.com
         QAContact: cairo-bugs at cairographics.org


In cairo-path-bounds.c, _cairo_path_bounder_close_path() is an empty
function, while it should consider the case when the prevoious command
is a moveto, and then include the point in the calculated extent:

static cairo_status_t
_cairo_path_bounder_close_path (void *closure)
{
    cairo_path_bounder_t *bounder = closure;

    if (bounder->has_initial_point) {
    _cairo_path_bounder_add_point (bounder, &bounder->current_point);
    bounder->has_initial_point = FALSE;
    }

    return CAIRO_STATUS_SUCCESS;
}

This comes from a Mozilla bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=584623

I have tested the fix in Mozilla, which uses an old version of Cairo.
By looking at the current code, the bug is still present, although the code
has changed substantially. There may be other places in the code where
a similar bug exists (don't know).

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list