Adding input masking to Composite extension

Keith Packard keithp at keithp.com
Fri Nov 23 17:46:43 PST 2007


On Fri, 2007-11-23 at 20:06 -0500, Behdad Esfahbod wrote:
> Nice idea.
> 
> On Fri, 2007-11-23 at 16:27 -0800, Keith Packard wrote:
> > 
> >             bool pixel_is_inside (pixel, mask, upper, lower)
> >                 if (lower < upper)
> >                     return lower <= (pixel & mask) && upper < (pixel & mask)
> >                 else
> >                     return lower <= (pixel & mask) || upper < (pixel & mask)
> 
> Do you mean "upper > "?

yeah, oops:

            bool pixel_is_inside (pixel, mask, upper, lower)
                if (lower < upper)
                    return lower <= (pixel & mask) && (pixel & mask) < upper
                else
                    return lower <= (pixel & mask) || (pixel & mask) < upper

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20071123/bed58a02/attachment.pgp>


More information about the xorg mailing list