Seerose Posted September 12, 2019 Share Posted September 12, 2019 @xod! I have Windows 7 and it doesn't work for me. Because I have another "Aligin" plugin. Is that why you think? Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
xod Posted September 12, 2019 Author Share Posted September 12, 2019 @Seerose, to answer you I need more information. Be more specific. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted September 13, 2019 Share Posted September 13, 2019 The original post was named Align.Zip which opened to reveal align.dll On 12/8/2017 at 12:44 PM, xod said: This is my finished Align plugin. I will not post it on the Plugins - Publishing ONLY! thread because there is already Kris Vandermotten's, which is extremely fast even on very large canvases. Thank you very much to MJW who helped me a lot. I learned a lot from him. The UI: And here is the dll file: ► Align.zip ◄ Your latest post may have the label Align# in the code, but the DLL file is still named align.zip which opens to Align.DLL and overwrites the old one when placed in the effects folder. Hope this clarifies for @Seerose Quote Link to comment Share on other sites More sharing options...
lynxster4 Posted September 13, 2019 Share Posted September 13, 2019 10 hours ago, AndrewDavid said: Your latest post may have the label Align# in the code, but the DLL file is still named align.zip which opens to Align.DLL and overwrites the old one when placed in the effects folder. That's the problem. The dll file needs to be named 'Align+' so it doesn't overwrite the other one. 1 Quote My Art Gallery | My Shape Packs | ShapeMaker Mini Tut | Air Bubble Stained Glass Chrome Text with Reflections | Porcelain Text w/ Variegated Coloring | Realistic Knit PatternOpalescent Stained Glass | Frosted Snowman Cookie | Leather Texture | Plastic Text | Silk Embroidery Visit my Personal Website "Never, ever lose your sense of humor - you'll live longer" Link to comment Share on other sites More sharing options...
Seerose Posted September 13, 2019 Share Posted September 13, 2019 @xod! 3 hours ago, lynxster4 said: That's the problem. The dll file needs to be named 'Align+' so it doesn't overwrite the other one. I think that's the problem. as @lynxster4 says! Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
xod Posted September 13, 2019 Author Share Posted September 13, 2019 Okay, I understand that people don't really use the official version (Align Object) because it's in the Object submenu. So, I changed the name of the .dll 1 Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted September 14, 2019 Share Posted September 14, 2019 (edited) 1296931056_Align.zip is what your change created. Windows The Forum software may not like the "+" in file names. Edited September 14, 2019 by AndrewDavid Strikeout Windows 1 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted September 14, 2019 Share Posted September 14, 2019 xod-align.dll? Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Reptillian Posted September 14, 2019 Share Posted September 14, 2019 xod-align-plus.dll? Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
lynxster4 Posted September 14, 2019 Share Posted September 14, 2019 A .dll will accept the 'plus' (+) sign. Look in your Effects folder and see how many you have. @MJW, @ReMake, @pyrochild and more have used a plus sign. Quote My Art Gallery | My Shape Packs | ShapeMaker Mini Tut | Air Bubble Stained Glass Chrome Text with Reflections | Porcelain Text w/ Variegated Coloring | Realistic Knit PatternOpalescent Stained Glass | Frosted Snowman Cookie | Leather Texture | Plastic Text | Silk Embroidery Visit my Personal Website "Never, ever lose your sense of humor - you'll live longer" Link to comment Share on other sites More sharing options...
Seerose Posted September 14, 2019 Share Posted September 14, 2019 @xod! Thank you very much. It's all right now. Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
lynxster4 Posted September 14, 2019 Share Posted September 14, 2019 Thank you for renaming @xod! Quote My Art Gallery | My Shape Packs | ShapeMaker Mini Tut | Air Bubble Stained Glass Chrome Text with Reflections | Porcelain Text w/ Variegated Coloring | Realistic Knit PatternOpalescent Stained Glass | Frosted Snowman Cookie | Leather Texture | Plastic Text | Silk Embroidery Visit my Personal Website "Never, ever lose your sense of humor - you'll live longer" Link to comment Share on other sites More sharing options...
xod Posted September 23, 2019 Author Share Posted September 23, 2019 I updated the Align + plugin. See the first post. The code below does not belong to me, I just adapted it for PDN. Spoiler // Name: ShapesPattern // Submenu: Render // Author: Rod Stephens // Title: ShapesPattern // Version: 1.0 // Desc: // Keywords: // URL: // Help: #region UICode IntSliderControl Amount1 = 20; // [3,20] Shape sides DoubleSliderControl Amount2 = 90; // [0,200] Offset IntSliderControl Amount3 = 1; // [0,5] Repeat shape DoubleSliderControl Amount4 = 1; // [0.05,10] Shape size AngleControl Amount5 = 90; // [-180,180] Rotate ColorWheelControl Amount6 = ColorBgra.FromBgra(0,0,255,64); // [Red?] Color IntSliderControl Amount7 = 1; // [0,10] Outline thickness CheckboxControl Amount8 = false; // [0,1] Clear background CheckboxControl Amount9 = false; // [0,1] Fill polygons (Decrease Alpha slider) #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); dst.CopySurface(src,rect.Location,rect); int CenterX = ((selection.Right - selection.Left) / 2) + selection.Left; int CenterY = ((selection.Bottom - selection.Top) / 2) + selection.Top; using (Graphics g = new RenderArgs(dst).Graphics) using (Region gClipRegion = new Region(rect)) using (SolidBrush brush = new SolidBrush(Amount6)) using (Pen pen = new Pen(Amount6, (float)Amount7)) { g.Clip = gClipRegion; g.SmoothingMode = SmoothingMode.AntiAlias; if(Amount8) g.Clear(Color.Transparent); PointF center = new PointF(CenterX, CenterY); float radius = Math.Min(CenterX, CenterY) * (float)Amount4; DrawShape(Amount3, g, brush, pen, center, radius); //g.DrawEllipse(Pens.Blue, CenterX - radius, CenterY - radius, 2 * radius, 2 * radius); } } // Draw the shape. private void DrawShape(int Amount3, Graphics g, SolidBrush brush, Pen pen, PointF center, float radius) { float scale = (float)(1.0 / (2.0 * (1 + Math.Cos(Math.PI/180 * Amount2)))); // If we are done recursing, draw the shape. if (Amount3 <= 0) { // Find the shape's corners. PointF[] points = GetShapePoints(center, radius); if(Amount9){g.FillPolygon(brush, points);} if(Amount7 > 0) {g.DrawPolygon(pen, points);} } else { // Find the smaller shape's centers. float d = radius - radius * scale; PointF[] centers = GetShapePoints(center, d); // Recursively draw the smaller shapes. foreach (PointF point in centers) { DrawShape(Amount3 - 1, g, brush, pen, point, radius * scale); } } } // Find the shape's corners. private PointF[] GetShapePoints(PointF center, float radius) { PointF[] points = new PointF[Amount1]; double theta = -Math.PI / 2 * Math.PI / 180 * Amount5 / Math.PI * 2; double dtheta = 2.0 * Math.PI / Amount1; for (int i = 0; i < Amount1; i++) { points[i] = new PointF( center.X + (float)(radius * Math.Cos(theta)), center.Y + (float)(radius * Math.Sin(theta))); theta += dtheta; } return points; } 3 Quote Link to comment Share on other sites More sharing options...
lynxster4 Posted September 23, 2019 Share Posted September 23, 2019 Thank you @xod for updating Align+! The code you posted brings very interesting results. Thank you for adapting it! A lot of things can be done with this. 3 Quote My Art Gallery | My Shape Packs | ShapeMaker Mini Tut | Air Bubble Stained Glass Chrome Text with Reflections | Porcelain Text w/ Variegated Coloring | Realistic Knit PatternOpalescent Stained Glass | Frosted Snowman Cookie | Leather Texture | Plastic Text | Silk Embroidery Visit my Personal Website "Never, ever lose your sense of humor - you'll live longer" Link to comment Share on other sites More sharing options...
Seerose Posted September 24, 2019 Share Posted September 24, 2019 @xod! Thank you so much for the new version. Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
Seerose Posted September 24, 2019 Share Posted September 24, 2019 @lynxster4! 👍 What a magnificent colors! Thank you for sharing your result! Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
xod Posted October 11, 2019 Author Share Posted October 11, 2019 The code below provides information about the object on the canvas. It seems to work correctly in all situations where the object is on a transparent layer and even if the layer is full of color. However, if I have an filled area of 10000x7500px and even for smaller values of the surface containing a transparent vertical strip as in the image below, the error 'A new guard page for the stack cannot be created' appears and Pdn crashes. I can't figure out how to solve this. Spoiler // Name: MeasureTheObject // Submenu: // Author: // Title: MeasureTheObject // Version: // Desc: // Keywords: // URL: // Help: #region UICode ColorWheelControl Amount1 = ColorBgra.FromBgr(0,0,0); // [PrimaryColor!] Font color DoubleSliderControl Amount2 = 0.75; // [0.1,5] Font scale CheckboxControl Amount3 = false; // [0,1] Bounding box of object #endregion private PdnRegion _measureObject; public int x, y, x1, xp1, xp2, yp1, yp2, y1, x2, y2, cx, cy, xPos, yPos, newx, newy, sTop, sBot, sLeft, sRite, width, height, _canvasWidth, _canvasHeight; void Render(Surface dst, Surface src, Rectangle rect) { Rectangle sel = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); Size selSize = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt().Size; _canvasWidth = selSize.Width; _canvasHeight = selSize.Height; sTop = sel.Top; sBot = sel.Bottom; sLeft = sel.Left; sRite = sel.Right; int fontH = (int)(Amount2 * sel.Height/50); int fontHoffset = fontH + fontH/2; GetMeasureOfObject(); Rectangle obj = _measureObject.GetBoundsInt(); x1 = obj.Left; y1 = obj.Top; x2 = obj.Right - 1; y2 = obj.Bottom - 1; width = obj.Width; height = obj.Height; Point topLeftCorner = new Point (x1, y1); Point topRiteCorner = new Point (x2, y1); Point botLeftCorner = new Point (x1, y2); Point botRiteCorner = new Point (x2, y2); int cx = x1 + width/2; int cy = y1 + height/2; dst.CopySurface(src, rect.Location,rect); using (Font txtFont = new Font("Tahoma", fontH, FontStyle.Regular)) using (SolidBrush txtBrush = new SolidBrush(Amount1)) using (SolidBrush fillBrush = new SolidBrush(Color.FromArgb(64,255,0,0))) using (Pen pen = new Pen(Color.Red, 1)) using (RenderArgs ra = new RenderArgs(dst)) { Graphics g = ra.Graphics; g.Clip = new Region(rect); g.SmoothingMode = SmoothingMode.AntiAlias; g.TextRenderingHint = TextRenderingHint.AntiAlias; StringFormat format = new StringFormat(); format.Alignment = StringAlignment.Near; format.LineAlignment = StringAlignment.Near; if(width == 0 || height == 0) { g.DrawString("Empty layer. There is no object.", txtFont, txtBrush, topLeftCorner, format); } else if(width == _canvasWidth && height == _canvasHeight) { g.DrawString("The object has the size of the layer.", txtFont, txtBrush, topLeftCorner, format); } else { //topleft corner format.Alignment = StringAlignment.Near; format.LineAlignment = StringAlignment.Near; g.DrawString("x:" + x1.ToString(), txtFont, txtBrush, topLeftCorner, format); g.DrawString("y:" + y1.ToString(), txtFont, txtBrush, x1, y1 + fontHoffset, format); //top right corner format.Alignment = StringAlignment.Far; format.LineAlignment = StringAlignment.Near; g.DrawString("x:" + x2.ToString(), txtFont, txtBrush, topRiteCorner, format); g.DrawString("y:" + y1.ToString(), txtFont, txtBrush, x2, y1 + fontHoffset, format); //bottom right corner format.Alignment = StringAlignment.Far; format.LineAlignment = StringAlignment.Far; g.DrawString("x:" + x2.ToString(), txtFont, txtBrush, x2, y2 - fontHoffset, format); g.DrawString("y:" + y2 .ToString(), txtFont, txtBrush, botRiteCorner, format); //bottom left corner format.Alignment = StringAlignment.Near; format.LineAlignment = StringAlignment.Far; g.DrawString("x:" + x1.ToString(), txtFont, txtBrush, x1, y2 - fontHoffset, format); g.DrawString("y:" + y2.ToString(), txtFont, txtBrush, botLeftCorner, format); //width and height format.Alignment = StringAlignment.Center; format.LineAlignment = StringAlignment.Center; g.DrawString("width:" + width.ToString() + "px", txtFont, txtBrush, cx, cy, format); g.DrawString("height:" + height.ToString() + "px", txtFont, txtBrush, cx, cy + fontHoffset, format); if(Amount3) { //g.DrawRectangle (pen, x1, y1, width, height); g.FillRectangle(fillBrush, x1, y1, width, height); } } } } private void GetMeasureOfObject() { if (_measureObject == null) { Surface src = EnvironmentParameters.SourceSurface; Rectangle sel = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); int left = sel.Left; int right = sel.Right; int top = sel.Top; int bottom = sel.Bottom; _measureObject = new PdnRegion(Rectangle.Empty); for (int y = top; y < bottom; y++) { for (int x = left; x < right; x++) { if (src[x, y].A > 0) { int xinit = x; do { x++; } while (x < right && src[x, y].A > 0); _measureObject.Union(new Rectangle(xinit, y, x - xinit, 1)); } } } } } Quote Link to comment Share on other sites More sharing options...
xod Posted November 16, 2019 Author Share Posted November 16, 2019 (edited) This plugin allows you to write text along a curve. There are only four control points. The plugin is located in Effects -> Text Formations. As usual, you need the two OptionBasedLibrary v0.7.9.dlc and OptionBasedLibrary v0.7.9.dll files. Download Edited November 20, 2019 by xod Replaced with a new version. Added more options. 4 1 Quote Link to comment Share on other sites More sharing options...
Eli Posted November 17, 2019 Share Posted November 17, 2019 @xod Thanks! This effect is a great addition to the text tools. I am dreaming of other paths such as waves or an ellipse. Spoiler Quote Link to comment Share on other sites More sharing options...
Seerose Posted November 17, 2019 Share Posted November 17, 2019 1 1 Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
lynxster4 Posted November 17, 2019 Share Posted November 17, 2019 @xod you need to get a plugin pack together! I'm counting over 20 plugins. Why leave some of these excellent plugins in the 'Unfinished Plugins' thread?? 2 Quote My Art Gallery | My Shape Packs | ShapeMaker Mini Tut | Air Bubble Stained Glass Chrome Text with Reflections | Porcelain Text w/ Variegated Coloring | Realistic Knit PatternOpalescent Stained Glass | Frosted Snowman Cookie | Leather Texture | Plastic Text | Silk Embroidery Visit my Personal Website "Never, ever lose your sense of humor - you'll live longer" Link to comment Share on other sites More sharing options...
xod Posted November 17, 2019 Author Share Posted November 17, 2019 Thank you all. I have posted a new version with several options. 3 Quote Link to comment Share on other sites More sharing options...
Seerose Posted November 18, 2019 Share Posted November 18, 2019 @xod! Thank you so much for the new version. Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
Pixey Posted November 18, 2019 Share Posted November 18, 2019 Thank you @xod 1 Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
Seerose Posted November 19, 2019 Share Posted November 19, 2019 1 Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.