[cairo] Extending XRender to support non-blurry edges for transformations(?)

Carl Worth cworth at cworth.org
Wed Jul 30 17:42:14 PDT 2008


On Thu, 2008-07-31 at 00:45 +0100, Bill Spitzak wrote:
> I would put it into the repeat property, maybe call it EXTEND_BLACK.
...
> It should look and act exactly like EXTEND_REPEAT when the clip region 
> is set to the transformed quad surrounding the source picture.

A description like the above is always where previous proposals have
fallen down.

It's easy to describe the high-level result desired, (a rotated, scaled
image with internal blurring but no blurring on the edges). And it's
possible to achieve that result with cairo, (EXTEND_PAD,
cairo_rectangle, cairo_fill).

But for some reason, proposals keep coming up trying to make
cairo_paint, (or XRenderComposite), achieve that same result. And these
proposals keep suggesting there is some extend mode that can achieve it.
How do you define that extend mode exactly? Recall that an extend mode
is defined by what values should be returned when attempting to
reference a pixel that is "outside" a source surface.

The magic behavior would require an extend mode that returns different
values for the same (x,y) samples depending on internal state of the
filtering engine that is requesting those samples.

And even if that were achieved somehow, there are still problems as
discussed in the old EXTEND_CLAMP thread:

http://lists.cairographics.org/archives/cairo/2006-October/008241.html

We'd really need to see a concret proposal that addresses those issues
before there's anything we can change here.

Meanwhile, there is a fine way to draw the desired result with cairo,
(the missing EXTEND_PAD support mentioned in the old thread is in place
now).

-Carl




More information about the cairo mailing list