[Xr] Help !!! GTK and Xr

Soorya Kuloor skuloor at verano.com
Tue Apr 29 08:21:40 PDT 2003

On Mon, 2003-04-28 at 18:47, Carl Worth wrote:
> On Apr 28, Soorya Kuloor wrote:
>  > On Mon, 2003-04-28 at 16:08, Owen Taylor wrote:
>  > > If you are called in an expose() handler, you probably need to
>  > > use 
> Owen, thanks for the answer. I assumed it was something like this, but
> I'm mostly ignorant of GTK+, so I wasn't going to be much help.
>  > > > 2. I do not understand what to do with the GC object
>  > > 
>  > > Why do you think you need a GC?
>  > 
>  > The SWT toolkit's examples use drawing on the GC object for 2D stuff
>  > when using their drawing routines. This is where I got confused.
> It may be that the meaning of the term GC is overloaded in the
> discussion.
> For X at least, you don't draw "onto" a GC, but instead the GC
> stores graphics drawing state for the core rendering routines,
> (eg. XDrawLines, XPutImage, etc.).
> With Xr, the XrState object serves a similar role. Xr provides an
> alternative rendering interface, so you should never need the core
> rendering routines, nor a GC.

Yes, I understood that much. This is what confused me a bit more because
SWT used GC (so does Windows GDI API) object and now I have 2 GC like
thingies (SWT GC and Xr's XrState) and could not figure out how to use
them together. But that's old story now anyways.

> -Carl

Part of my task in this Eclipse/Render/GDI+ exercise is to write
programs to do some benchmarking under different conditions
(anti-aliasing on/off, with alpha/without). This will also help me
understand the speed differences and may point out bottlenecks or
potential for speedups especially in Xr/Xc/Render.

I am starting from scratch here. Any help or ideas in this regard are
greatly appreciated. I'll be writing most of the tests in C layer and
Java layer.

Soorya Kuloor 
Email: skuloor at verano.com

More information about the cairo mailing list