Re: pixmaps and xpm-transparency



On Tue, 17 Apr 2001, Tobias Hintze wrote:
> On Tue, Apr 17, 2001 at 04:50:04PM +0100, J. Ali Harlow wrote:
> > 
> > Pixmaps don't support transparency. You have to use pixbufs.
> 
> so i have to use GTK+2.0 API? seems so.

To use Pixbuf, yes.

> well, perhaps i don't need transparency but have to use my masks the
> right way. (i just need one-bit-depth-transparency)
> 
> is it possible somehow to draw pixmap2 over pixmap1 using a mask
> (from pixmap2)?

I've never done this myself, but why don't you try gdk_gc_set_clip_mask.

> > When I get time I'll put together a test program and
> > log a bug against it. And least that way I'll get a response, even if it's just
> > to tell me that I've misunderstood how it's supposed to work.)
> 
> so give me a line then...o

If you want a solution using images (which works in GTK+ 1.2.x) and is
nice and fast please have a look at the algorithms I use for Slash'EM at:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/slashem/slashem/win/gtk2/

gtktile.c (high level) and xshmmap.c (low level) are the files of interest.

Warning: The GTK+ team don't like this method. You must make up your own mind.

HTH

-- 
Ali Harlow                              Email: ali avrc city ac uk
Research programmer                     Tel:   (020) 7477 8000 X 4348
Applied Vision Research Centre          Intl: +44 20 7477 8000 X 4348
City University                         Fax:   (020) 7505 5515
London                                  Intl: +44 20 7505 5515




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