[cairo] Extending XRender to support non-blurry edges for transformations(?)
vladimir at pobox.com
Wed Jul 30 17:14:13 PDT 2008
We've had discussions about exactly this in the past; my EXTEND_CLAMP
suggestion is essentially this. The problem is that it breaks down in
the most general case as was described in earlier threads... I do
agree that the clamping/black/whatever behavior is what is wanted in
99% of all cases, and that we should figure out a way to define it.
Noone's been able to do so in a satisfactory manner so far, though.
On Jul 30, 2008, at 4:45 PM, Bill Spitzak wrote:
> I would put it into the repeat property, maybe call it EXTEND_BLACK.
> I really believe the behavior you described is *always* wanted, and
> in fact the current default is so useless, I would just *change*
> EXTEND_NONE to do exactly this and thus remove the need for either
> or pixman to support the current default. But if people cannot be
> convinced of that, it should be added as a new option.
> It should look and act exactly like EXTEND_REPEAT when the clip region
> is set to the transformed quad surrounding the source picture.
> Clemens Eisserer wrote:
>> I am currently implementing a Java2D-XRender backend and I am faced
>> with the problem that XRender always interpolates the edges with the
>> transparent pixels surrounding it when a scaling transformation is
>> on the source and using billinear interpolation, as shown here:
>> Java itself requires scaled images to have sharp edges, so in order
>> comply with the java2d-spec I would have to fall back to software :-/
>> I've read that Cairo-1.6.4 now has support for EXTEND_REPEAT on
>> image-surfaces, which allows to work arround that problem.
>> However it still has some overhead if the user just would like to
>> a single transformed image - it requires to draw the geometry of the
>> transformed image in a mask and its not supported by Xorg for now.
>> What do you think about extending XRender with support for
>> filter to source picture only?
>> I guess for the drivers it should be no problem to implement it, and
>> if the driver only supports REPEAT_PAD (unfourtunatly I don't know
>> one) it still could be emulated on the server-side easily.
>> I've opened a feature-request:
>> It could be either done as:
>> - New attribute in PictureFormat
>> - A new Repeat property, like RepeatStop
>> - A new set of filters, like billinear_sharp
>> I would be happy to hear about suggestions and ideas.
>> Do you think this could be also benefitial for cairo?
>> Thanks, Clemens
>> cairo mailing list
>> cairo at cairographics.org
> Bill Spitzak, Senior Software Engineer
> The Foundry, 1 Wardour Street, London, W1D 6PA, UK
> Tel: +44 (0)20 7434 0449 * Fax: +44 (0)20 7434 1550 * Web:
> The Foundry Visionmongers Ltd * Registered in England and Wales No:
> cairo mailing list
> cairo at cairographics.org
More information about the cairo