Re: pixmaps, images, and transparency
I've convinced myself that I'm wrong about the compressed bmp file. I
had been tempted to write "some kind of compressed bmp file", probably
should have. Bmp appears to be as bad as they've always been.
Bob
On Tuesday, December 9, 2003, at 07:56 PM, Bob Hutchison wrote:
> The display list technique from pt works beautifully. Thanks again for
> the suggestion.
>
> Unfortunately, I still need to know about transparency in images. Is
> it supported?
>
> Also, what external image types are supported? I can't seem to find
> anything documented, though it seems that compressed bmp files work.
>
> Thanks,
> Bob
>
> On Tuesday, December 9, 2003, at 11:17 AM, Bob Hutchison wrote:
>
>> Oh, that's nice! CL is getting better every time I sit down with it.
>>
>> Thank you.
>>
>> I'll give this a shot this afternoon.
>>
>> Cheers,
>> Bob
>>
>> On Tuesday, December 9, 2003, at 11:04 AM, tarvydas wrote:
>>
>>> On Tuesday 09 December 2003 10:17 am, Bob Hutchison wrote:
>>>
>>> Only a partial answer to one of your questions:
>>>
>>>> I am building an application using LW and CAPI. This is my first in
>>>> lisp, and so also LW.
>>> ...
>>>> An alternative approach is to record, somehow, the drawing
>>>> instructions
>>>> rather than keeping the image around. It may well use less memory,
>>>> and
>>>
>>> This part, in lisp, is trivial. You simply "record" the drawing
>>> instruction
>>> using a closure - #'(lambda...). I have a drawing tool that keeps a
>>> "display
>>> list". I add capi/gp things to the display list like this:
>>>
>>> (push #'(lambda ()
>>> (gp:draw-rectangle pane x y w h :filled nil))
>>> display-list)
>>>
>>> and at drawing time, the pane-display-callback contains code that
>>> simply
>>> funcalls each item on the display list, like this:
>>>
>>> (dolist (func display-list)
>>> (funcall func))
>>>
>>> I benchmarked this - for speed, not size - in LW - against a more
>>> traditional
>>> data-contained-in-a-display-list algorithm and found that the
>>> closure method,
>>> above, ran faster. YMMV.
>>>
>>> pt
>>>
>>>
>>
>>
>
>