[cairo] Transparency and CAIRO_OPERATOR_SOURCE
ldo at geek-central.gen.nz
Thu May 18 02:34:22 UTC 2017
On Tue, 16 May 2017 08:12:29 +0000, mike e wrote:
> My program redraws itself many times per second, which means (I
> believe) that I have two options regarding transparency: clear the
> surface before each redraw, or use CAIRO_OPERATOR_SOURCE for each
> draw (please correct me if I'm wrong).
Always clear the surface.
> I would expect this behavior from CAIRO_OPERATOR_OVER, but not
> CAIRO_OPERATOR_SOURCE; is there something I'm missing?
Yes: anti-aliasing. This means even OPERATOR_SOURCE does not completely
replace destination pixels. The only way to be sure you get the same
result is to start from a clean slate each time.
More information about the cairo