[cairo] Setting a background "layer"
ldo at geek-central.gen.nz
Tue Jan 17 03:59:02 UTC 2017
On Tue, 17 Jan 2017 02:47:30 +0000, mike e wrote:
> Is there a way to draw a layer, and then save that layer indefinitely
> (or have a layer dedicated to the text)?
Draw the background to an image surface, then you can then turn into a
pattern to blit it into the destination context, after which you draw
the foreground on top.
You could also try a recording surface. This records drawing calls, not
pixels, so it can work better if you need to scale the background.
More information about the cairo