[cairo] defining CLAMP extend mode
otaylor at redhat.com
Mon Oct 23 15:57:34 PDT 2006
On Mon, 2006-10-23 at 15:50 -0700, Bill Spitzak wrote:
> I might have the terms wrong. By "EXTEND_PAD" I mean the filtering is
> done such that when requesting a pixel to be filtered, the pixel
> coordinates are clamped to the source rectangle.
That's what it is supposed to mean, yes.
> Another way of looking at it is imagining the image has the rows and
> columns of pixels on the edge repeat to infinity, producing "stripes" at
> right angles to the image edge, and the corners are filled to infinity
> with the value of the corner pixel. This new source image is used for
> the filtering.
> This is entirely independent of figuring out the antialised coverage of
> the resulting output pixel. This needs to be done by multiplying the
> filtered image pixel by a correctly antialiased rectangle. Don't be
> tempted to think that the clamping and the antialiasing use the same
> code, they don't, because of math inaccuracy, there very well may be
> pixels that are 100% opaque but have clamped samples, and pixels that
> have no clamped samples but are partially transparent.
I think there is general consensus about the desired effect - just
disagreement about the right API for getting there
Vladimir: This is a new sampling mode. (A sampling mode that is
quite different in implementation than any of the existing modes
.. it doesn't just affect the final point sample from the source
image but extends up the pipeline...)
Me: We should simply provide EXTEND_PAD, and then leave it up to the
application to draw the correct output shape
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20061023/1bdbdf36/attachment.pgp
More information about the cairo