physics_teacher Posted May 5, 2020 Author Share Posted May 5, 2020 (edited) Original thread: https://forums.getpaint.net/topic/1309-plug-in-model-for-tools/ Hi, I just would like to update this post some. I teach physics for highschool, and since the covid19 lockdown I have been using paint.net extensively to create on-the-fly diagrams and schematics while giving virtual lessons, with a simple screen sharing app. I use paint.net because it's simple and free, and I can then post our work together easily later on my website. My students reported that I do so with such skill and speed that they decided to install paint.net themselves to create stuff like I do. I find myself wishing we could add a math plugin that's easy to use in real time for the virtual lessons to be more comfortable. For instance, adding a latex converter field in the toolbar would be a major plus. It would save me about a third of the time devoted to our lessons. I've looked at the Dr Scott's Markup Renderer plugin, but it's just too slow if I have to implement 3 steps to get what I need each time. So, I am allocating some time to create my own plugin to render on-the-fly latex in my diagrams. I think adding a tool to do just that could be beneficial for math and physics teachers alike. Hope my argument makes a point. Cheers, Edited May 5, 2020 by BoltBait Split from original thread Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted May 5, 2020 Share Posted May 5, 2020 7 hours ago, physics_teacher said: am allocating some time to create my own plugin to render on-the-fly latex in my diagrams. I wish you well with this. If you need assistance just ask. 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...
null54 Posted May 5, 2020 Share Posted May 5, 2020 9 hours ago, physics_teacher said: For instance, adding a latex converter field in the toolbar would be a major plus. A plugin cannot add items to the toolbar. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
toe_head2001 Posted May 5, 2020 Share Posted May 5, 2020 If anyone wants to create an Effect, there's a LaTeX library for C# here: https://github.com/ForNeVeR/wpf-math Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted May 7, 2020 Share Posted May 7, 2020 I've been playing with this. Here's a rough first draft. MathLaTex.zip Copy MathLatex.dll to the \Effects\ folder. Copy wpfMath.dll to the paint.net installation folder. Find the plugin in Effects > Text 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...
null54 Posted May 7, 2020 Share Posted May 7, 2020 1 hour ago, Ego Eram Reputo said: Copy wpfMath.dll to the paint.net installation folder. This would not work for the Windows Store version. You should think about using ILMerge to merge wpfMath.dll into MathLatex.dll, if the wpfMath license allows it. This would simplify distribution of the final plugin. 1 Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
toe_head2001 Posted May 7, 2020 Share Posted May 7, 2020 There's no reason wpfMath.dll can't be placed into the Effects folder. Using ILMerge is the best solution though. 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted May 7, 2020 Share Posted May 7, 2020 Good idea. I'll give it a spin this weekend. There's a bit more to do as I rushed the whole thing. Its the first plugin I've built with @toe_head2001's VS templates. They are pretty impressive! Also the first time I've had a dependency to think about. I'm pretty sure I'm copying the work surface badly 😕 reckon you proper programmers would shudder 😈 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...
BoltBait Posted May 7, 2020 Share Posted May 7, 2020 1 minute ago, Ego Eram Reputo said: I'm pretty sure I'm copying the work surface badly In PreRender() do it this way: wrk.CopySurface(src); In Render() do it this way: dst.CopySurface(src,rect.Location,rect); 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
toe_head2001 Posted May 7, 2020 Share Posted May 7, 2020 6 minutes ago, BoltBait said: In PreRender() do it this way: wrk.CopySurface(src); Depending on your Effect, it's not always necessary to copy the entire Surface in PreRender(). Spend less CPU cycles by constraining it to the active selection bounds. Rectangle selection = EnvironmentParameters.SelectionBounds; wrk.CopySurface(src, selection.Location, selection); 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted May 8, 2020 Share Posted May 8, 2020 Thank you both! 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...
c3r38r170 Posted August 24, 2020 Share Posted August 24, 2020 Hi! Is there a newer version of the draft that was made? Is this still being developed by anyone? Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted August 24, 2020 Share Posted August 24, 2020 17 minutes ago, c3r38r170 said: Is there a newer version of the draft that was made? https://forums.getpaint.net/topic/116703-mathlatex-plugin/ 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab 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.