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

Clemens Eisserer linuxhippy at gmail.com
Wed Jul 30 18:18:38 PDT 2008


Hi again,

> 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).

I think I've found a solution which does not have the need for
explicit geometry generation:
Simply use a mask which has the same dimensions as the original image
(can also be a larger mask restricted with clipping), set a billinear
filter on the source and a nearest on the mask and after that apply
the same transformation to both source and mask.
It should give the desired result when REPEAT_PAD (or for cairo:
EXTEND_PAD) is used.

I am not 100% sure it works, because Xorg for now doesn't implement
REPEAT_PAD, but as far as I can imagine it should?

lg Clemens


More information about the cairo mailing list