MadJik Posted January 4, 2018 Share Posted January 4, 2018 Searching help for debug this / or improve the code. This effect is drawing 14 forms (circle/hexagone/rays). It should look like a lens flare effect. It needs a layer filled with black color. You could set the origin of the light by plotting a single white pixel on the canvas. The center of the canvas is the second point used to draw a virtual straight line. Each centers of the 14 forms are placed over this line. Settings allow to choose each type of form, distance, radius etc. 14 forms x 7 parameters, this is a number of 98 datas to define/handle. Plus some other (7) common parameters. The problems are: -(ok)changes on the 98 settings run the rendering. -(ko)changes on the 7 common parameters have not effect. -(ko)first cycle of the effect doesn't work (linked?). -(ko)tried to have sliders for the 7 common parameters (failed so I delete these sliders). Instead of checking each change of parameters, I use a single counter++ to check for any change. To make it works, I use the button reset of a common parameter or make a change on one of the 98 settings. Other points to solve: -dark theme for Windows form effects? -XML save and load works fine. Any idea to set a saved file as default setting to load when the effect is openning? -Tab (tabulation sequence) is set to go column by column. Any idea to have a checkbox to change it to go row by row? DLL: http://jcljay.free.fr/pdn/LensFlare.zip Visual Studio Sources http://jcljay.free.fr/pdn/LensFlareSRC.zip Thanks. Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 4, 2018 Share Posted January 4, 2018 I think I can help you with all of those things, but your link to the source code doesn't work. Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
MadJik Posted January 4, 2018 Author Share Posted January 4, 2018 Oops, typo in the link... Ok now. Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 5, 2018 Share Posted January 5, 2018 Most of the rendering issues were solved by utilizing OnSetRenderInfo. 3 hours ago, MadJik said: -dark theme for Windows form effects? Done. 3 hours ago, MadJik said: -XML save and load works fine. Any idea to set a saved file as default setting to load when the effect is opening? Take a look in InitialInitToken(). I placed some code there that should work. 3 hours ago, MadJik said: -Tab (tabulation sequence) is set to go column by column. Any idea to have a checkbox to change it to go row by row? You just need to change the TabIndex on each control. I've done this for you; VS Designer makes it extremely fast and easy to update them all. 3 hours ago, MadJik said: -(ko)tried to have sliders for the 7 common parameters (failed so I delete these sliders). I didn't add these, but I'm guessing the issue was that they got into a update loop. i.e. Slider updates NumBox, causing the NumBox to update the Slider, causing the Slider to update the NumBox, ect. Just create a flag so that doesn't happen. Take a look at my Pie Chart plugin if you're not sure. https://kalama.ga/gfx/code/LensFlareSrc20180104.zip Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
MadJik Posted January 5, 2018 Author Share Posted January 5, 2018 @toe_head2001 many thanks, it's much better. I have to dig more in the code to understand the changes. For the tabulation sequence, I want to add a checkbox for the user to choose between horizontal or vertical tabulation. I will Something try with "foreach (Control control in this.Controls)". Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
MadJik Posted January 5, 2018 Author Share Posted January 5, 2018 New version: Visual Studio Sources http://jcljay.free.fr/pdn/LensFlareSRC.zip The blur is visible while the UI is open. After Ok, no more blur. Ctrl-F the blur is applied. My config dialog design is empty, so I use the cs editor... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
MadJik Posted January 8, 2018 Author Share Posted January 8, 2018 @toe_head2001 Still haven't found a way to solve the final blur. Just disabled it... I'm not sure about the correct words to use in English for the flare (circle/hexagon) and the flake (star). Any clue? Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 8, 2018 Share Posted January 8, 2018 7 hours ago, MadJik said: Still haven't found a way to solve the final blur. Just disabled it... I'll take a look at it later today. Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 9, 2018 Share Posted January 9, 2018 Hmm... The issue with Blur when pressing OK... I can't explain it. It works when the dialog is open, and it works when you press Ctrl+F. I use very similar code in my Blur Fill plugin, and it works fine there. Maybe there's a bug in paint.net that affects custom UI effects, but not IndirectUI effects... I don't know; more testing would need to be done. Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
MadJik Posted January 9, 2018 Author Share Posted January 9, 2018 @toe_head2001 thank you for your time. I did also that kind of tests, I was about to turn crazy about this. I think I will release without blur. Then try to adapt an old codelab sample for next version. Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
MadJik Posted January 10, 2018 Author Share Posted January 10, 2018 Posted with working final blur Visual Studio Sources updated http://jcljay.free.fr/pdn/LensFlareSRC.zip 1 Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal 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.