-
Posts
15,730 -
Joined
-
Last visited
-
Days Won
405
Everything posted by BoltBait
-
CodeLab 4.0 for the new Paint.NET 4.1 - UPDATED to Beta 3!
BoltBait replied to BoltBait's topic in Preview Center
On the File > New (Templates) screen, you can now choose a looping style of "None". This will generate a script like this: // Name: GDI+ Example // Author: BoltBait #region UICode #endregion // Working surface Surface wrk = null; // Setup for using Normal blend op private BinaryPixelOp normalOp = LayerBlendModeUtil.CreateCompositionOp(LayerBlendMode.Normal); protected override void OnDispose(bool disposing) { // Release any surfaces or effects you've created. if (wrk != null) wrk.Dispose(); wrk = null; base.OnDispose(disposing); } void PreRender(Surface dst, Surface src) { if (wrk == null) { wrk = new Surface(src.Size); } wrk.Clear(ColorBgra.Transparent); } // Here is the main render loop function void Render(Surface dst, Surface src, Rectangle rect) { using (Graphics g = new RenderArgs(wrk).Graphics) using (Region gClipRegion = new Region(rect)) using (Pen pen = new Pen(ColorBgra.Black, 1)) using (GraphicsPath path = new GraphicsPath()) using (SolidBrush brush = new SolidBrush(ColorBgra.Black)) using (Font font = new Font("Arial", 12)) { g.Clip = gClipRegion; g.SmoothingMode = SmoothingMode.AntiAlias; g.TextRenderingHint = TextRenderingHint.AntiAlias; pen.LineJoin = LineJoin.Round; // add additional GDI+ commands here } normalOp.Apply(dst, src, wrk, rect); } Notice that there are no loops in the Render method. In the Render method, CodeLab generates several "using" blocks. Just delete the ones you won't be using yourself. You'll probably want to modify the remaining "using" statements with user controls to make the various colors and sizes adjustable in your plugin. Finally, you can add additional GDI+ commands to render text, lines, and shapes to the wrk canvas which will then be combined with the source canvas to create your result. -
CodeLab 4.0 for the new Paint.NET 4.1 - UPDATED to Beta 3!
BoltBait replied to BoltBait's topic in Preview Center
Here is a CodeLab script for using the new FilenameControl: // Name: Fill from file // Author: BoltBait #region UICode FilenameControl Amount1 = @""; // Open Image|jpg|png|gif|bmp #endregion Surface wrk = null; protected override void OnDispose(bool disposing) { if (wrk != null) wrk.Dispose(); wrk = null; base.OnDispose(disposing); } void PreRender(Surface dst, Surface src) { if (wrk == null) { wrk = new Surface(src.Size); } try { // Use your FilenameControl to load an image for use wrk = Surface.CopyFromBitmap((Bitmap)Bitmap.FromFile(Amount1)); } catch { wrk.Clear(ColorBgra.Transparent); } } 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 = wrk.GetBilinearSampleWrapped(x,y); dst[x,y] = CurrentPixel; } } } Notice in the definition of the control, in the comment we have the title of the control followed by the file types allowed: FilenameControl Amount1 = @""; // Open Image|jpg|png|gif|bmp So, in this example, the prompt will be "Open Image" and the allowed file types will be .jpg, .png, .gif, and .bmp. For tinkering inside of CodeLab, between the quotes you can place a path to a file. (Notice that the @ sign before the first quote allows you to use the backslash character "\" without escaping it (doubling them). -
CodeLab 4.0 for the new Paint.NET 4.1 - UPDATED to Beta 3!
BoltBait posted a topic in Preview Center
This will be officially released when Rick releases Paint.NET v4.1. CodeLab v4.0 Beta*: <snip> Beta 3 build Requires: Paint.NET v4.1+ New Features: Editor has tabs (toe_head2001) Colorwheel control now has Alpha style option (BoltBait) Filename control (BoltBait) Generate VS Project function on Build screen (toe_head2001) File > New templates have a new "Non Looping" style for all of your GDI+ work (BoltBait) Separate Save and Save As functions (toe_head2001) The autocomplete function now does matching initials (as described below) (toe_head2001) Minor bug fixes (toe_head2001 and BoltBait) New Features in the Second Beta: Indicator Map (Ctrl+M) now integrated with scroll bar (toe_head2001) Colorwheel control reset button can now be hidden (BoltBait) Building to DLL now saves to Desktop in a ZIP file all ready for posting to the forum (BoltBait) Install.BAT files now work for both the Classic install and the Store version of Paint.NET (BoltBait) Generate VS Solution function now has an updated Post Build Event script (BoltBait) New Features in the Third Beta: Fixed bug in smallest colorwheel (found by @xod) (BoltBait) Now, before anyone says anything... when running CodeLab it may prompt you to download v3.5. This is normal! Just ignore it. That error message won't be there once the official release happens. Check out this new UI feature, tabs: How to access the new Colorwheel with Alpha: How to generate a script for using GDI+ commands: *This download has been deleted as the official version has been released. -
Some thing happened after I change a .pdn file into Jpg.
BoltBait replied to Kutti's topic in Troubleshooting & Bug Reports
This is probably what happened: You opened your PDN drawing. You hit File > Save As... You changed the name into a JPG file and hit the OK button. Now you have a problem. The problem here is that you didn't change the "Save as type" to match the filename. So, basically, you have a filename ending in .JPG that has a file in it in the PDN format. -
Paint.NET contacts getpaint.net to see if there is a new version available. It doesn't do this every time... just once a week (or 2 weeks, I forget). Anyway, getpaint.net is probably on the same server as the blog you circled. I'm really not sure why you'd get a report about that blog as it has nothing to do with paint.net.
-
Problems making transparent signature
BoltBait replied to oysyvert's topic in Paint.NET Discussion and Questions
Right, because she is showing you how to use a plugin. https://forums.getpaint.net/topic/112400-kill-color-keeper-v-12/ You can download the plugin here: -
Problems making transparent signature
BoltBait replied to oysyvert's topic in Paint.NET Discussion and Questions
When saving as png, make sure to choose a "bit depth" of "auto detect". -
HOW do i DELETE my old un-needed posts ?
BoltBait replied to hypercat's topic in Paint.NET Discussion and Questions
We generally don't delete posts here. If someone else has your same question, they might find it instead of asking the same question again. Just ignore them. I'm sure you could poke around and find some really embarrassing posts from me when I started. I just pretend they don't exist. Now, if there is a real problem, just report the post and a mod will take care of it. -
It's been updated to CC-BY.
-
BoltBait's Plugin Pack for PdN v4.0.6+ Updated Aug 16, 2017
BoltBait replied to BoltBait's topic in Plugin Packs
When you click "Install this feature", what happens? -
How to change pdn to png
BoltBait replied to bigboypadilla's topic in Paint.NET Discussion and Questions
File > Save As... Select PNG in the "save as type" box. -
Separate RGB channels if you're too lazy to install a plugin.
BoltBait replied to KidBrine's topic in Miscellaneous
I followed this tutorial and had good results. It is an interesting method. @KidBrine, clean this up with proper screenshots. -
Paint.NET is a pixel editor, not a word processor. Once you finalize text, it becomes pixels.
-
Cant find paint.net file folder
BoltBait replied to DivideOverflow's topic in Troubleshooting & Bug Reports
Read this: https://www.getpaint.net/doc/latest/InstallPlugins.html (second yellow box) -
Pointers for a Color Wheel with Alpha Selector
BoltBait replied to oblivioncth's topic in Plugin Developer's Central
This. -
Pointers for a Color Wheel with Alpha Selector
BoltBait replied to oblivioncth's topic in Plugin Developer's Central
I heard a rumor that the next release of Paint.NET will include this functionality. -
If you have discord, you need to get rid of it.
-
Please follow step 8: https://forums.getpaint.net/topic/110411-common-install-uninstall-crash-problems-and-solutions/
-
This has been implemented in v1.6
-
I kinda like this idea.
-
No! Don't do that! I don't mind you guys building on what I post. Just be warned, when I put this into my plugin pack, it will be the version I posted.
-
Man, pretty soon the UI will need a scroll bar... You all know how I feel about long UI's... (But, I can't control what you do with the source code I post.)
-
Paint.net crashes when trying to change language (fixed)
BoltBait replied to Franken's topic in Troubleshooting & Bug Reports
There's your problem right there. Stop that! Paint.NET is designed only to run from the folder where you install it. -
Paint.net crashes when trying to change language (fixed)
BoltBait replied to Franken's topic in Troubleshooting & Bug Reports
You have Paint.NET installed in your Documents directory?