[cairo] cairo_set_user_data () and other "set_user_data" functions
dagoldman at yahoo.com
Fri Aug 20 14:56:01 PDT 2010
> > When might I want to use cairo_set_user_data () and the other
> > functions? I understand what cairo_set_user_data () does.
> Whenever you wish to attach some non-cairo data to a cairo object.
> Typically, you'd attach a resource whose lifetime is dependent on the
> lifetime of the cairo object, thereby passing ownership of the
> resource to the cairo object.
> > But I looked through
> > the docs and archive and couldn't see any examples or guidance related to
> > real-world use.
> Koders.com or google code search are a great tools for finding
> real-world uses of APIs. For instance
I already understood what the function does. What I'm looking for asking is a
specific example. What kind of resource might typically get attached in a
real-world case? Yes, the search results show real world use on the API, but
they shed little or no light on my general question.
More information about the cairo