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

Jost Boekemeier jost2345 at yahoo.de
Thu Jul 22 11:49:00 PDT 2004


On Thu, 2004-07-22 at 03:06, viczh wrote:

> implicit objects and gsave/grestore mechanism unnesessarily
> complicate CREATION of such interface over exisitng immediate mode
> API.

No, it's more the other way 'round.  Cairo has far more features than we
need for our implementation.  

And I still think that _testing_ if the pointer is inside the shape and
the _drawing_ of the shape itself are two different pairs of shoes.  For
example if I click slightly outside of a very thin line, does that count
as selecting the line or not?


> In case of explicit paths, when creating a retained-mode object you
> create an appropriate immediate mode counterpart (equivalent of
> display list) and when handling expose event you just run this
> display list, and you can hit test against all existing path objects
> in single call.

Yes, we may waste a few cycles by calculating the same information twice
for most of the shapes, but I don't think this is too expensive.


Jost





More information about the cairo mailing list