-
Posts
15,728 -
Joined
-
Last visited
-
Days Won
405
Everything posted by BoltBait
-
Adding a Help Button to CodeLab plugins
BoltBait replied to MJW's topic in Plugin Developer's Central
You're welcome. It is part of a tutorial of CodeLab tricks that I never finished. Those are very handy. I'll tell you why. 1) You no longer need to run Paint.NET as an administrator in order to build dll files in CodeLab. This allows you to drag-and-drop files onto Paint.NET in order to open them--something you can't do in Admin mode. 2) It is actually a quick way to install your plugin dll file. The batch file will obtain admin rights if it doesn't have them before attempting to install the dll file. -
Adding a Help Button to CodeLab plugins
BoltBait replied to MJW's topic in Plugin Developer's Central
How about like this: #region UICode byte Amount1 = 0; // [255] Help #endregion int PreviousHelpButton = -1; void Render(Surface dst, Surface src, Rectangle rect) { if (PreviousHelpButton== -1) { PreviousHelpButton = Amount1; } if (PreviousHelpButton != Amount1) { PreviousHelpButton = Amount1; System.Windows.MessageBox.Show("This is the help text"); } ColorBgra CurrentPixel; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = src[x,y]; // TODO: Add pixel processing code here // Access RGBA values this way, for example: // CurrentPixel.R = (byte)PrimaryColor.R; // CurrentPixel.G = (byte)PrimaryColor.G; // CurrentPixel.B = (byte)PrimaryColor.B; // CurrentPixel.A = (byte)PrimaryColor.A; dst[x,y] = CurrentPixel; } } } NOTE: Don't use this code. There is published improved code here. -
how to access more colors (like brown)?
BoltBait replied to echarles's topic in Paint.NET Discussion and Questions
Try installing one of these palette files: http://forums.getpaint.net/index.php?/topic/2947-color-palettes-go-here/ -
Cannot save anything from Paint.net to anywhere, Help?
BoltBait replied to Greymanz's topic in Troubleshooting & Bug Reports
Glad you got it working. -
Cannot save anything from Paint.net to anywhere, Help?
BoltBait replied to Greymanz's topic in Troubleshooting & Bug Reports
Something is preventing paint.net from accessing the registry. This key shouldn't be protected. Usually, malware makes your registry read-only in order to prevent you from removing the malware. Maybe your virus software is doing the same thing. What you need to do is run regedit and right-click on computer\hkey_current_user\software\paint.net key and choose Permissions... then click "Advanced" button to see why you can't modify that key. -
Cannot save anything from Paint.net to anywhere, Help?
BoltBait replied to Greymanz's topic in Troubleshooting & Bug Reports
I think you need to scan your system for viruses and malware. -
I need help.. I can't open this file!
BoltBait replied to iLink's topic in Troubleshooting & Bug Reports
I knew you were going to say that. -
I need help.. I can't open this file!
BoltBait replied to iLink's topic in Troubleshooting & Bug Reports
Try this plugin on the file: http://forums.getpaint.net/index.php?showtopic=31715 -
8x8 Picture to Grayscale Hexadecimal
BoltBait replied to Omar Chehab's topic in Plugin Developer's Central
http://forums.getpaint.net/index.php?/topic/880-codelab-for-advanced-users-v25-released-march-14-2015/?p=413407 http://forums.getpaint.net/index.php?/topic/880-codelab-for-advanced-users-v25-released-march-14-2015/?p=421942 -
Please restore old circle behaviour
BoltBait replied to HSchou's topic in Paint.NET Discussion and Questions
The big benefit is that shapes can be adjusted (rotated, resized, reshaped, recolored, etc.) after being drawn and before being applied to the drawing. -
Try pressing F5.
-
TR's Croquis V 1.4 (Dwarf Horde Collaboration)
BoltBait replied to TechnoRobbo's topic in Plugins - Publishing ONLY!
No need to understand code in order to copy-and-paste that block of code into CodeLab. -
TR's Croquis V 1.4 (Dwarf Horde Collaboration)
BoltBait replied to TechnoRobbo's topic in Plugins - Publishing ONLY!
Haha! Thanks! Here's something to try: After running the plugin with both check boxes checked, you should get something that looks like colored chalk on an old blackboard. Then run this CodeLab script: // Name: HSV Invert // Submenu: Color // Author: BoltBait // URL: http://www.BoltBait.com // Keywords: hsv|invert|color // Title: BoltBait's HSV Quick Invert - v1.0 // Desc: Quickly invert H, S, or V in the HSV color space. #region UICode byte Amount1 = 0; // HSV Editing|Invert V|Invert S|Invert H|Maximize S|Maximize V #endregion void Render(Surface dst, Surface src, Rectangle rect) { for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { ColorBgra CurrentPixel = src[x,y]; HsvColor hsv = HsvColor.FromColor(CurrentPixel.ToColor()); int H = hsv.Hue; int S = hsv.Saturation; int V = hsv.Value; byte A = CurrentPixel.A; switch (Amount1) { case 0: V = 100-V; break; case 1: S = 100-S; break; case 2: H += 180; if (H>360) H -= 360; break; case 3: S = 100; break; case 4: V = 100; break; } CurrentPixel = ColorBgra.FromColor(new HsvColor(H,S,V).ToColor()); CurrentPixel.A = A; dst[x,y] = CurrentPixel; } } } -
Smoothing the Radial Gradient
BoltBait replied to jp2paint's topic in Paint.NET Discussion and Questions
After drawing your gradient, use Effects > Distort > Frosted Glass instead of Gaussian Blur. Increase the minimum scatter radius a little bit and adjust the maximum scatter radius to taste. -
Please restore old circle behaviour
BoltBait replied to HSchou's topic in Paint.NET Discussion and Questions
Once you draw a circle, you can always move it before committing it to the canvas by grabbing the handle. -
Why were the zoom buttons moved?
BoltBait replied to Darkychao's topic in Paint.NET Discussion and Questions
Pin your taskbar so it is always visible, or move it to the right. Once I got used to the new location, I actually like it better... now that it is just like MS Word, Excel, etc. BTW, you can use the keyboard short cuts Ctrl--, Ctrl-+, and Ctrl-0. -
Please read the forum rules. Specifically #8. http://forums.getpaint.net/index.php?/topic/2932-read-first-the-rules-yes-you-read-this-2010-3-15/
-
Fatal Error when installing Paint.net?
BoltBait replied to Warxfreedom's topic in Troubleshooting & Bug Reports
I'm trying to use my psychic powers to read your mind, but nothing seems to be coming through. Could you post the EXACT text of the error message so that maybe we can help you? A screenshot of the error would be helpful too. -
Looking for Line with arrow plugin?
BoltBait replied to rayj00's topic in Paint.NET Discussion and Questions
No need for a plugin. After selecting the line tool, look at the tool bar to adjust the line endings. -
Yeah, I have an idea... Upgrade to paint.net 4.0+ If you can't do that, try changing the line: double Amount7 = 0.15; // [0,1] Gray Upper Limit (S×V) to double Amount7 = 0.0; // [0,1] Gray Upper Limit (S×V) This is due to a bug in CodeLab or Paint.NET 3.5x (not sure which).
-
You could use: return ColorBgra.FromBgra(0,0,0,0);Same thing.
-
Is there a tool/plugin for "jumbling" pixels?
BoltBait replied to iamnoob's topic in Paint.NET Discussion and Questions
Sure. Try: Effects > Distort > Frosted Glass