xod
-
Posts
632 -
Joined
-
Last visited
-
Days Won
20
Posts posted by xod
-
-
I knew that, but after the version I made (1.1)
there are a lot of other numbers, e.g. 1.1.6627.36138 -
Someone asked me to add a font style.
I added the Bold, Italic and Underlined style in the new version.Question: How to change version of plugin in CodeLab?
-
This effect was created in VisualStudio only to understand how things work.
It's about ConfigToken, ConfigDialog, InitTokenFromDialog, InitDialogFromToken, and so on.
So it can't be really considered as a plugin. Found in Effects > Render submenu.- 1
- 2
-
Done. Thanks.
- 1
- 1
-
BoltBait, the plugin posted here was built on your updated code.
So without the Intensity slider, you're right is useless. -
- Popular Post
- Popular Post
The plugin it does exactly what the name says. Found in Effects > Text Formations.
UI:
I thanks to BoltBait who improved very much this plugin.
You can get a very smooth text:
- 7
- 3
-
@Djisves the plugin is not finished yet.
But if you want it in this state:
When running the plugin, if you did not type any text and choose a gradient the plugin crashes.
System.OutOfMemoryException: Out of memory.
- 1
-
Do you have the Impact font installed?
-
Before the build press Ctrl+I and then hit Update button. Now build it again.
-
Added new gradient facilities.
Spoiler// 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("Impact"); // Font IntSliderControl Amount3 = 140; // [2,400] Font size IntSliderControl Amount4 = 8; // [0,100] Outline size ColorWheelControl Amount5 = ColorBgra.FromBgr(0,0,255); // [Red] Outline color ColorWheelControl Amount6 = ColorBgra.FromBgr(139,0,0); // [DarkBlue] Fill color ListBoxControl Amount7 = 5; // Fill Type|Solid Fill|Vertical Gradient|Horizontal Gradient|Diagonal Gradient|Reverse Diagonal Gradient|Vertical Gradient Reflected|Horizontal Gradient Reflected ColorWheelControl Amount8 = ColorBgra.FromBgr(255,255,0); // [Cyan] {!Amount7} Secondary Fill Color DoubleSliderControl Amount9 = 0.5; // [0,1] {!Amount7} Start position DoubleSliderControl Amount10 = 1; // [0,1] {!Amount7} Intensity PanSliderControl Amount11 = 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(((Amount11.First + 1) / 2) * (sel.Right - sel.Left)); int adrY = (int)Math.Round(((Amount11.Second + 1) / 2) * (sel.Bottom - sel.Top)); String text = Amount1; FontFamily font = Amount2; int txtSize = Amount3; Color fontColor = Amount6; int outlineSize = Amount4; Color outlineColor = Amount5; byte opacity = 255; if (Amount4 == 0) opacity = 0; //no outline float startGradient = (float) Amount9; float intensity = (float) Amount10; 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; case 5: GStartX = adrX; GEndX = adrX; GStartY = (int)(adrY - stringSize.Height / 2); GEndY = (int)(adrY + stringSize.Height / 2); break; case 6: GStartX = (int)(adrX - stringSize.Width / 2); GEndX = (int)(adrX + stringSize.Width / 2); GStartY = adrY; GEndY = adrY; 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)) { if(Amount7 == 5|| Amount7 == 6) myGradientBrush.SetBlendTriangularShape(startGradient, intensity); 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(); }
- 1
-
Thank you very much both of you: BoltBait and MadJik who have shown interest in completing this plugin. Thanks to you it looks very professional now.
Thank you toehead_2001 and special thanks for Ego Eram Reputo who gave me some very clear and detailed explanation about VS template. -
In my previous plugin Histograms how can I update (in code) the controls to preserve previous values for a new run in another layer?
I read this topic but I can't figure it out.
https://forums.getpaint.net/topic/2248-visual-studio-2005-effect-plugin-template/
-
Thanks BoltBait.
Now you can increase the 'Outline size' to 100 or more without peek, as MadJik has noticed.But some fonts like Algerian will not even look like the original, (e.g. see D letter) but it's pretty good.
-
Hi Andrew.
I also struggled with the same problems at first time, but I downloaded some source codes and studied them to find the solution.
I use Visual Studio Community 2015 with NET Framework 4.7 and I don't have any problems.
I can make a video for you if you wish.
-
This is my Outlined text plugin. Is not working very well because of the approach.
Spoiler// Name: Outlined text // Submenu: Text Formations // Author: xod // Title: Outlined text // Version: 1.0 // Desc: // Keywords: // URL: // Help: #region UICode MultiLineTextboxControl Amount1 = "Test"; // [1,32767] Text FontFamily Amount2 = new FontFamily("Arial"); // Font IntSliderControl Amount3 = 72; // [2,400] Font size ColorWheelControl Amount4 = ColorBgra.FromBgr(255,255,255); // [White] Font color IntSliderControl Amount5 = 5; // [1,10] Outline size ColorWheelControl Amount6 = ColorBgra.FromBgr(0,0,0); // [Black] Outline color PanSliderControl Amount7 = 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(((Amount7.First + 1) / 2) * (sel.Right - sel.Left)); int adrY = (int)Math.Round(((Amount7.Second + 1) / 2) * (sel.Bottom - sel.Top)); String text = Amount1; FontFamily font = Amount2; int txtSize = Amount3; Color fontColor = Amount4; int outlineSize = Amount5; Color outlineColor = Amount6; 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; using (GraphicsPath path = new GraphicsPath()) using (Pen outlinePen = new Pen(Color.FromArgb(opacity, outlineColor), outlineSize)) using (SolidBrush myBrush = new SolidBrush(fontColor)) { g.Clip = new Region(rect); FontFamily myFont; try { myFont = new FontFamily(font.Name); } catch { myFont = new FontFamily("Arial"); } path.AddString(text, myFont, (int)FontStyle.Regular, g.DpiY * txtSize / 72, new PointF(adrX, adrY), format); g.DrawPath(outlinePen, path); g.FillPath(myBrush, path); } }
- 1
-
I don't understand the xaml (eXtended Application Markup Language) concept very well. I have to study this deeper.
Thanks for your suggestions. -
I was thinking of a 3D bar graph.
11 minutes ago, MadJik said:Why not use Excel or equivalent to handle all this? You still could save the graph as an image and rework it in paint.net.
Well, that's the reason I abandoned it.
-
Hystograms is an unfinished plug-in. If someone is interested he can develop it.
The UI interface looks like below.Source code is posted as zip file. You will also find the dll file in the bin\debug folder.
-
In Gedaante's example, the whole edge becomes dark blue.
I do not know how he did this using a paint bucket with 0% tolerance. -
You need an update.
The newest version is 4.0.21
Please update and see if the problem persists.
Click on gear (Settings) > Updates > Check now.Eli, I could not reproduce the problem even if I disable antialiasing. Only 1 pixel from border became dark blue.
-
I could not reproduce this behavior.
What version of paint.net do you have? -
That would be absolutely fantastic!
-
I use sometime older computers with Windows XP and paint.net 3.5.11
At work I use Windows 7 and I can't update to the last version of net framework because I don't have
admin rights so I use paint.net v4.0.19 on stick.
I need CodeLab compatible with these versions of paint.net. -
Is there any way to get all versions of CodeLab from v2 to v3.2?
Unfinished plugins
in Plugin Developer's Central
Posted · Edited by xod
Spaced / Outlined text it only supports 32 characters.