Jump to content

toe_head2001

Administrator
  • Posts

    5,019
  • Joined

  • Last visited

  • Days Won

    155

Everything posted by toe_head2001

  1. These three lines: int R = (int)(double)((CurrentPixel.R < 128) ? 0 : 255); int G = (int)(double)((CurrentPixel.G < 128) ? 0 : 255); int B = (int)(double)((CurrentPixel.B < 128) ? 0 : 255); Why do you have these casts here? You only have two possible values: 0 or 255. They are already compatible int values, so no need for '(int)'. And I have no idea why you have the '(double)'. Much cleaner code without the useless casts. If you wanted to, you can also remove the () around the inline If statements. int R = CurrentPixel.R < 128 ? 0 : 255; int G = CurrentPixel.G < 128 ? 0 : 255; int B = CurrentPixel.B < 128 ? 0 : 255; Why put the Clouds effect code in OnSetRenderInfo? You lose the advantage of using ROIS. Both can work perfectly fine in Render. Please tell me the rationale for this decision.
  2. Version 1.4 posted. Two big things: -The calculation code for the Check Digit on 'Code39 MOD43' was wrong, resulting in an incorrect Check Digit (and in some cases, a crash). In 8 years since Sepcot's first release, no one (including myself, until tonight) ever bothered to verify if it was correct -Also moved the barcode generation code into OnSetRenderInfo, resulting a very nice speed increase. See first post for full changelog, and download. I have not forgot about this, but I'm thinking it should be a separate plugin, as QR can have a lot of parameters that wouldn't fit in with the current UI. That being said, it shouldn't be too difficult to port over an existing C# QR code project; there are many free ones on the internet.
  3. Version 1.2 posted. Fixes two things: -The effect would crash if the Tokens for the List Sets were updated while the render was in the middle of processing them. Had to wrap the relevant code in a try{ } -The ending Y coordinate for the vertical lines was using the selection width rather than the height. This was only noticeable if you were working with a portrait selection/canvas .
  4. Version v1.2 posted. It will now check if the Trimmed Bitmap is null, and no longer crash. Sorry it took me so long to push out this update... kind of forgot about your post until this evening...
  5. You've made yet another great custom Shapes pack. Thanks for posting!
  6. Version v2.0 posted. I discarded @evanolds' custom math code, and rewrote the effect from scratch using standard .NET functions. See first post for complete changelog.
  7. Why not fix the larger issue, and completely remove the adware/spyware that is Adobe Reader DC. SumatraPDF offers software freedom, and doesn't have ads or spying components.
  8. This can be done programmatically in .NET. You can use MeasureString() to get the dimensions of the text, and use those dimensions to draw a filled rectangle.
  9. While this plugin can do gingham and tattersall patterns, I would still recommend those plugins. If someone specifically wanted to create a gingham pattern, it is faster and less cumbersome to use the Gingham plugin. If anyone wants to create some sample .xml files, they can send them to me a PM and I can add them to the first post. I only issue I foresee is that there currently is no way to edit the built lines (in the UI at least, one could manually edit the .xml file).
  10. Version 1.1 posted with Save & Load functionality. I must say, it was a lot easier than I thought it would be. I thought I would have to define a custom XML structure and everything, so it was great to see XMLSerializer just simply knew how to structure the XML based on the existing code. Button icons from Fugue Icons. I also added a link to the source code; which I had forgotten to do last week. Here's an example tartan you can load. tartan-example.xml I've found that using the 'Grain' plugin afterwards will give a decent fabric texture to the pattern. Does anyone have some other techniques for making the tartan patterns look more like fabric? Sorry about the broken images on all of my posts. My domain name was unexpectedly suspended today for reasons unknown to me. Hopefully that will be sorted out within a few days.
  11. You could use the selection bounds instead of the ROI in your loops. Just keep in mind: -Not using the ROI will result in lower performance -It will not work on irregular selections (non-rectangular). ie: elliptical selections, freeform selections, ect -It's not recommended void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); for (int y = selection.Top; y < selection.Bottom; y++) { if (IsCancelRequested) return; for (int x = selection.Left; x < selection.Right; x++) { } } }
  12. In this case you'd want to use the 'Nearest Neighbor' option when resizing.
  13. I've made a simplified code example here. Not exactly a "How to" or a tutorial, but I hope my comments are sufficient. This is your xyzConfigDialog.cs file. It acts as a WinForm file. See first code comment. namespace xyzEffect { // Notice it doesn't say " : Form", but rather " : EffectConfigDialog<xyzEffectPlugin, xyzConfigToken>" // Another option is simply " : EffectConfigDialog", but I don't like that option internal partial class xyzConfigDialog : EffectConfigDialog<xyzEffectPlugin, xyzConfigToken> { // Standard stuff here. No need to explain. public xyzConfigDialog() { InitializeComponent(); } //When the checkbox is toggled it tells the Tokens to update private void checkBox1_CheckedChanged(object sender, EventArgs e) { FinishTokenUpdate(); } //When the numberBox is toggled it tells the Tokens to update private void numericUpDown1_ValueChanged(object sender, EventArgs e) { FinishTokenUpdate(); } // Initailized the Tokens from your xyzConfigToken.cs file protected override xyzConfigToken CreateInitialToken() { return new xyzConfigToken(); } // Sets the UI control values from the stored token values protected override void InitDialogFromToken(xyzConfigToken fromToken) { checkBox1.Checked = fromToken.UseColor; numericUpDown1.Value = fromToken.Width; } //Sets the token values from the UI control values protected override void LoadIntoTokenFromDialog(xyzConfigToken toToken) { toToken.UseColor = checkBox1.Checked; toToken.Width = numericUpDown1.Value; } } } This is your xyzConfigToken.cs file namespace xyzEffect { // Notice the " : EffectConfigToken" class xyzConfigToken : EffectConfigToken { private bool t_useColor; private int t_width; // Initializes the configuration token public xyzConfigToken() : base() { t_useColor = true; t_width = 20; } private xyzConfigToken(bool useColor, int width) { t_useColor = useColor; t_width = width; } public override object Clone() { return new xyzConfigToken(t_useColor, t_width); } // These are the public functions that can be referrence from other classes public bool UseColor { get { return t_useColor; } set { t_useColor = value; } } public int Width { get { return t_width; } set { t_width = value; } } } } This is your xyzEffect.cs file namespace xyzEffect { // Notice the " : Effect<xyzConfigToken>", rather than " : PropertyBasedEffect" // Another option is simply " : Effect". Again, I don't like that option. internal class xyzEffectPlugin : Effect<xyzConfigToken> { ... bool useColor; int width; // Inside OnSetRender, grab the saved Tokens so that your cool script can use their values. protected override void OnSetRenderInfo(xyzConfigToken newToken, RenderArgs dstArgs, RenderArgs srcArgs) { useColor = newToken.UseColor; width = newToken.Width; } ... // The rest is standard stuff...
  14. What specifically would need to be covered in the tutorial? Hooking up the UI controls to the Effect Tokens? Specifying that the WinForm is a EffectConfigDialog? I assume you know how to populate a WinForm with standard controls, and create events for them.
  15. I'm pretty sure RCM is referring to Exif metadata. I don't always use Exif metadata, but when I do, I use the File Properties dialog in Windows Explorer.
  16. Tartan Effects -> Texture -> Tartan Description Provides a UI to build custom tartan/plaid patterns. The left side of the UI is the builder section. The right side of the UI is what gets rendered to the canvas. The Horizontal Set & the Vertical Set get repeated. Screenshots Images have been cropped to give more desirable edges. ---> Change Log v1.5.2 (Jan 3, 2019) Fixed: Incorrect rendering for selections v1.5.1 (Sept 29, 2018) Fixed: HiDPI issues v1.5 (July 3, 2018) Added: Support for the Dark Theme Changed: Moved to the 'Texture' menu v1.4 (Dec 12, 2016) Changed: UI Corrections & Adjustments v1.3 (Jan 22, 2016) New: There is now a preview box for the Line Style Changed: Minor UI Adjustments v1.2 (Nov 7, 2015) Fixed: Crash caused by a race condition Fixed: Was using the wrong ending-coordinate on vertical lines v1.1 (Oct 31, 2015) New: Save & Load tartan patterns Changed: Minor UI Adjustments v1.0 (Oct 22, 2015) Initial release Notes Thanks goes to @TechnoRobbo for his Color Wheel code, on which the Color Control in this plugin is based. Save & Load icons based on icons from from Fugue Icons. Download Tartan.zip Source Code https://github.com/toehead2001/pdn-tartan
  17. Most videos on YouTube are licensed under the 'Standard YouTube License' which indirectly gives the freedom for 3rd-parties to embed. If the uploader wanted to, they can manually disable embeds on their videos regardless.
  18. ArgusMagnus' plugin is also located in the Effects > Advanced menu, if you put the .dll in the Effects directory. I didn't even notice you could alternatively place it in the FileTypes directory, until I read these replies and re-read the original post. I agree, as a file type, it doesn't make too much sense.
  19. Fancy. When there are conflicts, it would be nice to see the assembly version of the two files. You have an unhanded exception when the cancel button is click on the Open file dialog.
  20. I was able to get this to compile and run with paint.net v4 after making some minor changes. However, it still doesn't work. It doesn't list paint.net's internal file types. I think Rick changed these to private in the code, if I remember right. Also, even when you select a 3rd-party file type, no files get outputted into the save directory.
  21. I concur, I like the look of it. I plan on making a general tartan/plaid plugin in which every line can be customized individually, and x and y lines can be completely different from each other. The number of lines would be user defined too. For example, you'd be able to enumerate, say a 5 horizontal line pattern of varying widths, colors & styles, and also enumerate 3 completely different custom vertical lines. I already know how I'm going to most of it. It will take a little longer since I'll have to do it in Winforms instead of IndirectUI. Hopefully I'll start working on it this coming week. Edit: The Tartan plugin is available.
  22. SubLCD This is a usability update of @xrl's original SubLCD resize plugin. See changelog below. Adjustments -> SubLCD Features Example Images Before (Actual and Zoomed-in) After (Actual and Zoomed-in) Changelog v1.2 by toe_head2001 (Jan 9, 2016) Fixed: Now works properly on selections (for real this time). Rectangular selections worked, but non-rectangular did not. Fixed: Now works when run from the 'Plugin Browser' v1.1 by toe_head2001 (Oct 9, 2015) New: Pre-resize and post-crop are no longer necessary. Simply run the plugin. New: Now works properly on selections v1.0 by xrl (Jan 15, 2008) Initial release Download SubLCD.zip Source Code https://github.com/toehead2001/pdn-sublcd
  23. The text much too blurry and distorted. It took me a few seconds to understand it as "R3V0LUTION" Why is it that only one of the characters has a shadow? A skeleton with a archery bow riding a giant spider?
  24. Do you simply wan want a regular rectangle with deeper 3D edges, or do you want the the range for 'Rounded Edges' in Shape '3D' to go beyond 5.0?
  25. Or, if you prefer the keyboard, press F4.
×
×
  • Create New...