[cairo] Transform+Repeat patch for libpixman

Owen Taylor otaylor at redhat.com
Tue Oct 12 08:48:28 PDT 2004


On Tue, 2004-10-12 at 11:21 -0400, Carl Worth wrote:
> On Sun, 12 Sep 2004 05:13:57 +0200, David Reveman wrote:
> > The patch looks good to me, one little problem though:
> > 
> > I changed
> > #define mod(a,b)       ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a)
> > % (b))
> > to
> > #define mod(a,b)       ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (a) % (b)
> > == 0 ? 0: (b) + (a) % (b))
> 
> David,
> 
> Good catch. But in fixing one bug, you've inadvertently introduced
> another.
> 
> Owen had:

Just to set the record straight - this version didn't come from me,
I just cut-and-pasted from elsewhere in the code assuming that it
was done right.

See:

 http://bugzilla.gnome.org/show_bug.cgi?id=148893

and the linked to thread there for various discussion on this topic.
I don't think the version that Jan came up with in the
end is right for this usage, but there may be useful tidbits
in the discussion.

Regards,
						Owen

[
Possibly, despite the WONTFIX'ing, does belong in GLib
(Wouldn't help here, but...). The problems are naming and getting a
version that is both correct for all operands and fast.
]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20041012/ce6044b3/attachment.pgp


More information about the cairo mailing list