xod
-
Posts
632 -
Joined
-
Last visited
-
Days Won
20
Posts posted by xod
-
-
After I removed all files from Temp folder, when I open CodeLab I receive these error messages:
Could not load file or assembly '0 bytes loaded from System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Could not find file 'C:\Users\username\AppData\Local\Temp\ls0sg3ea.dll'.
Could not find file 'C:\Users\username\AppData\Local\Temp\leb3m401.dll'.
Could not find file 'C:\Users\username\AppData\Local\Temp\xuzqavj3.dll'.Paint.net works fine.
-
This image was extracted from a PDF document using Adobe Acrobat.
Note how small the title is displayed.
After changing the file name everything has returned to normal. -
ImageDistortion plugin can be found in Effects ► Distort.
To run this plugin you need the OptionBasedLibrary v0.7.9 dll and dlc files. Please read the readme.txt file from the zip archive.
MOD note: The readme.txt is out of date; the 2 OptionBasedLibrary files must now be put into the paint.net EFFECTS folder.
Download:
https://www.mediafire.com/file/j58ecxqiwxr7jhw/ImageDistortion.zip/file- 1
- 3
-
Thanks @welshblue.
I'm glad you find them useful. Impressive image!I also thank to @lynxster4 for the nice words and to @Seerose for the image.
Thanks all for the rep points.
-
The new version made with OptionBasedLibrary.- 4
- 1
-
Very nice plugin! Thanks.
First crash: Enter some data and click on Tuesday.
Exception details:
System.ArgumentException: Object must be of type Double.
at System.Double.CompareTo(Object value)
at System.Windows.Forms.DataGridViewRowCollection.RowComparer.CompareObjects(Object value1, Object value2, Int32 rowIndex1, Int32 rowIndex2)
at System.Windows.Forms.DataGridViewRowCollection.RowArrayList.Pivot(Int32 left, Int32 center, Int32 right)
at System.Windows.Forms.DataGridViewRowCollection.RowArrayList.CustomQuickSort(Int32 left, Int32 right)
at System.Windows.Forms.DataGridViewRowCollection.Sort(IComparer customComparer, Boolean ascending)
at System.Windows.Forms.DataGridView.SortInternal(IComparer comparer, DataGridViewColumn dataGridViewColumn, ListSortDirection direction)
at System.Windows.Forms.DataGridView.OnColumnHeaderMouseClick(DataGridViewCellMouseEventArgs e)
at System.Windows.Forms.DataGridView.OnMouseClick(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-
This 'ImageDistortion' plugin has been designed to be used with 'TextDistortion'.Can be found in the Effects ► Distort submenu.- 2
- 2
-
For first question:
For second question:
Use another layer and use solid color for drawing the same area.
But after selecting in the layer with the solid contour you have to move to the layer with the map and CTRL + C.
- 1
-
Try 'Distort This' plugin.
- 1
-
Another issue.
Try to run this code:
Spoiler// Name: test // Submenu: // Author: // Title: test // Version: // Desc: // Keywords: // URL: // Help: #region UICode PanSliderControl Amount1 = Pair.Create(1.000,1.000); // {Amount2} CheckboxControl Amount2 = false; // [0,1] Enable #endregion void Render(Surface dst, Surface src, Rectangle rect) { }
PDN crashes. It only works if parameters for Pair.Create is 0, 0 values: PairCreate(0.000, 0.000):
-
Wrong alignment for braces when I try to format document because the statement is in line with 'if' keyword.
Spoiler// Name: TextWarp // Submenu: // Author: xod // Title: TextWarp // Version: 1.0.0 // Desc: // Keywords: // URL: // Help: #region UICode MultiLineTextboxControl Amount1 = "Text Warp"; // [1,32767] FontFamily Amount2 = new FontFamily("Arial"); // Font IntSliderControl Amount3 = 50; // [3,800] Font size PanSliderControl Amount4 = Pair.Create(-1.000,-1.000); // PanSliderControl Amount5 = Pair.Create(1.000,-1.000); // PanSliderControl Amount6 = Pair.Create(-1.000,1.000); // PanSliderControl Amount7 = Pair.Create(1.000,1.000); // IntSliderControl Amount8 = 0; // [0,360] Rotate CheckboxControl Amount9 = false; // [0,1] Shape #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle sel = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); Color PrimaryColor = EnvironmentParameters.PrimaryColor; float x1 = (float)Math.Round((Amount4.First + 1) * sel.Width / 2); float y1 = (float)Math.Round((Amount4.Second + 1) * sel.Height / 2); float x2 = (float)Math.Round((Amount5.First + 1) * sel.Width / 2); float y2 = (float)Math.Round((Amount5.Second + 1) * sel.Height / 2); float x3 = (float)Math.Round((Amount6.First + 1) * sel.Width / 2); float y3 = (float)Math.Round((Amount6.Second + 1) * sel.Height / 2); float x4 = (float)Math.Round((Amount7.First + 1) * sel.Width / 2); float y4 = (float)Math.Round((Amount7.Second + 1) * sel.Height / 2); string text = Amount1; int font_size = Amount3; FontStyle font_style = FontStyle.Regular; dst.CopySurface(src, rect.Location, rect); using (RenderArgs ra = new RenderArgs(dst)) using (Pen pen = new Pen(PrimaryColor, 1)) using (GraphicsPath path = new GraphicsPath()) using (SolidBrush brush = new SolidBrush(PrimaryColor)) using (FontFamily font_family = new FontFamily(Amount2.Name)) using (Font font = new Font(font_family, font_size, font_style)) using (StringFormat string_format = new StringFormat()) { string_format.Alignment = StringAlignment.Near; string_format.LineAlignment = StringAlignment.Near; Graphics g = ra.Graphics; g.Clip = new Region(rect); g.SmoothingMode = SmoothingMode.AntiAlias; g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; // Create a rectangle. RectangleF srcRect = new RectangleF(0, 0, sel.Width, sel.Height); PointF p1 = new PointF(x1, y1); PointF p2 = new PointF(x2, y2); PointF p3 = new PointF(x3, y3); PointF p4 = new PointF(x4, y4); if(Amount9) path.AddRectangle(srcRect); path.AddString(text, font_family, (int)font_style, g.DpiY * font_size / 72, new PointF(0, 0), string_format); // Create a destination for the warped rectangle. PointF[] destPoints = {p1, p2, p3, p4}; // Create a translation matrix. Matrix matrix = new Matrix(); matrix.Translate(0, 0); if (Amount8 > 0) { // Move TopLeft corner to center of the canvas then rotate. matrix.Translate(sel.Width / 2, sel.Height / 2); matrix.Rotate(Amount8); } // Warp the source path. path.Warp(destPoints, srcRect, matrix, WarpMode.Perspective, 0.5f); // Draw the warped path to the screen. g.DrawPath(pen, path); if(!Amount9) g.FillPath(brush, path); }//Wrong alignment for braces when I try to format document //because the statement is in line with 'if' keyword }
-
OK, thanks for the answer.
-
Is it possible in CodeLab to have more validation conditions?
-
Thank you for yours hard work !
Very interesting behavior for Alt + Mouse click:
1. Choose Paintbrush tool: size = 10 (or any other size)
2. Press Alt key for locking the position of the brush
3. Release Alt key and move the mouse anywhere on the canvas
4. Left click to draw a straight line with the primary color or right click for secondary colorThis behavior also exists in the previous version.
This is very useful for me. All I need now is a grid and Snap to grid option.
-
Use the Alt + square brackets on the keyboard and repeated mouse clicks.
-
On 3/25/2019 at 7:37 PM, toe_head2001 said:
If your script is causing CodeLab to freeze, that's an issue.
Can you share the script with us, so we can investigate?
Spoiler// Name: Test // Author: // Submenu: // URL: // Title: #region UICode ListBoxControl Amount1 = 0; // Options|Move X, Y|Diagonals IntSliderControl Amount2 = 20; // [0,800] {Amount1} X IntSliderControl Amount3 = 20; // [0,800] {Amount1} Y IntSliderControl Amount4 = 20; // [0,800] {!Amount1} Step CheckboxControl Amount5 = false; // [0,1] {Amount1} Show coordinates #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); dst.CopySurface(src, rect.Location, rect); float selTop = selection.Top; float selBot = selection.Bottom; float selLeft = selection.Left; float selRight = selection.Right; int step = Amount4; float fontSize = selection.Right/100; using (RenderArgs ra = new RenderArgs(dst)) { Graphics gr = ra.Graphics; gr.Clip = new Region(rect); gr.SmoothingMode = SmoothingMode.AntiAlias; StringFormat format = new StringFormat(); using(Pen pen = new Pen(Color.Black,1)) using (Font txtFont = new Font("Tahoma", fontSize, FontStyle.Regular)) using (SolidBrush txtBrush = new SolidBrush(Color.Blue)) { switch(Amount1) { case 0: // Move Lines PointF left = new PointF(selLeft - 1f, selTop + Amount2); PointF rite = new PointF(selRight, selTop + Amount2); PointF top = new PointF(Amount3 + selLeft, selTop - 1f); PointF bot = new PointF(Amount3 + selLeft, selBot); gr.DrawLine(pen, top, bot); gr.DrawLine(pen, left, rite); if (Amount5) { txtBrush.Color = Color.Blue; format.Alignment = StringAlignment.Near; format.LineAlignment = StringAlignment.Far; gr.DrawString(Amount2.ToString(), txtFont, txtBrush, selLeft, selTop + Amount2, format); txtBrush.Color = Color.Red; format.Alignment = StringAlignment.Far; format.LineAlignment = StringAlignment.Center; gr.DrawString(Amount3.ToString(), txtFont, txtBrush, selLeft + Amount3, selTop + fontSize, format); } break; case 1: // Diagonals for (int i = 1; i < selRight; i+=step) // if step (Amount4) = 0 CodeLab freezes. Logic Amount4 must be > 0. [1,800] { PointF topleft = new PointF(selLeft, selTop - i + 1f); PointF botrite = new PointF(selRight + i - 1f, selBot); gr.DrawLine(pen, topleft, botrite); PointF topleft2 = new PointF(selLeft - i + 1f, selTop); PointF botrite2 = new PointF(selRight, selBot + i - 1f ); gr.DrawLine(pen, topleft2, botrite2); } break; } } } }
-
Thank you BB.
There is a plugin called Color Harmonies.
Is it different from what you offer us? -
If I run older scripts in Single Render Call or Legacy ROI mode, CodeLab freezes and I'm forced to close Paint.Net from Task Manager.
Edit:
Sorry, there was something wrong with my script.
CodeLab works perfectly. -
1 hour ago, BoltBait said:
Easy. Do you really use it that often?
Yes, I use it very often. But I think I could get used to the CTRL + Q combination.
Now, CodeLab became very confuse for me. What version I need to use?
-
Thanks for your hard work.
Is there any chance to Format Document and Find/Replace icons to be added to the toolbar?
-
Yes, you're right.
Here is the new MoveLinesOB plugin made with OptionBasedLibrary which has no issue.
All you need is in the Dependency folder.
http://www.mediafire.com/file/ugv34d6ekgdjop3/MoveLinesEffectOB.zip/file
-
It seems that OptionBasedLibrary does not have this issue.
My RoundedRectangle plugin runs OK on new large canvas sizes.https://forums.getpaint.net/topic/111330-unfinished-plugins/page/6/?tab=comments#comment-551743
-
Yes, I'm using PDN 4.1.6 beta version.
-
Ok, I understand, thanks for the answer.
CodeLab v6.12 for Paint.NET 5.0.12 (Updated February 11, 2024)
in Plugins - Publishing ONLY!
Posted
Very strange, sometimes it works, sometimes when I open another file in tab the error returns.