[cairo] defining CLAMP extend mode

Bill Spitzak spitzak at d2.com
Mon Oct 23 16:26:24 PDT 2006



Owen Taylor wrote:

> 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

My proposal is:

Replace EXTEND_NONE and the default mode with the EXTEND_PAD result 
mulitiplied by a transformed rectangle of the source image. Switching 
between EXTEND_NONE and EXTEND_PAD just turns this rectangle 
multiplication on/off.



More information about the cairo mailing list