[Pixman] [PATCH 4/8] Better support for NONE repeat in nearest scaling main loop template
Bill Spitzak
spitzak at gmail.com
Thu Feb 10 18:47:35 PST 2011
Siarhei Siamashka wrote:
> Anyway, right now I'm actually working on a similar function
> specifically for
>
> bilinear scaling, which would detect 5 zones:
Actually it appears it would be very helpful if "None" instead produced
an image identical to using repeat or mirror of the edges, but with the
current Cairo mask intersected with the quadrilateral that is the
transform of the image edges into destination space.
This would produce a sharp antialiased edge no matter how much the
source image is expanded. This is pretty much a requirement if you want
to display a scaled version of an image with non-zero alpha at the edges.
It is true that this output can be achieved with existing Cairo (by
setting repeat and using a temporary mask). The reason for making this
the default is that it is apparently what users always expect, and it
would match other graphics libraries. I suspect removing the need for
black sampling of images would make pixman simpler, too.
This would also avoid double-multiplication of the edges when the user
draws an image in a path that lines up with the edges. This produces
unwanted seams or dark edges. It would require the quad and path to be
intersected as vectors and not pixels, however.
More information about the Pixman
mailing list