Re: Deprecate GdkGC?



On 12/2/05, Federico Mena Quintero <federico ximian com> wrote:
On Fri, 2005-12-02 at 09:43 +0100, milosz derezynski wrote:
> Well, i volunteer for this. I have used cairo extensively for coding
> bmpx and i'm going to get to a very good point in documenting at least
> all the equivalents of gdk_draw_*()
>
> Federico: In which format should i write this, anything that would be
> preferred?

Excellent!  You'll make me owe you a beer.

The GTK+ documentation is written in DocBook ( www.docbook.org).  The
sources are in gtk+/docs/reference/gtk.  Look for the "migration"
chapters there.

If you don't know DocBook, don't worry.  Just write your docs as a text
file and I'll add the markup for you.

ok thx
i'll go start writing then :)

> PS: I've created a bug
> (http://bugzilla.gnome.org/show_bug.cgi?id=322996) and added a patch
> that adds a function gdk_cairo_set_source_drawable (), it's just 2
> function calls but i think it's more logical to the API user and makes
> for a more consistent API, and _gdk_drawable_ref_cairo_surface () is
> private anyway

This is to use a pixmap as a repeating pattern, or something like that,
right?

  Federico


Well this is meant to be an analogon to gdk_cairo_set_source_pixbuf ()..

Thinking about the docs i thought roughly of the equivalent operations of gdk_draw_*() with Cairo, and there is no real direct equivalent of gdk_draw_drawable(), so this function is meant to do "replace" it, but there are several implications to that patch which matthias and cworth pointed out to me, so i don't think this patch can hold as it is.

However i do think that for the sake of a consistent API there should be such a function (with this name) and there should be no 'exception' in which when someone wants to draw a drawable has to acquire cairo surfaces etc.. (I think in all cases of Cairo equivalent operations to gdk_draw_*() no one has to deal with the surfaces really, just with the cairo_t* cairo context itself, so this would be a real exception).

There was a discussion on #gtk+ about this but i'm sorry i can't fully repeat it right now :(

In any case though matthias pointed this bug out to me with special attention to owen's comment on it: http://bugzilla.gnome.org/show_bug.cgi?id=318805


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]