Re: [Newbie] Despairence about Graphics Context.



Hi,

On Mon, 2002-07-08 at 12:32, Jan Luehr wrote:
> > On Mon, 2002-07-08 at 07:45, Jan Luehr wrote:
> > > >are GObjects and as such cannot be allocated in the
> > > > stack.  You need to create one using gdk_gc_new() or
> > >
> 
> > Anyway, if you want to draw offscreen, I would use a GdkPixmap.  
> Yeap. I use one, and try to draw in it. See me first eMail

Ok, saw it.  What confused me is that you told me you couldn't use
gdk_gc_new() because widget->window was null, hence I thought you were
trying to draw on the widget's window directly.

Anyway, you should actually use the GdkPixmap (not an X pixmap) to
create the GC.  By looking at the headers, GdkWindow and GdkPixmap are
typedef'ed to the same struct (both are drawable... they are created
with different functions though).  And you don't need the GdkWindow to
create the pixmap; just to get default values which you can otherwise
supply yourself.

Cheers,
Gustavo





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