CLIM mail archive


CLIM 1.1

   Date: Thu, 24 Mar 1994 13:12:31 -0500
   From: Richard Billington <>

   yea, I know, but when CLIM 2 is there for MCL ...

   Anyhow, I'm using patterns to display raster images.

   Basic approach 

      (clim:draw-icon stream
	(clim:make-pattern (array-from-file filename)
			   (list +white+ +black+))
	0 0)

   However, I'm going to have to draw LOTS of these.  Now, I can reuse
   the same array (the rasters are all of the same dimension), but how
   can I reuse a pattern's underlying datastructure (likely an array

   That is, I want to read a raster in from a file, display it, and then
   when I want to show another raster I'd like to minimize the amount of
   new space I need to use (and to minimize GC).

Ooh, that's a good one.  The short answer is: you can't.  The problem
is that CLIM is magically doing you a performance favor, in that it
caches decoded inks (including patterns) so that you can redraw using
the same ink quickly.  This will shaft you, because CLIM will think
you are drawing with the same pattern, but what you want is to reuse
the same EQ pattern object.

I will think about this to see if there is anything we can do that is
not too horrible.

Follow-Ups: References:

Main Index | Thread Index