[mcclim-devel] RGBA image drawing

David Lichteblau david at lichteblau.com
Sun Jan 7 19:47:24 UTC 2007


Hi,

McCLIM CVS now has experimental support for 32 bit RGBA images, based on
Closure's AIMAGE code.

Both API and implementation are up for discussion, and I would be glad
to receive feedback.

One API issue is that Closure draws aimages to CLX pixmaps, and keeps a
cache of these pixmaps.  To keep this cache functional, I decided to
put medium-specific data into the design instances used to draw images.
Normally designs are not bound to a particular medium, and existing code
for indexed-pattern does not expose its caching to the user.  Perhaps a
better implementation strategy could be used for both rgb-image-design
and indexed-pattern?

More serious perhaps is the current implementation's limitation to true
color visuals.  Closure itself had sophisticated support for all kinds
of X11 visuals, including dithering algorithms.  The routines used there
are similar to the code found in CLIM-CLX's indexed-pattern
implementation.  Basically, code suitable for the current colormap is
compiled at runtime into a function that maps abstract colors and x/y
coordinates to X11 colors.  (This code can be found in
closure/src/renderer/x11.lisp)

Perhaps someone who understand the indexed-pattern drawing routines
knows what the right approach to this is.  Should x11.lisp be moved into
McCLIM?  Can it be merged with the code that Backends/CLX/medium.lisp
already has?


Thanks,
David



More information about the mcclim-devel mailing list