Lisp HUG Maillist Archive

Drawing images

I am trying to draw an image using the following code:

CL-USER 16 > (setf w (capi:contain (make-instance 'capi:output-pane)))
#<CAPI:OUTPUT-PANE  2008CCA7>

CL-USER 17 > (setf i (gp:load-image w (capi:prompt-for-file  
""))) ;choose the image file
#<GRAPHICS-PORTS:IMAGE 200A720F>

CL-USER 18 > (gp:draw-image w i 20 20)

This works OK in LWW 5.0 Personal, however, in LWM 5.0.2 Personal  
(Intel) it signals error "Error: Invoking a method "retain" on a null  
pointer." Am I doing anything wrong?

Thanks,

Michal


Re: Drawing images

You must draw in the process of the interface. See
'capi:apply-in-pane-process

Best

Denis


Le 3/05/08 15:37, « [NOM] » <[ADRESSE]> a écrit :

> 
> I am trying to draw an image using the following code:
> 
> CL-USER 16 > (setf w (capi:contain (make-instance 'capi:output-pane)))
> #<CAPI:OUTPUT-PANE  2008CCA7>
> 
> CL-USER 17 > (setf i (gp:load-image w (capi:prompt-for-file
> ""))) ;choose the image file
> #<GRAPHICS-PORTS:IMAGE 200A720F>
> 
> CL-USER 18 > (gp:draw-image w i 20 20)
> 
> This works OK in LWW 5.0 Personal, however, in LWM 5.0.2 Personal
> (Intel) it signals error "Error: Invoking a method "retain" on a null
> pointer." Am I doing anything wrong?
> 
> Thanks,
> 
> Michal
> 

-------------------------------------------------------
Denis Pousseur
70 rue de Wansijn
1180 Bruxelles, Belgique

Tel : 32 (0)2 219 31 09
Mail :  denis.pousseur@gmail.com
-------------------------------------------------------



Re: Drawing images

Ah, I see. Sorry for the noise.

Michal

On 3.5.2008, at 15:52, Denis Pousseur wrote:

> You must draw in the process of the interface. See
> 'capi:apply-in-pane-process
>
> Best
>
> Denis
>
>
> Le 3/05/08 15:37, « [NOM] » <[ADRESSE]> a écrit :
>
>>
>> I am trying to draw an image using the following code:
>>
>> CL-USER 16 > (setf w (capi:contain (make-instance 'capi:output- 
>> pane)))
>> #<CAPI:OUTPUT-PANE  2008CCA7>
>>
>> CL-USER 17 > (setf i (gp:load-image w (capi:prompt-for-file
>> ""))) ;choose the image file
>> #<GRAPHICS-PORTS:IMAGE 200A720F>
>>
>> CL-USER 18 > (gp:draw-image w i 20 20)
>>
>> This works OK in LWW 5.0 Personal, however, in LWM 5.0.2 Personal
>> (Intel) it signals error "Error: Invoking a method "retain" on a null
>> pointer." Am I doing anything wrong?
>>
>> Thanks,
>>
>> Michal
>>
>
> -------------------------------------------------------
> Denis Pousseur
> 70 rue de Wansijn
> 1180 Bruxelles, Belgique
>
> Tel : 32 (0)2 219 31 09
> Mail :  denis.pousseur@gmail.com
> -------------------------------------------------------
>
>


Re: Drawing images

On Sat, 3 May 2008 15:37:08 +0200, Michal Krupka <michalkrupka@post.cz> wrote:

> I am trying to draw an image using the following code:
>
> CL-USER 16 > (setf w (capi:contain (make-instance 'capi:output-pane)))
> #<CAPI:OUTPUT-PANE  2008CCA7>
>
> CL-USER 17 > (setf i (gp:load-image w (capi:prompt-for-file  "")))
> ;choose the image file
> #<GRAPHICS-PORTS:IMAGE 200A720F>
>
> CL-USER 18 > (gp:draw-image w i 20 20)
>
> This works OK in LWW 5.0 Personal, however, in LWM 5.0.2 Personal
> (Intel) it signals error "Error: Invoking a method "retain" on a
> null pointer." Am I doing anything wrong?

Dunno, just double-checking:

1. Is the image type you're using supported on OS X?

2. Does it make a difference if you call the drawing operation in the
   right thread?

Edi.


Updated at: 2020-12-10 08:43 UTC