[cairo] Extending XRender to support non-blurry edges for transformations(?)
Bill Spitzak
spitzak at thefoundry.co.uk
Wed Jul 30 16:45:14 PDT 2008
I would put it into the repeat property, maybe call it EXTEND_BLACK.
I really believe the behavior you described is *always* wanted, and that
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 cairo
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:
> Hi,
>
> 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 set
> on the source and using billinear interpolation, as shown here:
> http://picasaweb.google.com/linuxhippy/Transformations/photo#5226911151131301954
>
> Java itself requires scaled images to have sharp edges, so in order to
> 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 draw
> 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 restricting
> 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:
> https://bugs.freedesktop.org/show_bug.cgi?id=16847
>
> 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
> http://lists.cairographics.org/mailman/listinfo/cairo
--
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:
www.thefoundry.co.uk
The Foundry Visionmongers Ltd * Registered in England and Wales No: 4642027
More information about the cairo
mailing list