[Xr] Help !!! GTK and Xr
Soorya Kuloor
skuloor at verano.com
Mon Apr 28 12:46:18 PDT 2003
Sorry for replying to my own posting here. Since I posted this message,
I am able to draw stuff on a GdkPixmap and then draw it on the GC. So
the double buffering scenario works fine. The problem was that, I forgot
to call XrFill() or XrStroke() function once I did all the Xr path
related calls.
However, drawing on the GtkWidget->window still does not work.
Thanks,
-- Soorya
On Mon, 2003-04-28 at 13:12, Soorya Kuloor wrote:
> Hi,
>
> I am new to 2D stuff and for that matter with Gtk. I am trying to
> develop an Xr based extension to Eclipse on Linux (Redhat 9). I am using
> the Gtk version of eclipse. I am trying to use drawing with and without
> double-buffering.
>
> In the SWT programs paint() method, I have the following objects at
> hand:
>
> * A GtkWidget object that represents the SWT Shell that I am drawing on
>
> * A GdkGC object that represents the GC that I need to draw on
>
> * For use in double buffering, I can also create a SWT Image object,
> which encapsulates a GdkPixmap object.
>
> I am using a JNI layer library to link the Java world to the C world.
> The JNI layer basically exports the Xr API into Java plus some
> convinience functions to set drawables.
>
> I have tried a whole bunch of arguments to XrSetTargetDrawable()
> function.
>
> The 'drawable' arg that I tried are
>
> 1. GDK_DRAWABLE_XID(widget->window)
>
> 2. I do not understand what to do with the GC object
>
> 3. In double buffering case GDK_PIXMAP_XID(gdkpixmap) as the arg to the
> 'drawable' parameter.
>
> None of them seem to work and I cannot understand why.
>
> Does anyone in the list have a working example that uses Gtk and Xr
> together?
>
> Any help or advice in this regard is greatly appreciated.
>
> Thanks,
More information about the cairo
mailing list