On Mon, 07 Feb 2005 22:04:37 -0200 Adilson Oliveira
(B<[EMAIL PROTECTED]> babbled:
(B
(B> Hello.
(B>
(B> I'm sorry to bring this subject again but I really could use some help here.
(B> I'm working on an application which needs to use XShape extension to
(B> create a window with a transparent background. So far so good, the
(B> problem is that this mask has to be changed constantly, using the window
(B> background as key to it.
(B> Right now what I'm doing, is for every bitmap I need to put on the
(B> window, I scan for the background color, create the mask, put the image
(B> and apply the mask using XShapeCombineShape.
(B> Should be straightforward I think, but I'm getting all sort of weird
(B> things like the mask not doing any effect, etc.
(B> I experimented on creating a fix mask and apply. This works very well,
(B> the problem seens to arise when I try to manipulate the bitmap mask and
(B> use it several times.
(B> The documentation I found do far is very thin specialy on examples how
(B> to use other XShape related functions like XShapeOffsetShape,
(B> XShapeCombineMask, etc. I took a look in programs that uses it like
(B> oclock, xteddy, etc but they don't go deep on it.
(B> Does anyone knows a better source of documentation about XShape and it's
(B> related fuctions in general.
(B> Perhaps I'm messing with the bitmap mask but all the tests I made so far
(B> indicates that it's been created correctly.
(B> Any advice will be very apreciated.
(B
(Bxshape in my experience works perfectly - so you can pretty much discount bugs
(Bthere. the simplest way to use it is XShapeCombineMask() where you create a 1bit
(Bpixmap where 0 bits are "transparent" and 1 bits are solid - draw it, fill it
(Bthen set the shape for your window. the pixmap is no longer needed after you set
(Bthe mask as it is converted into a list of rectangles so you can free it. other
(Bways are to set the rectangle list yourself with XShapeCombineRectangles()
(B(always set the rectangle ordering to unordered to avoid bugs). you can also use
(Bthe shapes of other windows and merge/combine them (if another window already
(Bhas the shape you want - eg a window manager wants to use the client window's
(Bshape and COMBINE it with its own frame window shape) using
(BXShapeCombineShape(). some of the best code u'll find inside windowmanagers to
(Bdo some of this :) pick any one. enlightenment does a fair bit with shapes for
(Bexample. :) other wm's should be equally good.
(B
(B
(B--
(B------------- Codito, ergo sum - "I code, therefore I am" --------------
(BThe Rasterman (Carsten Haitzler) [EMAIL PROTECTED]
$BMg9%B?(B [EMAIL PROTECTED]
(BTokyo, Japan ($BEl5~(B $BF|K\(B)
(B_______________________________________________
(BDevel mailing list
([email protected]
(Bhttp://XFree86.Org/mailman/listinfo/devel