[cairo] GTKCairo development
otaylor at redhat.com
Sun May 2 07:46:31 PDT 2004
On Sat, 2004-05-01 at 11:17, Øyvind Kolås wrote:
> * Owen Taylor <otaylor at redhat.com> [040501 16:42]:
> > We might want a convenience function something on the Gdk/Cairo
> > interface to set the Cairo color from a GdkColor so you
> > can do:
> > gdk_cairo_set_color (cairo, &style->base[GTK_STATE_NORMAL]);
> Somehow I feel cairo_gdk_set_color would make more sense, since the first
> parameter for the function is the cairo state, my initial naming of
> cairo_set_g?k_color was to make it similar to cairo_set_rgb_color.
> I've implemented the function in the cairo_custom.[ch] files of the
> gtkcairo_slide example, using your naming convention, on the grounds
> that it only is necesary when using g?k with cairo, and it is uninteresting
> in all other cases.
The naming above was just meant to be a placeholder. I assumed you'd
adapt it to whatever naming conventions you are using.
(Note concept of namespacing ... generally all functions in a library
should start with the same prefix to minimize the possibility of
conflicts between libraries.)
> > Here what we need is Pango/Cairo integration ... obviously that is a
> > fairly big job, but since we have a real font system, spending effort
> > integrating GTK+ with the toy font system is a bit weird. It's on my
> > roadmap, but probably will take a while yet. If someone else wanted to
> > play around with that, that would be great.
> The only reason to spend some effort integrating this is that the toy
> API in cairo is good enough for very simple things, like labels, and
> I think the default case of not choosing a font should automatically
> choose a font that is consistent with the rest of the ui.
In the future when we are using Cairo within GTK+, I'll have to figure
out how to strongly discourage using, maybe even break the toy text
APIs :-) They will not provide consistent rendering with the real APIs
or correct rendering of many of the world's scripts.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20040502/6adc2b9d/attachment.pgp
More information about the cairo