[cairo] How to draw an invisible rectangle?

Tuom Larsen tuom.larsen at gmail.com
Sun Dec 16 11:13:40 PST 2007


On Dec 16, 2007 7:27 PM, Baz <brian.ewins at gmail.com> wrote:

> what's wrong with
> cairo_set_source_rgba (cr, 0, 0, 0, 0);
> cairo_fill (cr);
>
> which should emit "fill: rgb(0,0,0); fill-opacity: 0" instead of
> "fill: none". The path will be transparent but used for flow
> calculations.
>
>
I don't want to picky, this surely works for very most cases. However:
- it requires PDF 1.4
- probably is slower to render
- doesn't work that well for lines and open curves because a line has a
width which might grow the bbox
- that "rgb(0,0,0)" makes no sence for "invisible"

But as I said, this works for most practical purposes, so thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20071216/80d6a2c4/attachment.html 


More information about the cairo mailing list