Jump to content

Selection Tool


Recommended Posts


I am designing a simple image cropper for my personal use.I am using python on linux.Though paint.NET is in C# ,I need some help with the following:

I am able to crop an image but I need to show the user(me only) a rectangular dotted image like in any image editing program.For my program ,I use the mouse press ,mouse release and mouse move to take down the co-ordinates and crop accordingly.

So can anyone point me to the code in paint.NET's source tree(is it src/tools/SelectionTool.cs ?) as to where this part was implemented.I just want to know the logic of how it can be done.


Can someone give me ideas as to which all other signals/events to monitor and how best to draw the rectangle /remove the rectangle on the image when user hits the esc key etc.

Thanks and Regards,


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...