[cairo] Xlib/Xcb and EXTEND_PAD

Bill Spitzak spitzak at thefoundry.co.uk
Tue Jan 20 17:19:24 PST 2009


Zack Weinberg wrote:

> At any rate, the installed base of Cairo is so large at this point that
> I don't think your proposed change can realistically be made

I agree that removing the repeating settings cannot be made to Cairo now.

What I think can be done is to change EXTEND_NONE to instead mean 
"EXTEND_PAD + clip to transformed source rectangle". This will remove a 
pretty useless mode and replace it with the result that most (all?) 
users expect. It would be reasonably compatible with older Cairo, just 
that the older ones make "blurry edge" results.

>> Removing the need to check the padding type from the backends would
>> help a lot to force them to update to correct behavior.
> 
> ... because the current set of problems with EXTEND_PAD are not in
> cairo itself, but in the X video drivers, which are maintained by a
> completely different group.

What I meant was that if Cairo *always* turned on EXTEND_PAD then I 
think the bugs would have been fixed a lot sooner.

> Tangentially, it would be very nice to be able to clip a source image
> and then have the EXTEND mode apply *after* clipping; that would
> eliminate several cases where we have to use a scratch surface.  We
> only need this for a rectangular clip region.  I'm aware that there's a
> dispute over what this feature ought to do for arbitrary clip regions,
> but there's no definition problem for rectangles; perhaps the right API
> is something like cairo_pattern_set_source_clip(rectangle).

Isn't there some way to make a new surface that is equivalent to a 
subrectangle of another surface? That might be the right way to do it.

-- 
Bill Spitzak, Senior Software Engineer
The Foundry, 618 Hampton Drive, Venice, CA, 90291, USA
Tel: +1 310 399-4555 * Fax: +1 310 450-4516 * Web: www.thefoundry.co.uk
The Foundry Visionmongers Ltd * Registered in England and Wales No: 4642027


More information about the cairo mailing list