On Mon, 2010-08-02 at 09:37 -0700, Rashid wrote:
> I dont know why,
> 
> but im to stupid to blitting transparent images with xlib. DAMN, with
> SDL was ist quite easy. Dont know if someone want to help me, but im
> trying it since days and getting mad over time... 
> 
> Can someone have a quick look, why it isnt working? skullmask.xpm is a 1
> bit image. Use ./built für building (make is for cross compiling). 
> 
> The whole stuff is in the zip archive. I would be realy happy someone
> would help me.

It looks like XpmReadFileToPixmap is producing a pixmap with the wrong
depth, which is being rejected by XSetClipMask.  It works for me if I
change the call to this:

        XpmAttributes attr;
        attr.depth = 1;
        attr.valuemask = XpmDepth;
        if (XpmReadFileToPixmap(mainwindow->display, mainwindow->window,
                                "skullmask.xpm", &skullImage.clipmask,
                                &maskshade, &attr)) {
            printf ("Error reading file (XpmReadFileToPixmap)\n");
            exit (1);
        }

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
_______________________________________________
[email protected]: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: [email protected]

Reply via email to