<div>hello thank you for your replying</div>So you want the refresh method?<div>no.<div>you can imagine one picture and if you click some point in the picture, then circle that point</div><div>my code can't update circled picture</div>
<div>could you give me little advice?</div><div><br><div class="gmail_quote">2010/10/27 Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
So you want the refresh method?<br>
<br>
Robby<br>
<br>
On Wednesday, October 27, 2010, 김태윤 <<a href="mailto:kty1104@gmail.com">kty1104@gmail.com</a>> wrote:<br>
> doesn't working properly means I can't update my canvas by this methodcould somebody tell me how to update canvas with changed image? (when some function is evaluated)<br>
<div><div></div><div class="h5">><br>
> 2010/10/27 <<a href="mailto:kty1104@gmail.com">kty1104@gmail.com</a>><br>
> hello~<br>
> I am making map editor<br>
> one of the editor's ability is select tile image from chip-set(kind of town map tile) image<br>
> and circle the selected tile<br>
> I made a following code but I don't think that this is good way to update image and it doesn't working properly as well.<br>
> could somebody give me an little advice?<br>
><br>
> #lang scheme/gui<br>
> (require 2htdp/image)<br>
> (define pic dc<%>)<br>
> (define chipset (make-object bitmap% "town.png" 'png))<br>
> (define f (instantiate frame% ("map editor")))<br>
> (define mcan%<br>
> (class canvas%<br>
><br>
> (override on-event on-paint)<br>
> (define on-paint<br>
> (λ () (send (send this get-dc) draw-bitmap chipset 0 0)))<br>
> (define on-event (λ (e)<br>
> (send msg set-label<br>
> (string-append (number->string (floor (/ (send e get-x) 16))) " "<br>
> (number->string (floor (/ (send e get-y) 16)))))<br>
> (when (send e get-left-down)<br>
> (begin (set! chipset (place-image (circle 8 "outline" "orange")<br>
> (send e get-x)<br>
> (send e get-y)<br>
> chipset))<br>
> (send f refresh)));it doesn't seems to good way<br>
> ))<br>
> (super-instantiate ())))<br>
><br>
> (define mcan (new mcan% (parent f) (min-width (image-width chipset)) (min-height (image-height chipset))))<br>
><br>
> (define msg (instantiate message% ("nothing so far" f)))<br>
> (define tile-width-field (instantiate text-field% ("width") (init-value "16") (parent f) (stretchable-width #f)))<br>
><br>
> (define tile-height-field (instantiate text-field% ("height") (init-value "16") (parent f) (stretchable-width #f)))<br>
><br>
> (send f show #t)<br>
><br>
><br>
</div></div></blockquote></div><br></div></div>