CLIM mail archive

[Prev][Next][Index][Thread]

Re: Problem with clim:draw-icon




   > ;; But seriously, I do have a real problem.  It is with the "clim:draw-icon"
   > ;; function.  As I understood it (from the class I took from Symbolics) this
   > ;; function is supposed to basically do a bitblt of the pattern you give
   > ;; it at the coordinates you give it.  However, it tends to get the pattern
   > ;; all mish-mashed.  As an example, below is a short segment of code that
   > ;; tries to draw my airplane glyph somewhere on the on a display pane.
   > ;; To try it, load it into either Genera or Allegro CL (with CLIM loaded, 
   > ;; of course).  For Allegro, run "(start)".  For Genera, type <select>-<circle>.

Interesting, I tried this program and what I discovered is that the glyph is
simply repeated (or tiled) over the whole screen, but initialy is not visible.
Then, the DRAW-ICON function simply makes a portion of the tiled screen visible;
this portion is defined by the X,Y coordinates of the call to DRAW-ICON as well
as (I assume) the width and height of the glyph.  Another little tweak that I
have just discovered is that the tiled glyph (24X24) has been "filled" to 32 bits
(at least in the X dimension, but not in the Y dimension) with the first 8 rows
repeated at the end.

To get an idea as to how I discovered this try drawing the glyph at the following
coordinates:

 (0,0) - this draws the first (and normal) row tile of the glyph
 (32,0) - this draws the second (normal) row tile of the glyph in the X direction
 (0,24) - this draws the second (normal) column tile of the glyph in the Y direction
 (20,48) - this looks like garbage, but...
 (0,48) - shows the third column tile, and...
 (32,48) - shows the third column / second row tile complete.

These last three also demonstrate how the "front" 8 rows of the glyph are used as
filler in between the consecutive row tiles.

This, of course, is just science and it only demonstrates what the DRAW-ICON function
is doing, but this may help the Symbolics gurus discover where the bug is.

-Bryan

/-------------------------------------------------/
/  Bryan D. Basham				  /
/  NASA/JSC  Mail Stop: ER22,  Houston TX  77058  /
/  (713) 483-2065				  /
/  Basham@AIO.JSC.NASA.GOV			  /
/-------------------------------------------------/

0,,

References:

Main Index | Thread Index