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

Graphics to Bitmaps



    The task of the week is to perform simple bitmap-driven animation on the Symbolics. 
    A standard way to do this is to have a bitmap buffer, draw graphics and bitblt
    bitmap patches into the buffer, and then bitblt the buffer to the screen.

I typically use instances of flavor tv:bitmap as scratch pads for doing
this sort of thing:

(defparameter *scratch-pad*
   (tv:make-window 'tv:bitmap :more-p nil :activate-p t :save-bits t
		   :deexposed-typeout-action :permit :blinker-p nil
		   :width  (tv:sheet-width tv:main-screen)
		   :height (tv:sheet-height tv:main-screen)))

The options to make-instance above are rather important.  The ones shown
are almost always what you want, except that your width and height may
vary according to the application.  The one above is for general use.

Such an instance behaves much like a window, except that it doesn't
expect to be exposed (and it is not "dynamic" in the DW sense).  Drawing
to it is low-overhead (no need to prepare-sheet), and you can easily
"tear off a page" of image and save it by bitblting from the scratch pad
into a raster array.