[Cairo] Re: Text APIs round 2
Keith Packard
keithp at keithp.com
Thu Aug 14 11:55:33 PDT 2003
Around 14 o'clock on Aug 14, graydon hoare wrote:
> the point I was making is that some users of cairo will in some cases
> *certainly* need to use the native font API, so we're going to be
> caching a pointer to the native structure anyways. that makes for one
> more pointer I have to keep in my struct and one more thing I have to
> keep in sync with cairo any time a font call is made.
I was thinking that applications would instead save *only* the native
pointer and convert to the generic type when setting it into the rendering
context. Saving two pointers is clearly a bad idea; as I said, if you
think that's going to be necessary, I don't see any advantage to having
native types when the insides are completely virtual in any case if there
isn't any effective typechecking (the existance of a back conversion
function obviates any typechecking in practice).
> I'd prefer to just ask cairo at runtime, but I can live with it either way.
I'm not sure that makes sense -- you can't do anything with the native
datatypes except pass them to native functions, so you're going to have to
do compile-time checking in any case.
-keith
More information about the cairo
mailing list