[cairo] cairo as an immediate base for retained API and gsave/grestore

viczh viczh at myway.com
Thu Jul 22 12:53:48 PDT 2004


OK, guys, I surrender.

You have excellent interface, and having cairo_copy ability
definitely helps. Having explicit gstate would help even more.
The ability to feed array of coordinates is not very useful,
when you deal with mixed straight/curved paths. You need to
mark points as belonging to straight/curved regions or being
begin/end of such regions. MS DirectX has something like this
in their immediate-mode interface - not very convenient as far
as I can recall.

I never argued that cairo missing a feature preventing
implementation of retained-mode interface. I just tried to imagine
how would I implement it and what in my opinion helps it, in
contrast to using cairo directly in immediate mode.

Admittedly, there is no much difference, because I suspect that you
rarely use it to draw couple of forms directly. You already have some
structure, which you want to draw, and usually do this with generic
enough code.

Re calculating paths twice. The amount of calculation depends heavily
on the path complexity. If it is highly curved path, it can be
prohibitively expensive, and it is definitely not very wise to
instantiate/consume path on every mouse move.

The point is that you can not abstract completely the drawing layer.
Sometimes you can not compensate for missing feature adequately on a
higher layer.

Peace,
Victor.

_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way your home on the Web - http://www.myway.com



More information about the cairo mailing list