hahnski07 Posted April 6, 2013 Share Posted April 6, 2013 Hey guys, Newbie here. I'm currently developing a plugin for Paint.NET that uses Poisson Interpolation (think Photoshop's healing tool). The only thing holding me back is detecting whether a given pixel falls within the user selection (strictly the user selection, not the bounding rectangle). How can I accomplish this? And in general, is there documentation for developing plugins? Thanks, Micah Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted April 7, 2013 Share Posted April 7, 2013 For information on writing plugins, I recommend a read of the info on BoltBait's website: http://www.BoltBait.com (you've met CodeLab right?). Also check out the Plugin Developers Central section of this forum: http://forums.getpaint.net/index.php?/forum/17-plugin-developers-central/ You don't need to worry about clipping to the current selection. This is handled automatically for you by Paint.NET. Just write all the pixels to the destination (dst). Selection clipping will be applied before the dst is written to the layer. 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...
Rick Brewster Posted April 7, 2013 Share Posted April 7, 2013 All rectangles passed to your OnRender() are those which fall within the selection. Or if there's no selection then it'll be the whole canvas. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
hahnski07 Posted April 7, 2013 Author Share Posted April 7, 2013 Yeah I know that Paint.NET automatically handles clipping for me... Perhaps I should be more direct; the algorithm I'm using needs to know the specific pixels that are on the boundary of the user selection in order to interpolate the interior with them. If you guys have any inclination as to how that could be done it would be much appreciated. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted April 7, 2013 Share Posted April 7, 2013 Easy. Click: http://boltbait.com/pdn/CodeLab/help/tutorial4.php Scroll down to 'Marching Ants / Selection'. Read. Donate. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
hahnski07 Posted April 9, 2013 Author Share Posted April 9, 2013 Thanks, BoltBait... that works. Micah Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted April 9, 2013 Share Posted April 9, 2013 <Moved to Plugin Developers Central> 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...
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.