Jump to content

BoltBait

Administrator
  • Posts

    15,730
  • Joined

  • Last visited

  • Days Won

    405

Everything posted by BoltBait

  1. CodeLab 3.4 Released This is only for Paint.NET 4.0.6+! Small update today... Changes: ▪ HiDPI Fixes and other UI tweaks. (toe_head2001 and BoltBait) ▪ Fixed bug where AutoComplete wouldn't work correctly if the 'Find & Replace' was being used. (toe_head2001) ▪ Add a Bookmarks margin. (toe_head2001) ▪ Shows Errors, Find, and Bookmarks in an Indicator Map (Ctrl+M). (toe_head2001) ▪ Format Document shortcut key changed to Ctrl+Q. (toe_head2001) ▪ Variables declared in sequence are now parsed. (toe_head2001) ▪ Correct Method overloads are now detected. (toe_head2001) Grab the CodeLab DLL here: http://www.boltbait.com/pdn/CodeLab/
  2. I fixed the issue that MadJik found. Then, I extended the functionality to add gradient fills: // Name: Outlined / Gradient text // Submenu: Text Formations // Author: xod & BoltBait // Title: Outlined / Gradient text // Version: 1.0 // Desc: Draws outlined, gradient filled text // Keywords: text|gradient|outline // URL: #region UICode MultiLineTextboxControl Amount1 = "TEST"; // [1,32767] Text FontFamily Amount2 = new FontFamily("Arial"); // Font IntSliderControl Amount3 = 72; // [2,400] Font size IntSliderControl Amount4 = 8; // [0,100] Outline size ColorWheelControl Amount5 = ColorBgra.FromBgr(0,0,0); // [PrimaryColor] Outline color ColorWheelControl Amount6 = ColorBgra.FromBgr(255,255,255); // [SecondaryColor] Fill color ListBoxControl Amount7 = 0; // Fill Type|Solid Fill|Vertical Gradient|Horizontal Gradient|Diagonal Gradient|Reverse Diagonal Gradient ColorWheelControl Amount8 = ColorBgra.FromBgr(0,0,0); // [SecondaryColor] {!Amount7} Secondary Fill Color PanSliderControl Amount9 = Pair.Create(0.000,0.000); // Location #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle sel = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); dst.CopySurface(src,rect.Location,rect); int adrX = (int)Math.Round((((Amount9.First + 1) / 2) * (sel.Right - sel.Left)) + sel.Left); int adrY = (int)Math.Round((((Amount9.Second + 1) / 2) * (sel.Bottom - sel.Top)) + sel.Top); String text = Amount1; if (text == "") text = " "; FontFamily font = Amount2; int txtSize = Amount3; Color fontColor = Amount6; int outlineSize = Amount4; Color outlineColor = Amount5; byte opacity = 255; Graphics g = new RenderArgs(dst).Graphics; g.SmoothingMode = SmoothingMode.AntiAlias; g.TextRenderingHint = TextRenderingHint.AntiAlias; StringFormat format = new StringFormat(); format.Alignment = StringAlignment.Center; format.LineAlignment = StringAlignment.Center; ColorBgra FillColor1 = Amount6; ColorBgra FillColor2 = Amount8; if (Amount7 == 0) FillColor2 = FillColor1; SizeF stringSize = new SizeF(); stringSize = g.MeasureString(text, new Font(Amount2, Amount3)); int GStartX = 0; int GStartY = 0; int GEndX = 1; int GEndY = 1; switch (Amount7) { case 1: GStartX = adrX; GEndX = adrX; GStartY = (int)(adrY - stringSize.Height / 2); GEndY = (int)(adrY + stringSize.Height / 2); break; case 2: GStartX = (int)(adrX - stringSize.Width / 2); GEndX = (int)(adrX + stringSize.Width / 2); GStartY = adrY; GEndY = adrY; break; case 3: GStartX = (int)(adrX - stringSize.Width / 2); GStartY = (int)(adrY - stringSize.Height / 2); GEndX = (int)(adrX + stringSize.Width / 2); GEndY = (int)(adrY + stringSize.Height / 2); break; case 4: GStartX = (int)(adrX + stringSize.Width / 2); GStartY = (int)(adrY - stringSize.Height / 2); GEndX = (int)(adrX - stringSize.Width / 2); GEndY = (int)(adrY + stringSize.Height / 2); break; default: break; } using (GraphicsPath path = new GraphicsPath()) using (Pen outlinePen = new Pen(Color.FromArgb(opacity, outlineColor), outlineSize)) using (LinearGradientBrush myGradientBrush = new LinearGradientBrush(new Point(GStartX,GStartY),new Point(GEndX,GEndY), FillColor1, FillColor2)) { g.Clip = new Region(rect); FontFamily myFont; try { myFont = new FontFamily(font.Name); } catch { myFont = new FontFamily("Arial"); } outlinePen.LineJoin = LineJoin.Round; path.AddString(text, myFont, (int)FontStyle.Regular, g.DpiY * txtSize / 72, new PointF(adrX, adrY), format); if (Amount4 > 0) { g.DrawPath(outlinePen, path); } g.FillPath(myGradientBrush, path); } g.Dispose(); } People are always searching for a way to outline text and also to draw gradient filled text. Now, they can get it from you. Enjoy.
  3. Did you try this: https://forums.getpaint.net/topic/112453-scan-your-crashlog-for-common-solutions/ It will tell you how to fix your problem.
  4. What about the following files: ImPDF.Save.FileType.dlc and ImPDF.Save.FileType.dll If they are not installed on your system, you can download them in the first post in this thread.
  5. That is easily fixed with a single line of code: outlinePen.LineJoin = LineJoin.Round; // Just add this line and those mitred line ends will be gone! path.AddString(text, myFont, (int)FontStyle.Regular, g.DpiY * txtSize / 72, new PointF(adrX, adrY), format); g.DrawPath(outlinePen, path); g.FillPath(myBrush, path);
  6. Seems to work pretty good to me. What issues are you seeing?
  7. One way to do that is to type your text on a new, transparent layer. Then, add the outline color by using the "Effects > Objects > Outline" plugin in my plugin pack.
  8. There's your problem right there. Turn that feature off and see if that fixes the problem.
  9. You're assuming a lot there. I did check the EXIF data of the images the OP posted... no trace of paint.net.
  10. Here's how do draw a gradient using paint.net: 1) Select the starting color and ending color for your gradient using the color docker window. 2) On the canvas, click and drag from where you want the color to start to where you want the color to end. 3) Press the ENTER key to finalize your gradient. As you can see, the users around here are very helpful. However, they will not do your work for you. You must do it. Try the suggestions posted in this thread and let us know how it works for you. If you get stuck, show us what you've tried and ask for help.
  11. The same applies to the move tools: Move Pixels Tool (M) Move Selection Tool (MM) and the selection tools: Square Selection Tool (S) Lasso Selection Tool (SS) Circle Selection Tool (SSS) Magic Wand Tool (SSSS)
  12. @Pratyush, read this page: http://www.boltbait.com/pdn/CodeLab/help/tutorial5.php where it says "Finally, right-click"
  13. Try this plugin: https://forums.getpaint.net/topic/28520-print-it-tools-effect/ It gives you more control over printing. (But, it requires your image to be a single layer.)
  14. At the end of the install program there is a screen with a checkbox for running paint.net. If that is checked and you click OK, what happens?
  15. Paste the full text of your crash log into this yellow box: Scan Then, press the scan button. Your suggestions will be listed here. Reset
  16. Nope. Here's why: CodeLab relies on the compiler that ships with the .NET framework and NOT the compiler that ships with Visual Studio. This allows CodeLab to work on systems that do not have Visual Studio installed. The .NET compiler (csc.exe) is stuck at C# version 5.0 or 6.0 (I can't remember which).
  17. According to this page: https://forums.getpaint.net/topic/110411-common-install-uninstall-crash-problems-and-solutions/ Discord Overlay is not compatible with paint.net.
  18. Gah! I'm already starting to regret promoting you.
  19. OMG, look out! @Pixey will be writing her own plugins soon! BTW, @MadJik, this is a very unique and interesting plugin. I don't think there is another plugin designed to be unique for every user that has it. Great idea. One question, if the text points to a graphic, do you have a "zoom" slider? Here is some code you could use to "zoom" a loaded bitmap:
  20. Well, with the way it stands, I'm pressured to enter.
  21. Solution: simply agree with your wife to celebrate the holiday on different days. If you delay by a week, everything's on sale and the restaurants are empty.
  22. @lynxster4, go ahead and change the picker on the contest to welshblue.
  23. OK, I don't see anything obvious in there. Let's try something else. The next time your paint.net freezes, right-click on your taskbar and choose "Task Manager" from the menu. Then, do 1, 2, and 3: BTW, you can leave this window open while you continue to use paint.net.
  24. Go into your settings by clicking the gear icon in the upper right corner of your paint.net window. From there, click Diagnostics (on the left). Click the "Copy to clipboard" button. Come back here and paste that information into your post.
×
×
  • Create New...