I'm creating an XImage, computing a bitmap mask from it, and then writing the
image to the screen using the mask, as follows:
bitmap = XCreateImage(
display,
xv_get( canvas_paint_window( get_canvas()), XV_VISUAL),
8, /* depth */
ZPixmap,
0, /* offset */
bit_data,
width,
height,
8, /* pad unit */
width /* bytes per line */
);
..
bitmap_stencil = XCreateBitmapFromData( display, drawable,
stencil_data, width, height);
..
XSetFunction( display, gc, GXcopy);
XSetClipMask( display, gc, bitmap_stencil);
XPutImage( display,
drawable,
gc,
bitmap,
0,
0,
xpos,
ypos,
width,
height);
Writing the image without the clip mask set, shows the image is is expected.
Using the bitmap_stencil as a stipple for a rectangle shows the stipple is as expected.
Yet the clipping process removes the ENTIRE image not just THOSE PIXELS NOT SET in
stencil_data.
Does anyone have any idea why?
Thanks in advance
--
Robin E. Charlton Email: ro...@apg.philips.co.uk
Advanced Projects Group Tel: +44 (0)1293 815 134
Philips Sound & Vision Fax: +44 (0)1293 815 050
Cross Oak Lane, Redhill, Surrey, UK