Jump to content

n d

Members
  • Posts

    120
  • Joined

  • Last visited

Everything posted by n d

  1. Nice. I'd love to peek at the source...
  2. Doesn't crash for me... the intellisense window is empty though. ..no wait, now it crashed. nvm
  3. That's a nice idea Sarkut. Unfortunately it's a bit harder to implement on the plugin itself - this would require to call the zoom blur only after all of the gradient is rendered, and I know of no good way to do this thanks to the ROI system which splits the render area in smaller segments... Anyway, I'm still trying various options - I'm trying to do something like a convolution filter. On the good news, can you notice the speed up I achieved on Trail 3d compared to Shaped gradient? I found a way to optimize the code further, so you can expect a speed-up update to shaped gradient as well, soon. ... meh, didn't work after all... the code happens to be too different in that particular spot... damn.
  4. This is similar to my other plugin, shaped gradient. But instead of making the gradient in the shape of the selection, this is object-based - ie. it creates a sort of "trail" from the object to center point. You'll have to draw something on a transparent layer, then apply trail 3d, and see what happens... Examples Before: After: To-do: -implement anti-alias. As soon as I figure out how to do it on Shaped Gradient I will do the same on this - the code is very similar so porting a feature from one effect to the other is easy. -a feature to adjust the length of the trail. This should be relatively easy to code and will be in the next version, I hope. Enjoy. trail3d.zip
  5. ok I guess I'll enter my current, even though it's sort of a work in progress...
  6. So when are the winners announced? The thread says the poll ends 27th, which is past already...
  7. I'm using a 32bit OS, it crashed when I was adjusting some values.
  8. The plugin keeps crashing for me. Here's the error details File: C:\Program Files\Paint.NET\Effects\Lightning.dll Name: LightningC.LightningC Version: 1.0.3892.21014 Author: Cookies Copyright: Copyright © Ego Eram Reputo Website: http://www.getpaint.net/redirect/plugins.html Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.NullReferenceException: Object reference not set to an instance of an object. at PaintDotNet.Effects.CloudsEffect.OnRender(Rectangle[] renderRects, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\CloudsEffect.cs:line 137 at PaintDotNet.Effects.Effect`1.Render(Rectangle[] renderRects, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\Effect`1.cs:line 57 at LightningC.LightningC.Render(Surface dst, Surface src, Rectangle rect) at LightningC.LightningC.OnRender(Rectangle[] rois, Int32 startIndex, Int32 length) at PaintDotNet.Effects.Effect`1.Render(Rectangle[] renderRects, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\Effect`1.cs:line 57 at PaintDotNet.Effects.Effect`1.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\Effect`1.cs:line 100 at PaintDotNet.Effects.Effect.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois) in D:\src\pdn\pdn_35x\src\Effects\Effect.cs:line 211 at PaintDotNet.Effects.BackgroundEffectRenderer.RendererContext.Renderer(EffectConfigToken token) in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 127 --- End of inner exception stack trace --- at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 372 at PaintDotNet.Effects.BackgroundEffectRenderer.Join() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 363 at PaintDotNet.Effects.BackgroundEffectRenderer.Abort() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 327 at PaintDotNet.Effects.BackgroundEffectRenderer.Start() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 274 at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass1d.<>c__DisplayClass21.<RunEffectImpl>b__10() in D:\src\pdn\pdn_35x\src\PaintDotNet\Menus\EffectMenuBase.cs:line 827
  9. Congrats pdnnoob, it was a tight battle towards the end!
  10. Hm, I actually think the algorithm this is based on isn't too complicated. Start with a simple 1px paintbrush. When a pixel is drawn: check if there's other drawn pixels at a certain radius. If yes: - an X percent chance of: - - draw a line to a pixel within the radius, pixel to be choosen at random. and that's that. (I'm talking about the second link, not the first one)
  11. That'd be great, please do I also use vs2010 and seems most of the templates & sources pyro posted are for earlier versions... they don't always convert properly (like the blendmodes plus source.)
  12. Hi, this time I'm helping everyone make their images legible for the colourblind. If you're doing webpage design, or something similar where accessibility is important, you'll want to make sure that any critical elements of your webpage or other application are clearly visible for the colourblind. This effect simulates colourblindness, so you can see how your image looks in the eyes of a colourblind person. It currently only supports red/green colourblindness, but I intend to add more colourblindness types in the future. Red/green colourblindness is the most common form though, blue/yellow colourblindness is like 100 times rarer or so... Usage is simple, 3 options: Protanope - simulates protanope type colourblindness where red cone cells are dysfunctional Deuteranope - simulates deuteranope type colourblindness where green cone cells are dysfunctional General red/green - a general purpose red/green blindness simulation, just sets both red & green into an average of red & green colourblindsim.zip
  13. Ok, taking another approach, how would I go about implementing a winforms interface on a paint.net plugin? Is it a complicated task? I know how to design winforms applications, but I have no idea how to add them to a class library... or rather, I know how to add it, but how do I make it so that it replaces the indirectUI which is used by default by any codelab-generated code...?
  14. True.. it would be kinda inconvenient. is there no way the value of the indirectUI controls can be manipulated from within the code? Do I need to create a winforms interface for this?
  15. Now there's a new problem though: Every time slider1 is moved, it automatically sets the kerning values to whatever slider2 happens to be at that time. So this would mean that the values would have to be adjusted in order, and you can't move back to change anything or you'll have to adjust everything in between again... not a big improvement from the previous UI. Is there a way to move the sliders from inside the plugin? I would like the value that's stored in the array to be restored to the second slider when the first slider is moved. But can I do that, and if so, how?
  16. Ok, as for the 2 sliders thing, apparently I can't do that on codelab. I would need to declare the array where the kerning values will be stored outside the render loop, so that it is declared only once when the effect is started. Otherwise the effect keeps resetting the array everytime the render loop is called... So where should I declare the array? edit. never mind, figured that out (I made a new public static class at the start of the effect and that seems to work.)
  17. CSM, that's similar to what I'm already doing, and doesn't really address the issue at hand - the problem isn't controlling the values, the problem is the user interface... I'm trying to figure out a way to implement this with a better interface - ie. less sliders. Thanks though.
  18. Well... personally I feel if the users can't understand that a slider that controls which character you move doesn't move anything if you set it on letter #20 on a 10-letter word, then I would recommend some basic math lessons before they even try to use a computer. But yeah, if anyone can think of a better solution I'm all ears (or should I say eyes.)
  19. Hm. couldn't I also just transfer the string into an array of char and pad it with spaces, so it will always be long enough?
  20. Yeah, a slider would probably work. I can't believe I didn't think of that... So, I should make two sliders. Let's name them Amount1 and Amount2 for simplicity... Amount1 would control which character Amount2 moves. So, every time Amount2 is changed my code should check the value in Amount1 and then it adjusts the number in the kerning array[Amount1] according to the value of Amount2. So what I need to know, is there a method that can be used (in codelab if possible?) to check if the value of Amount2 changes?
  21. Is there any way to do a drop-down box using the indirectUI?
  22. Yep, I had gotten that far... I'm just not all too sure how to implement the drop-down + slider functionality on the plugin. Can I use the VS winforms designer to design the plugin interface? Sorry, I'm quite a noob at this still..
  23. Glad you like it. I won't mind. It already is. At least, opentype fonts work on it on my computer. If they don't on yours... I honestly have no idea why that would be. You do realize this would double the amount of sliders? Are you sure you want this? Hm. The Graphics.DrawString method uses the top left corner for the text placement, so I don't know - I might be able to do this with the y axis, but doing it with the x axis would be kinda complicated .... So just use 1. Honestly, I'm not even sure what the 2 option is useful for, but decided to include it anyways... Thanks. Something I am going to add is an "overall" slider which adjusts the overall x-spacing of the letters... I noticed, with longer words and fonts that need lots of adjusting, the sliders may not go far enough... so this would fix this problem without making the sliders too big and hard to adjust (the UI is bad enough already...)
×
×
  • Create New...