Re: composites circle

Alex Vazquez <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAOTEMUTHb54WQZvXvNS9b_MXAMLKKyvkjzN_WBYWH_YZXFH9Pg@mail.gmail.com>
> Code:
> http://pasted.co/634b16c6
In the code, if I comment the code (background) the effect work fine but
without background. I don't understand why if I paint a black background
and destroy the cairo_t (background) the background affect to the second
cairo_t (effect).
I try with cairo_save/cairo_restore:

//Background
    cr = cairo_create (surface);
    cairo_save (cr);
cairo_set_source_rgba (cr, 0, 0, 0, 1);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_paint (cr);
cairo_restore (cr);
cairo_destroy (cr);

but don't work.
Is there any way to avoid this ?

Regards!!


2016-01-17 1:25 GMT+01:00 Lawrence D'Oliveiro <[email protected]>:

> On Sat, 16 Jan 2016 23:55:52 +0100, Alex Vazquez wrote:
>
> > Code:
> > http://pasted.co/634b16c6
>
> This does not seem to be using alpha transparency anywhere.
>
> But going back to the original example
> <http://postimg.org/image/ieohdu29t/>, I think I previously
> misunderstood what was going on. Each disc is opaque outside the
> intersecting area. The intersecting part has a mix of the two colours.
>
> So really, draw each circle with an opaque colour clipped outside the
> other circle. Then fill the mixed colour, clipped to the intersection
> of the two circles.
> --
> cairo mailing list
> [email protected]
> http://lists.cairographics.org/mailman/listinfo/cairo
>

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.