To: Claude.Marche at lri.fr Cc: stalkern2 at tin.it, lablgtk at kaba.or.jp Subject: Re: animation: pixmap transparency? In-Reply-To: <16138.54573.314788.280376 at mailhost.lri.fr> References: <200307080926.20760.stalkern2 at tin.it> <200307081555.38754.stalkern2@tin.it> <16138.54573.314788.280376@mailhost.lri.fr> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20030709092440G.garrigue at kurims.kyoto-u.ac.jp> Date: Wed, 09 Jul 2003 09:24:40 +0900 From: Jacques Garrigue Lines: 27 From: Claude Marche > Hi Ernesto, > > I think you should deactivate the clip mask before drawing your > background. May be such a possibility is missing in lablgtk: directly > in C, one may call Gdk_GC::set_clip_mask without argument to unset the > clip mask, but I see no way to call it without argument from lablgtk. > > lablgtk maintainers, in ideas ? You're damn right. This is indeed a stupid oversight. The only workaround I see is to use another GC. If you are using a GDraw.pixmap, this can be done by let pixmap2 = new GDraw.pixmap pixmap#pixmap ?mask:pixmap#mask This way you can use two GCs: one with no clip mask, and the oter with a clip mask you can change as needed. I'm not sure how this should be fixed in the library. One way it to make the argument to #set_clip_mask an option, but this is incompatible, and not so nice. Another idea would to add a #new_gc method, which would return a new object with a different GC. That is, the above workaround would become let pixmap2 = pixmap#new_gc This looks conceptually cleaner to me. Jacques