[Webkit-unassigned] [Bug 11931] PathCG fails to hit on unclosed-sub-paths (yet we still fill them)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 10 05:07:50 PDT 2007


------- Comment #4 from macdome at opendarwin.org  2007-05-10 05:07 PDT -------
Ok, the fix here is to do a better job of closing the paths.   Right now we
close the last subpath, but not necessarily any other subpaths.  We really
should walk the entire path, making a manual copy and inserting a close subpath
before each "move" and at the very end of the path.

bool Path::contains(const FloatPoint &point, WindRule rule) const
    // CGPathContainsPoint returns false for non-closed paths, as a
work-around, we copy and close the path first.  Radar 4758998 asks for a better
CG API to use
    if (!boundingRect().contains(point))
        return false;

    CGMutablePathRef path = CGPathCreateMutableCopy(m_path);
    bool ret = CGPathContainsPoint(path, 0, point, rule == RULE_EVENODD ? true
: false);
    return ret;

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list