[cairo] how do you draw an outline of a circle/ellipse

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Fri Nov 13 15:45:36 PST 2015

On Fri, 13 Nov 2015 10:43:27 +0100, Uli Schlachter wrote:

> The "trick" is that save/restore does not save/restore the current
> path.

Interesting that this is one difference I noticed between the Cairo
graphics model and the PostScript one.

Having the CTM affect the stroke line width is following PostScript
behaviour. But since, in PostScript, gsave/grestore also save/restore
the current path, you can’t quite use this same trick--you have to
explicitly change the CTM instead.

Explicitly changing the CTM works in Cairo as well.

More information about the cairo mailing list