[cairo] How to draw an invisible rectangle?

Dirk Schönberger dirk.schoenberger at sz-online.de
Sun Dec 16 09:29:33 PST 2007


> Sounds like a case for your app deciding when it should be drawn and then
only
> creating and stroking the path at that stage.

Not quite. The path should eist (e.g in a generated SVG document), it only
should not be rendered.
Think e.g of a SVG document which should be embedded in a wordprocessor
document (given the fact that such a tool actually exist).
The invisible path could be used to define the outline of the document. But
because you don't know anything about the background of the document, you
don't want to render the path, just use it for flow calculations.

The most obvious way to do this would be to set a source surface to "NULL",
or to a special Null-Surface. The former variant may lead to unexpected
behaviour, because NULL may be treated as an invalid value.

Regards
Dirk







More information about the cairo mailing list