Custom Drawables?



Hi,

I'm fairly new to GTK so excuse me for asking potentially lame questions. Did not find anything in the archive, however.

My problem is: I want my GTK code (basically calls to gtk_paint_whatever()) to paint on an external drawable rather than GdkWindow. (This external drawable is actually a Java java.awt.Graphics object.) This is, i need to export a Java Graphics object into my GTK code as a GdkDrawable (and also probably as a GdkGC too). So i'm seeking advice as for writing a custom GdkDrawable and/or GdkGC backed by an external object it will delegate to.

I could of course draw to a GdkDrawable then copy into a GdkPixbuf then transfer to my Graphics object, but i see this as a suboptimal solution (but may be wrong.)

So if there are any docs, code samples, real projects doing something similar etc, could you please share pointers with me. Any piece of knowledge will be helpful.

Thanks!
--
Peter                           peterz at rin dot ru



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