Toli Posted November 13, 2007 Share Posted November 13, 2007 (edited) MODERATORS NOTE: null54 has rebuilt this plugin pack for paint.net v4; use that pack instead. https://forums.getpaint.net/topic/28801-tolis-effects-for-v40/ I decided to make a separate post about all my effects and make some changes in order to be able to easily maintain them. The effects are: 1. Mirror/Rotate 2. Mirror / Rotate Menu 3. Engrave/Emboss 4. Smooth The links are for you to read the discussion about these effects, if you are interested. However, you cannot download the effects from there any more. The only place from where you can download the effects is from below:ToliEffects_v202.zip The zip file contains:1. IniFile.dllThis is a common required library, used by all my effects, which must be copied in the Effects folder if you want to use any or all the effects. This library provides to my effects localization support (the effect in your language) and the ability to "remember" on-screen position and the options you selected. Effect programmers, feel free to use IniFile.dll (ask me for technical support). Just don't credit yourselves for coding it.2. MirrorRotate.dll The Mirror / Rotate Effect3. MirrorRotateMenu.dll All 4 mirrors and 3 rotates from the previous plugin, now as MenuItems in a Mirror / Rotate Submenu You should install either MirrorRotate.dll or MirrorRotateMenu.dll4. EngraveEmboss.dll The Engrave / Emboss Effect MODERATORS NOTE: This effect is incompatible with Paint.NET 4.0x5. Smooth.dll The Smooth Effect6. MirrorRotate.ini7. MirrorRotateMenu.ini8. EngraveEmboss.ini9. Smooth.ini Language Ini Files used by my effects for localization. You should copy them along with the corresponding effects to the Effects folder. (this folder should usually be: "C:\Program Files\Paint.NET\Effects", without the quotes)10. License.txt GNU Public License If someone would like a Setup (an Installer for the plugins), here it is:ToliEffectsSetup_v202.zip And this zip file contains the C# sources. It is for effect programmers only.ToliEffectsSource_v202.zip Enjoy! Toli Cuturicu Edited February 23, 2018 by toe_head2001 Linked to updated pack Link to comment Share on other sites More sharing options...
Bob Posted November 13, 2007 Share Posted November 13, 2007 The only place from where you can download the effects is the link below: *tearful absence of any download link* No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio Link to comment Share on other sites More sharing options...
pyrochild Posted November 13, 2007 Share Posted November 13, 2007 There's no link there... Also, you should probably keep your source code and compiled DLLs in separate ZIPs to avoid confusion. 1 ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Toli Posted November 13, 2007 Author Share Posted November 13, 2007 Done. Link to comment Share on other sites More sharing options...
Toli Posted November 13, 2007 Author Share Posted November 13, 2007 Note to effect programmers: To use my IniFile.dll, you should: 1. In your project, add a refference to IniFile.dll 2. Add a using Toli; directive 3. In your class which inherits PaintDotNet.Effects.Effect, instantiate the class IniFile ex: public static IniFile Ini = new IniFile(); 4. In the Effect Constructor, instead of the Effect English name, put: Ini.PluginName 5. In your EffectConfigDialog use the same IniFile created before: ex: private IniFile Ini = YourEffect.Ini; 6. Use it to retrieve localized Control.Text: ex: this.Ini.GetResourceString(this.YourControl); 7. Use it to retrieve other strings: ex: string YourString = this.Ini.GetResourceString(YourStringKey, YourStringDefault); 8. Use it to retrieve integers: ex: int YourInteger = this.Ini.GetResourceInteger(YourIntegerKey, YourIntegerDefault); 9. Make the Form remember its Location: 9.1. Put in Form_Load: this.Ini.ReadFormLocation(this); 9.2. Put in Form_FormClosing: this.Ini.WriteFormLocation(this); 10. Make the Form remember its Size: 10.1. Put in Form_Load: this.Ini.ReadFormSize(this); 10.2. Put in Form_FormClosing: this.Ini.WriteFormSize(this); ... and so on. Your initial Ini File should look like this: YourEffect.ini [Encoding] CodePage=Your CodePage [en] PluginName=Your Plugin Name YourControl=Your Control Text ... [fr] PluginName=Votre Plugin Nom YourControl=Votre Control Texte ... [de] ... [and so on] ... Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 13, 2007 Share Posted November 13, 2007 Saving preferences in a sub-directory of Program Files is a very bad thing to do. That won't work in any non-Administrator account, such as Standard User in XP, or in Vista at all. 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...
Toli Posted November 13, 2007 Author Share Posted November 13, 2007 1. That's right, but if the user doesn't have permission to write there, how on Earth did he put the *.dll there in the first place? 2. Ok, then. Where should I put the Ini Files? Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 13, 2007 Share Posted November 13, 2007 It doesn't matter how the file got there in the first place. The permissions you have when you place the file could be radically different than when you access it. Or it could be a completely different user, etc. Place it somewhere in AppData, like in Environment.GetFolderPath(ApplicationData). Usually that's C:/Documents and Settings/username/Application Data, or C:/Users/username/AppData/Roaming. Localization should definitely be separate from per-user data. I have no idea why you're implementing INI stuff when the ResourceManager class is just fine. 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...
Toli Posted November 13, 2007 Author Share Posted November 13, 2007 Because I don't know how to use ResourceManager (I can learn, though) and I know how to use Ini Files. And I cannot write my own strings in Paint.NET *.resources files. So, what else can I do? Anyway, I read for example OK and Cancel from Resources. But what about my own strings? Link to comment Share on other sites More sharing options...
Toli Posted November 14, 2007 Author Share Posted November 14, 2007 I added a Setup for the plugins in the first post. I don't want regular computer users to complain like "But how do I install the plugins?! :-(" Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 14, 2007 Share Posted November 14, 2007 Not knowing something really isn't an excuse, like you said you can learn it just fine. Do not read strings from PdnResources. It is not meant for use by plugins, and will be removed in a future version. And then your plugins will break. 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...
pyrochild Posted November 14, 2007 Share Posted November 14, 2007 Considering there are only 3 plugins in there, and the installer is only 355KB, it's ridiculously slow... Also, if you're gonna go with an installer, you should provide checkboxes so users can choose which plugins they want. ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Toli Posted November 14, 2007 Author Share Posted November 14, 2007 Ok. But... how can I know which of your public classes can I count on and which should I just ignore? Only what is in PaintDotNet.Effects and PaintDotNet.Core? Link to comment Share on other sites More sharing options...
Toli Posted November 14, 2007 Author Share Posted November 14, 2007 To: pyrochild It certainly is slow. Blame Microsoft and Windows Installer for this! I can add checkboxes and I probably will. However, you can download ToliEffects_v200.zip, which has no setup, only the dlls to choose from. Link to comment Share on other sites More sharing options...
pyrochild Posted November 14, 2007 Share Posted November 14, 2007 However, you can download ToliEffects_v200.zip, which has no setup, only the dlls to choose from. That defeats the purpose of having an installer in the first place, doesn't it? ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Toli Posted November 14, 2007 Author Share Posted November 14, 2007 Ok, don't get upset on me. You are right. I am tired and a bit pissed off for some other reason. I will add the checkboxes when I have enough time. I have to go now. It's 03.00 in my country. Link to comment Share on other sites More sharing options...
pyrochild Posted November 14, 2007 Share Posted November 14, 2007 Not upset with you. Just offering constructive criticism to a fellow plugin author. ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Ash Posted November 14, 2007 Share Posted November 14, 2007 To: pyrochildIt certainly is slow. Blame Microsoft and Windows Installer for this! I can add checkboxes and I probably will. However, you can download ToliEffects_v200.zip, which has no setup, only the dlls to choose from. Keep both, if users wanna download DLL, they can. If they want EXE, they also can. All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ] Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 14, 2007 Share Posted November 14, 2007 It takes a long time because a System Restore (System Protection in Vista) checkpoint is created every time before an MSI install or uninstall operation starts. This is a good thing. I do NOT recommend disabling System Restore. 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...
Ash Posted November 15, 2007 Share Posted November 15, 2007 For your Engrave / Emboss plugin, Is it possible you can add "angle" option would be even better. Thanks All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ] Link to comment Share on other sites More sharing options...
Toli Posted November 15, 2007 Author Share Posted November 15, 2007 1. I know that the original Emboss Effect has the Angle parameter, but I really don't know why anyone should use other values than 45 and 135 degrees, which are in my implementation. 2. For larger Width values, the calculation involving trigonometry become awfully slow and almost unusable. I suppose that was the reason for which the original plugin was limited to Width = 1. Link to comment Share on other sites More sharing options...
Andrew D Posted November 15, 2007 Share Posted November 15, 2007 I have one thing to ask, how come the effect dialog boxes are different from the other plugin's compared to yours? I'm just wondering really, not asking for a change. Link to comment Share on other sites More sharing options...
Toli Posted November 15, 2007 Author Share Posted November 15, 2007 Let's take them one by one: 1. Smooth doesn't have an UI at all (see SeamlessHelper as another example) 2. EngraveEmboss UI is similar to almost all the other plugins. It has two RadioButtons though, because the user needs to select one of two choices. And, of course, it remembers its on-screen position, user settings and uses localization (French and German available so far) if Paint.NET is started in one of these languages. These enhancements are there out of respect to the user. 3. MirrorRotate has the same enhancements and also a different UI. That's because the user has actually to choose between 7 (related) effects, so Trackbars, UpDowns or AngleSelectors won't work. Only Buttons would do the job. And, if I have Buttons, why not Images on them, showing the user what behaviour to expect from let's say "1st Diagonal Mirror". The Cancel Button is the Top-Left-Most one and the OK Button is actually the other 7 Buttons, one for each effect. However, you also have an on-screen preview of the effect when you hover the button. Is this information satisfactory? Link to comment Share on other sites More sharing options...
Andrew D Posted November 15, 2007 Share Posted November 15, 2007 Let's take them one by one:1. Smooth doesn't have an UI at all (see SeamlessHelper as another example) 2. EngraveEmboss UI is similar to almost all the other plugins. It has two RadioButtons though, because the user needs to select one of two choices. And, of course, it remembers its on-screen position, user settings and uses localization (French and German available so far) if Paint.NET is started in one of these languages. These enhancements are there out of respect to the user. 3. MirrorRotate has the same enhancements and also a different UI. That's because the user has actually to choose between 7 (related) effects, so Trackbars, UpDowns or AngleSelectors won't work. Only Buttons would do the job. And, if I have Buttons, why not Images on them, showing the user what behaviour to expect from let's say "1st Diagonal Mirror". The Cancel Button is the Top-Left-Most one and the OK Button is actually the other 7 Buttons, one for each effect. However, you also have an on-screen preview of the effect when you hover the button. Is this information satisfactory? I think you misunderstood me. I'll explain it with pictures this time. Lets take the UI of your Emboss/Engrave plug-in, and then pyrochild's Outline Object UI. Now, ignore the theme change. How come your UI's are similar, to say the Colour/Layers...etc. windows, while the majority of the others have a normal windows box around them, like in pyrochild's plug-in? Link to comment Share on other sites More sharing options...
Toli Posted November 15, 2007 Author Share Posted November 15, 2007 Oh... this is done with only a line of code in the YourEffectConfigDialog class: this.BorderStyle = FormBorderStyle.FixedToolWindow or whatever FormBorderStyle you preffer. Link to comment Share on other sites More sharing options...
Recommended Posts