Re: pixmaps and xpm-transparency
- From: John Cupitt <john cupitt ng-london org uk>
- To: Tobias Hintze <hintze_gtk siemens md st schule de>
- Cc: gtk-list gnome org
- Subject: Re: pixmaps and xpm-transparency
- Date: Mon, 23 Apr 2001 12:55:05 +0100
Tobias Hintze wrote:
>
> On Sun, Apr 22, 2001 at 02:34:45PM +0200, Tobias Hintze wrote:
> > >
> > > You need to set the clip mask in the graphics context used for the
> > > draw using gdk_gc_set_clip_mask and gdk_gc_set_clip_origin.
> >
> > yes. this one just works too.
>
> just one question left:
>
> currently i fetch the GC via
>
> style = gtk_widget_get_style(gRootWindow);
> style->fg_gc[GTK_STATE_NORMAL];
>
> but that needs a already visible root-window.
> is there a better way?
I make an invisible top level window as my application starts (realised,
but not shown), then use that to grab GCs etc. for all the other
windows. Not the best way, but very easy.
gtk_init( argc, argv );
#ifdef DEBUG
gdk_rgb_set_verbose( TRUE );
#endif /*DEBUG*/
gdk_rgb_set_min_colors( 64 );
gdk_rgb_init();
main_window_top = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_widget_realize( main_window_top );
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]