[cairo] Clip documentation and behaviour

Guillermo Rodriguez guillerodriguez.dev at gmail.com
Sun Jun 11 18:12:41 UTC 2017


Hi,

El domingo, 11 de junio de 2017, Maximilian Heinzler <m.heinzler at heinzler.de>
escribió:

> Hi all,
>
> while going through the clip functions I noticed two things:
>
> 1. The documentation for cairo_clip() says: "Calling cairo_clip() can
> only make the clip region smaller, never larger".
>
> Isn't that wrong? If I call cairo_clip() twice with different paths
> the clip region obviously grows.
>
> Why "obviously"? If you call cairo_clip twice with different paths, the
clip region should either get smaller or remain unchanged.


> Then also the first sentence "Establishes a new clip region by
> intersecting the current clip region with the current path" seems to
> be wrong, because intersecting the two would mean that the clip region
> can only get smaller.


Indeed. Hence the comment: "Calling cairo_clip() can only make the clip
region smaller, never larger"

Guillermo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20170611/10f1265a/attachment.html>


More information about the cairo mailing list