You can get the bitmap from the clipboard using "(send the-clipboard 
get-clipboard-bitmap)" and you can use the bitmap dimensions (see get-with 
and get-height methods of the bitmap% object) to make the canvas the same 
size as the bitmap by constructing it with stretchable-width and 
stretchable-height set to #f and setting the min-width and min-height to 
the bitmap dimensions.   To draw the bitmap onto the canvas, you can use 
the draw-bitmap method in the paint callback.

For the mouse clicks, you will need to override the `on-subwindow-event` on 
the canvas to look at the mouse events and record where the user clicked.  
You can draw the letters at the click positions in the paint-callback of 
the canvas using the draw-text method.

Hope this helps,
Alex.

On Saturday, June 27, 2020 at 10:44:44 AM UTC+8 frangonve wrote:

> Hello, A newbie here:
>
> I want to insert an image from windows clipboard to a rectangular widget 
> that will take the image size. Then when  repeatedly clicking the mouse on 
> different coordinates of the image I want to superimpose each time the next 
> letter in alphabetic order with transparent background:
>
> This is the type of images to insert:
>
> [image: Clever Mines 20200318.png]
>
> This is what I want to show after clicking several times on the image 
> high-left corner:
>
> [image: Clever Mines 20200318 id.png]
>
> Please can you help me?
>
> Cheers
>
> Francisco 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/b5ad5b07-ae85-40e6-b072-8c71e5a68dd2n%40googlegroups.com.

Reply via email to