[cairo] defining CLAMP extend mode
Owen Taylor
otaylor at redhat.com
Wed Oct 25 06:39:16 PDT 2006
On Tue, 2006-10-24 at 16:25 -0700, Bill Spitzak wrote:
>
> Owen Taylor wrote:
> > On Mon, 2006-10-23 at 16:15 -0700, Bill Spitzak wrote:
> >
> >>> The behavior you are asking for is not implementable as sampling if you
> >>> are doing antialiasing by any means other than super-sampling.
> >> Not sure I understand this. If my plan cannot be done then multiplying
> >> two masks cannot be done.
> >
> > You can't generally multiply two masks. We get away with it a lot in
> > Cairo because it works OK as long as the two masks don't share an
> > anti-aliased contour.
>
> But in this case one of the images does NOT have an anti-aliased
> contour, as it is the EXTEND_PAD sampled image. By definition this image
> goes out to infinity and thus has no edge, antialiased or not. Therefore
> the multiplication will work fine.
What I was saying was simply that if we add a new extend mode
EXTEND_CLAMP, say, that has the meaning:
"Sample with EXTEND_PAD then multiple the image by a mask of the
transformed source"
Then we've taken away the ability of the application to choose their
own path for a fill, because if the application's fill has segments
that match the boundaries of the transformed source, you'll have
antialiasing problems.
- Owen
More information about the cairo
mailing list