Resent-From: Claude.Marche at lri.fr (Claude Marche) Resent-Message-ID: <15465.15041.778808.903499 at mailhost.lri.fr> Resent-Date: Tue, 12 Feb 2002 16:54:41 +0100 Resent-To: lablgtk at kaba.or.jp MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <15458.33408.995982.867402 at mailhost.lri.fr> In-Reply-To: <15457.21787.141067.797728 at mailhost.lri.fr> References: <15457.21787.141067.797728 at mailhost.lri.fr> From: Claude Marche To: Cc: Subject: Re: drawing non rectangular pixmaps Date: Thu, 7 Feb 2002 14:34:56 +0100 OK, I answer to myself : I should have used method set_clip_mask (and set_clip_origin, in the real application I have). Naively, I though this was done automagically somewhere... Sorry to bother you with my problems. - Claude >>>>> "Claude" == Claude Marche writes: Claude> Hi all, Claude> I would like to draw, using GDraw.pixmap#put_pixmap, a non rectangular Claude> pixmap inside a larger one. By non rectangular, I mean that some pixels Claude> are "transparent", in the sense that in the pixmap file, their color is Claude> "None". Claude> My attempt does not work, every transparent pixel is displayed as Claude> white, hiding the pixel that may have been there before. Roughly, my Claude> program is : Claude> let small_image = GDraw.pixmap_from_xpm "small_image.xpm" in Claude> let draw_area = (top_window#draw_area : GMisc.pixmap) in Claude> draw_area#pixmap#put_pixmap ~x:200 ~y:100 ~xsrc:0 Claude> ~ysrc:0 ~width:32 ~height:32 Claude> small_image#pixmap; Claude> draw_area#misc#draw None Claude> Could anybody help me? Thanks in advance for any hint Claude> - Claude Claude> -- Claude> | Claude Marché | mailto:Claude.Marche@lri.fr | Claude> | LRI - Bât. 490 | http://www.lri.fr/~marche/ | Claude> | Université de Paris-Sud | phoneto: +33 1 69 15 64 85 | Claude> | F-91405 ORSAY Cedex | faxto: +33 1 69 15 65 86 | -- | Claude Marché | mailto:Claude.Marche@lri.fr | | LRI - Bât. 490 | http://www.lri.fr/~marche/ | | Université de Paris-Sud | phoneto: +33 1 69 15 64 85 | | F-91405 ORSAY Cedex | faxto: +33 1 69 15 65 86 |