TrevorOutlaw Posted July 6, 2022 Share Posted July 6, 2022 (edited) On 10/18/2018 at 8:15 PM, TrevorOutlaw said: 1) I would like to see the square brush be replaced with an outline geometry of the brush file. It would make it easier for me to see where I am painting, especially when performing pre-masking paint for my photo manipulations. @NinthDesertDude I really appreciate all the hard work that went into making DynamicDraw and it is bringing PDN closer to the same level as Gimp and Kirta. I thought I’d would revisit this since the request to use ABR brushes has been successfully implemented with @null54supporting the efforts. If the quoted request is not feasible, then I will consider the matter closed. Thank you again for all the hard work. DynamicDraw is one of my go-to tools within PDN. Edited July 6, 2022 by TrevorOutlaw 1 Quote Link to comment Share on other sites More sharing options...
Roly Poly Goblinoli Posted July 7, 2022 Author Share Posted July 7, 2022 15 hours ago, TrevorOutlaw said: I would like to see the square brush be replaced with an outline geometry of the brush file. I'll investigate this now. When the brush is selected or rescaled, it should be possible to create an outline using e.g. the sobel operator. Quote Link to comment Share on other sites More sharing options...
Roly Poly Goblinoli Posted July 7, 2022 Author Share Posted July 7, 2022 @TrevorOutlawI tried it via sobel operation and while it works, the fact that an outline goes around the pixels, instead of occupying the same spot as the pixels, makes it in some cases look pretty ugly, e.g. with the dots brush. Muddy/dirty textures also end up with scribbly looking outlines. I could do what Pixlr probably does and set some kind of alpha threshold, but then you're not seeing the full brush shape. Far easier to just render the brush at half opacity as the cursor (this is actually less work in terms of performance too). Does that work? Is there a reason you'd want the outline instead? I'd think using the actual brush at half opacity as the cursor will lead to the best ability to line up pixels before clicking. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 7, 2022 Share Posted July 7, 2022 Are you basically creating a path/geometry that outlines the pixels? In D2D you could then create a geometry path that does an inset stroke, which would ensure that it doesn’t draw outside of the pixels. Not sure if you can do that with System.Drawing. It involves creating a stroked (widened) version of the path, and then subtracting (excluding) that from the first path, and then filling it. 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...
Roly Poly Goblinoli Posted July 7, 2022 Author Share Posted July 7, 2022 Right now I just use sobel on a raster image, no geometry. Though I know I can normalize the alpha difference so the average is close to 255 and then clear it up with a high alpha threshold. For a lot of reasons, I'll be switching to D2D eventually, I just didn't know it was an option. Meanwhile I'll wait to see if Trevor says the half-opaque brush image as a cursor is serviceable. Quote Link to comment Share on other sites More sharing options...
TrevorOutlaw Posted July 7, 2022 Share Posted July 7, 2022 3 hours ago, NinthDesertDude said: @TrevorOutlawI tried it via sobel operation and while it works, the fact that an outline goes around the pixels, instead of occupying the same spot as the pixels, makes it in some cases look pretty ugly, e.g. with the dots brush. Muddy/dirty textures also end up with scribbly looking outlines. I could do what Pixlr probably does and set some kind of alpha threshold, but then you're not seeing the full brush shape. Far easier to just render the brush at half opacity as the cursor (this is actually less work in terms of performance too). Does that work? Is there a reason you'd want the outline instead? I'd think using the actual brush at half opacity as the cursor will lead to the best ability to line up pixels before clicking. I’ll go with whatever you think will work best. It sounds like the outline might be trickier. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 7, 2022 Share Posted July 7, 2022 2 hours ago, NinthDesertDude said: For a lot of reasons, I'll be switching to D2D eventually, I just didn't know it was an option. It won't be an option until I can safely make Direct2DControl / Direct2DPointerControl public 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...
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.