[racket] display problem

From: Roelof Wobben (r.wobben at home.nl)
Date: Fri Apr 13 11:33:28 EDT 2012

Op 12-4-2012 18:30, Roelof Wobben schreef:
> Op 12-4-2012 18:03, Nick Shelley schreef:
>>         Only beside. But how can I then take care that the text are 
>> displayed into the empty-scene.  I think you need overlay or 
>> something for that.
>>
>> Every image function returns an image, so you can use beside to 
>> create an image of your text with the cursor in the right spot, and 
>> then place that image in your empty scene however you want (you used 
>> place-image, which would work, but I would suggest place-image/align).
>>
>> In general, I would suggest (as HtDP does) that you experiment with 
>> each piece of the image in the interactions pane, and then experiment 
>> with composing them until you get what you want. For instance, use 
>> the interactions pane to try to get the text and cursor together 
>> using different image functions until you like what you get, then do 
>> the same with composing that result and the background.
>>

I have problems with place-image/align.

I have this :

; Editor -> Image
; Function which displays the struct on the screen into a image.
(define (render verwerker)
   (place-image/align (beside (text(editor-pre verwerker) 11 "black") 
cursor (text(editor-post verwerker) 11 "black")) 0 0 left center 
workspace ))

But now I get a message that left is out of context.

But where do I put it then ?

Roelof

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120413/7c6d6126/attachment.html>

Posted on the users mailing list.