[cairo] [PATCH] [in-fill] Treat on-edge queries as inside.
damian.frank at gmail.com
Fri Feb 27 13:04:51 PST 2009
On Fri, Feb 27, 2009 at 12:55 PM, M Joonas Pihlaja
<jpihlaja at cc.helsinki.fi> wrote:
> This is the sort of change I would expect to break UIs, but given that
> it wasn't that long ago that we changed it to top-right, and no-one
> complained much (except the canvas implementors), it's probably better
> to change it to be consistent at least. Namely, what's bugged me
> about the half-open definitions is that the topness or rightness is
> defined by device space, so from the point of view of user space the
> in-fill test on the edges is basically an arbitrary unpredictable
> choice that depends on the current transformation matrix.
On the other hand, one standard that I expect good renderers to live
up to is that mathematically adjacent and non-overlapping filled areas
shouldn't both claim to own any set of pixels. (This has, for
instance, been part of the OpenGL spec for ages.) I don't know if
Cairo lives up to this, but I've been assuming that it does.
Implementing this spec generally (always?) means using something like
left-inclusive, right-exclusive fill rules.
I would tend to assume that, barring numerical instability, this
function shouldn't return true for any area that wouldn't actually be
filled. But I don't think that can be true if Cairo meets the filling
criterion I mentioned and the proposed patch is adopted. Maybe my
naive understanding is leading me astray?
Granted, there may not be any current use cases that would break as a
result, but as a user of the library, it seems wrong to me.
More information about the cairo