[cairo] Drawing to multiple windows on Windows

Sam Bazley sambazley at fastmail.com
Sun Mar 1 00:41:47 UTC 2020


Hi,

I'm using Cairo on Windows. It works fine when I'm drawing to one
window, but when I try to draw to another at the same time, I get some
strange behaviour. This video shows the issue
https://streamable.com/djhyu

Here's the code:

cairo_set_operator(ctx_right, CAIRO_OPERATOR_OVER);
cairo_set_source_rgba(ctx_right, 0, 0, 1, 1.0);
cairo_paint(ctx_right);

cairo_set_operator(vis_ctx_right, CAIRO_OPERATOR_SOURCE);
cairo_set_source_surface(vis_ctx_right, sfc_right, 0, 0);
cairo_paint(vis_ctx_right);


cairo_set_operator(ctx_left, CAIRO_OPERATOR_OVER);
cairo_set_source_rgba(ctx_left, 1, 0, 0, 1.0);
cairo_paint(ctx_left);

cairo_set_operator(vis_ctx_left, CAIRO_OPERATOR_SOURCE);
cairo_set_source_surface(vis_ctx_left, sfc_left, 0, 0);
cairo_paint(vis_ctx_left);

Any ideas would be appreciated.

Thanks,
Sam


More information about the cairo mailing list