I'm working on a small CLX project (Solitaire, in fact), and I'm trying to use a 
fairly standard technique: set the clip mask to a bitmap, which is a pixmap of depth 
one, in order to constrain drawing operations to a region of arbitrary shape. 

  Well, I can do that right enough.  I can create a bitmap; I can even
use it as the clip mask.  What I can't do is actually draw into the bitmap.  (Thus, 
since it's uninitialized, the drawing results look like
garbage - but the same garbage for the duration of each run, you see,
so I know it's working.)

  If I try to use (put-image), no matter how carefully I prepare the image and ensure 
that it only has one bit of depth, and no matter whether I use the image-x, image-xy, 
or image-z formats, it results
in a match-error.

  I also get a match-error, oddly, on any other attempted drawing operation into the 
bitmap.  At first I suspected that this was due to
the gcontext specifying a foreground color which the bitmap couldn't
handle; but I can't imagine what it should be, in that case.  I
tried (screen-black-value), 0, and 1.

  I did a long search looking for any CLX code anywhere which uses
this technique, but actually, I couldn't find a single example.  I
did have no trouble finding C programs which use it...

  At this point, I'm implementing a workaround rather than banging on
CLX, but it would be handy to be able to do this.  Even if not for me,
surely somebody else must want it?  Right?

  Any suggestions?

-- 
| Dan Knapp, Knight of the Random Seed
| http://brain.mics.net/~dankna/
| ONES WHO DOES NOT HAVE TRIFORCE CAN'T GO IN.

Reply via email to