ghostblade1982 Posted November 2, 2015 Share Posted November 2, 2015 I'm creating a complicated plugin for Paint.Net which requires current pixel coordinate the mouse is pointing at on image as input. I have read through the Boltbait tutorial on how to create plugins, but didn't seem to be helpful. I have to admit that I'm not super experienced with writing image processing code in C# windows forms. Has anyone done anything similar or know how to do it? Thanks Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted November 2, 2015 Share Posted November 2, 2015 You would probably be best cloning the image to a control/container within the plugin UI. Then you could move the pointer & have that position reported back, all from within the UI. Example: ShapeMaker Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
MJW Posted November 2, 2015 Share Posted November 2, 2015 (edited) If you display the image in your own form, then getting the pixel coordinate where the mouse is pointing is the usual mouse-event processing, followed by whatever coordinate adjustments are necessary to account for scaling and scrolling. I suspect from your question, though, that you're asking how to get the mouse position relative to the image in the main PDN form. As far as I know, there's no way to do that, though it might be nice if there were. EDIT: Also, this question would probably be better posted to Plugin Developer's Central instead of Paint.NET Discussion & Questions. Edited November 2, 2015 by MJW Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.