Jump to content

BoltBait

Administrator
  • Posts

    15,728
  • Joined

  • Last visited

  • Days Won

    405

Everything posted by BoltBait

  1. Is the directory C:\Program Files\Paint.NET\Effects there and not corrupt? How about C:\Program Files\Paint.NET\FileTypes ? If you run REGEDIT and look under the key: HKEY_CURRENT_USER\SOFTWARE\Paint.NET for entries labeled: File/MostRecent/Path0 File/MostRecent/Path1 File/MostRecent/Path2 File/MostRecent/Path3 File/MostRecent/Path4 File/MostRecent/Path5 File/MostRecent/Path6 File/MostRecent/Path7 etc. Do any of those entries point to a directory that doesn't exist, or to a directory that is corrupt?
  2. Remake, why not just calculate your Alpha value and then choose the smaller between your calculated alpha value and the original pixel alpha value?
  3. Nope. This is a bug in how the shape is designed. The reason this works is that the way you originally designed the shape, the renderer doesn't know that the curve should attach to the first point. The Z causes the curve shape to attach to the line shape. Now that the renderer knows the shapes are attached the proper connection is drawn. TR's solution also works as well. By drawing your shape starting at the bottom point it forces the curve and line to be joined. Of course, then the tip won't be drawn correctly unless you add a Z again.
  4. You can fix it by putting a Z at the end of the shape. <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Canvas Width="1000"> <Path Width="800" Height="600" Canvas.Left="0" Canvas.Top="0" Data="M 10,10 L 250,490,490,10 Q 250,230,10,10 Z" StrokeThickness ="3" Fill ="#FF999999" Stroke="#FF000000" Stretch=" None"/> </Canvas> </Page>
  5. You don't need to select anything, just use this plugin: http://forums.getpaint.net/index.php?showtopic=5578
  6. In additional to my shape pack: Which you can download here: https://boltbait.com/pdn/InstallingShapes.php Here is a Push Pin: <ps:SimpleGeometryShape xmlns="clr-namespace:PaintDotNet.UI.Media;assembly=PaintDotNet.Framework" xmlns:ps="clr-namespace:PaintDotNet.Shapes;assembly=PaintDotNet.Framework" DisplayName="Push Pin"> <PathGeometry FillRule="Nonzero"> <PathFigure IsClosed="True" IsFilled="True" StartPoint="235,23"> <BezierSegment Point1="289,0" Point2="437,55" Point3="414,149" /> <BezierSegment Point1="401,230" Point2="291,227" Point3="232,194" /> <BezierSegment Point1="163,160" Point2="140,56" Point3="235,23" /> </PathFigure> <PathFigure IsClosed="False" IsFilled="False" StartPoint="193,163"> <BezierSegment Point1="192.78,178.79" Point2="178.78,202.29" Point3="165,210" /> <BezierSegment Point1="152,235" Point2="178,292" Point3="234,292" /> </PathFigure> <PathFigure IsClosed="False" IsFilled="False" StartPoint="332,216"> <BezierSegment Point1="315,229" Point2="307,248" Point3="308,271" /> </PathFigure> <PathFigure IsClosed="False" IsFilled="True" StartPoint="331,215"> <LineSegment Point="319,230" /> <BezierSegment Point1="363,260" Point2="367,365" Point3="269,390" /> <BezierSegment Point1="194,398" Point2="142,378" Point3="99,318" /> <BezierSegment Point1="61,257" Point2="104,177" Point3="190,175" /> <LineSegment Point="193,164" /> </PathFigure> <PathFigure IsClosed="False" IsFilled="False" StartPoint="158,373"> <LineSegment Point="116,463" /> <BezierSegment Point1="113,477" Point2="135,487" Point3="150,477" /> <LineSegment Point="193,387" /> </PathFigure> </PathGeometry> </ps:SimpleGeometryShape> Enjoy. EDIT: Here are some right angle shapes that were requested... RightAngle.zip EDIT: I needed some new shapes for work: NewShapes.zip Here is a 3D star: <ps:SimpleGeometryShape xmlns="clr-namespace:PaintDotNet.UI.Media;assembly=PaintDotNet.Framework" xmlns:ps="clr-namespace:PaintDotNet.Shapes;assembly=PaintDotNet.Framework" DisplayName="3D Star"> <PathGeometry FillRule="Nonzero"> <PathFigure IsClosed="True" IsFilled="True" StartPoint="400,300"> <LineSegment Point="400,30" IsSmoothJoin="True" /> <LineSegment Point="461,217" IsSmoothJoin="True" /> <LineSegment Point="400,300" IsSmoothJoin="True" /> </PathFigure> <PathFigure IsClosed="True" IsFilled="True" StartPoint="400,300"> <LineSegment Point="655,219" IsSmoothJoin="True" /> <LineSegment Point="499,333" IsSmoothJoin="True" /> <LineSegment Point="400,300" IsSmoothJoin="True" /> </PathFigure> <PathFigure IsClosed="True" IsFilled="True" StartPoint="400,300"> <LineSegment Point="599,520" IsSmoothJoin="True" /> <LineSegment Point="400,405" IsSmoothJoin="True" /> <LineSegment Point="400,300" IsSmoothJoin="True" /> </PathFigure> <PathFigure IsClosed="True" IsFilled="True" StartPoint="400,300"> <LineSegment Point="241,520" IsSmoothJoin="True" /> <LineSegment Point="302,333" IsSmoothJoin="True" /> <LineSegment Point="400,300" IsSmoothJoin="True" /> </PathFigure> <PathFigure IsClosed="True" IsFilled="True" StartPoint="400,300"> <LineSegment Point="143,217" IsSmoothJoin="True" /> <LineSegment Point="340,217" IsSmoothJoin="True" /> <LineSegment Point="400,300" IsSmoothJoin="True" /> </PathFigure> <PathFigure IsClosed="True" IsFilled="False" StartPoint="400,30"> <LineSegment Point="461,217" /> <LineSegment Point="655,219" /> <LineSegment Point="499,333" /> <LineSegment Point="599,520" /> <LineSegment Point="400,405" /> <LineSegment Point="241,520" /> <LineSegment Point="302,333" /> <LineSegment Point="141,217" /> <LineSegment Point="340,217" /> <LineSegment Point="400,30" /> </PathFigure> </PathGeometry> </ps:SimpleGeometryShape> EDIT: Another shape, called: 100 Point Sticker <ps:SimpleGeometryShape xmlns="clr-namespace:PaintDotNet.UI.Media;assembly=PaintDotNet.Framework" xmlns:ps="clr-namespace:PaintDotNet.Shapes;assembly=PaintDotNet.Framework" DisplayName="Sticker" Geometry="F1 M 272.4613,-17.1418 L 258.8461,-24.4682 L 270.8473,-34.216 L 256.799,-40.673 L 268.1644,-51.1551 L 253.7384,-56.7172 L 264.4232,-67.8923 L 249.6764,-72.5377 L 259.6384,-84.3616 L 244.629,-88.0719 L 253.829,-100.498 L 238.6162,-103.2585 L 247.0178,-116.2377 L 231.6617,-118.0375 L 239.2317,-131.5188 L 223.7929,-132.3508 L 230.5015,-146.2807 L 215.0409,-146.1417 L 220.8616,-160.4654 L 205.4403,-159.3558 L 210.3501,-174.0167 L 195.0289,-171.9411 L 199.0084,-186.8814 L 183.8478,-183.8478 L 186.8814,-199.0084 L 171.9411,-195.0289 L 174.0167,-210.3501 L 159.3558,-205.4403 L 160.4654,-220.8616 L 146.1417,-215.0409 L 146.2807,-230.5015 L 132.3508,-223.7929 L 131.5188,-239.2317 L 118.0375,-231.6617 L 116.2377,-247.0178 L 103.2585,-238.6162 L 100.498,-253.829 L 88.0719,-244.629 L 84.3616,-259.6384 L 72.5377,-249.6764 L 67.8923,-264.4232 L 56.7172,-253.7384 L 51.1551,-268.1644 L 40.673,-256.799 L 34.216,-270.8473 L 24.4682,-258.8461 L 17.1418,-272.4613 L 8.1668,-259.8717 L 0,-273 L -8.1668,-259.8717 L -17.1418,-272.4613 L -24.4682,-258.8461 L -34.216,-270.8473 L -40.673,-256.799 L -51.1551,-268.1644 L -56.7172,-253.7384 L -67.8923,-264.4232 L -72.5377,-249.6764 L -84.3616,-259.6384 L -88.0719,-244.629 L -100.498,-253.829 L -103.2585,-238.6162 L -116.2377,-247.0178 L -118.0375,-231.6617 L -131.5188,-239.2317 L -132.3508,-223.7929 L -146.2807,-230.5015 L -146.1417,-215.0409 L -160.4654,-220.8616 L -159.3558,-205.4403 L -174.0167,-210.3501 L -171.9411,-195.0289 L -186.8814,-199.0084 L -183.8478,-183.8478 L -199.0084,-186.8814 L -195.0289,-171.9411 L -210.3501,-174.0167 L -205.4403,-159.3558 L -220.8616,-160.4654 L -215.0409,-146.1417 L -230.5015,-146.2807 L -223.7929,-132.3508 L -239.2317,-131.5188 L -231.6617,-118.0375 L -247.0178,-116.2377 L -238.6162,-103.2585 L -253.829,-100.498 L -244.629,-88.0719 L -259.6384,-84.3616 L -249.6764,-72.5377 L -264.4232,-67.8923 L -253.7384,-56.7172 L -268.1644,-51.1551 L -256.799,-40.673 L -270.8473,-34.216 L -258.8461,-24.4682 L -272.4613,-17.1418 L -259.8717,-8.1668 L -273,0 L -259.8717,8.1668 L -272.4613,17.1418 L -258.8461,24.4682 L -270.8473,34.216 L -256.799,40.673 L -268.1644,51.1551 L -253.7384,56.7172 L -264.4232,67.8923 L -249.6764,72.5377 L -259.6384,84.3616 L -244.629,88.0719 L -253.829,100.498 L -238.6162,103.2585 L -247.0178,116.2377 L -231.6617,118.0375 L -239.2317,131.5188 L -223.7929,132.3508 L -230.5015,146.2807 L -215.0409,146.1417 L -220.8616,160.4654 L -205.4403,159.3558 L -210.3501,174.0167 L -195.0289,171.9411 L -199.0084,186.8814 L -183.8478,183.8478 L -186.8814,199.0084 L -171.9411,195.0289 L -174.0167,210.3501 L -159.3558,205.4403 L -160.4654,220.8616 L -146.1417,215.0409 L -146.2807,230.5015 L -132.3508,223.7929 L -131.5188,239.2317 L -118.0375,231.6617 L -116.2377,247.0178 L -103.2585,238.6162 L -100.498,253.829 L -88.0719,244.629 L -84.3616,259.6384 L -72.5377,249.6764 L -67.8923,264.4232 L -56.7172,253.7384 L -51.1551,268.1644 L -40.673,256.799 L -34.216,270.8473 L -24.4682,258.8461 L -17.1418,272.4613 L -8.1668,259.8717 L 0,273 L 8.1668,259.8717 L 17.1418,272.4613 L 24.4682,258.8461 L 34.216,270.8473 L 40.673,256.799 L 51.1551,268.1644 L 56.7172,253.7384 L 67.8923,264.4232 L 72.5377,249.6764 L 84.3616,259.6384 L 88.0719,244.629 L 100.498,253.829 L 103.2585,238.6162 L 116.2377,247.0178 L 118.0375,231.6617 L 131.5188,239.2317 L 132.3508,223.7929 L 146.2807,230.5015 L 146.1417,215.0409 L 160.4654,220.8616 L 159.3558,205.4403 L 174.0167,210.3501 L 171.9411,195.0289 L 186.8814,199.0084 L 183.8478,183.8478 L 199.0084,186.8814 L 195.0289,171.9411 L 210.3501,174.0167 L 205.4403,159.3558 L 220.8616,160.4654 L 215.0409,146.1417 L 230.5015,146.2807 L 223.7929,132.3508 L 239.2317,131.5188 L 231.6617,118.0375 L 247.0178,116.2377 L 238.6162,103.2585 L 253.829,100.498 L 244.629,88.0719 L 259.6384,84.3616 L 249.6764,72.5377 L 264.4232,67.8923 L 253.7384,56.7172 L 268.1644,51.1551 L 256.799,40.673 L 270.8473,34.216 L 258.8461,24.4682 L 272.4613,17.1418 L 259.8717,8.1668 L 273,0 L 259.8717,-8.1668 Z" /> Note: The points were calculated mathematically using a spreadsheet. How to install shapes: http://www.boltbait.com/pdn/InstallingShapes.php
  7. Yes, you can download paint.net updates directly from the web site: http://www.dotpdn.com/downloads/pdn.html You won't lose any plugins in the update process. HOWEVER, when updating paint.net, it would be a good idea to see if there are any updated plugins on the forums. For example, my plugin pack was updated specifically for paint.net 4.0.6 and after installing that update you can now download and install custom shapes.
  8. http://forums.getpaint.net/index.php?/topic/2932-read-first-the-rules-yes-you-read-this-2010-3-15/#6
  9. You should have stopped right there. When I put my shape pack together, I went out of my way to make my shapes as simple as possible so they would appeal to the widest range of people.
  10. dst.CopySurface(src,rect.Location,rect);This code simply copies all pixels from the source canvas to the destination canvas. Remember, as a plugin author, you are responsible for writing to all of the pixels on the destination canvas. Since we won't be changing the pixels, I just did a quick copy. // Force Single ThreadedThis code forces the compiled DLL to be single threaded. Normally comments are ignored by a compiler and therefore have no effect on the compiled code. CodeLab is a little different. It uses the content of a few comments to change what is compiled for when code is compiled to a DLL. "Single Threaded" means that the Render function will be called one at a time to process the selection instead of lots of threads calling Render all at the same time. Because this is done in a single thread, you'll be sure that the output file is only ever opened by one thread at a time. When an effect is in CodeLab itself, it is running multithreaded. Only the compiled DLL is forced to be single threaded. Yes, you can use CodeLab to compile the effect. Just ignore the run errors while compiling it.
  11. Build this file to a DLL and install it in Paint.NET. It will not work in CodeLab, it must be built as a DLL in order to work. // Name: Junk // Force Single Threaded #region UICode #endregion void Render(Surface dst, Surface src, Rectangle rect) { dst.CopySurface(src,rect.Location,rect); string OutputFile = @"C:\Users\CTCPublic\Desktop\geb\CoolEdit.txt"; StreamWriter SW=File.AppendText(OutputFile); for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) { SW.Close(); return; } for (int x = rect.Left; x < rect.Right; x++) { ColorBgra CurrentPixel = src[x,y]; int R = CurrentPixel.R; int G = CurrentPixel.G; int B = CurrentPixel.B; int A = CurrentPixel.A; HsvColor hsv = HsvColor.FromColor(CurrentPixel.ToColor()); int H = hsv.Hue; int S = hsv.Saturation; int V = hsv.Value; if (R == 100) { SW.WriteLine("R:" + R + ",G:" + G + ",B:" + B + " | H:" + H + ",S:" + S + ",V:" + V + " | coords=V:" + y + ",H:" + x); } } } SW.Close(); } Remember to delete CoolEdit.txt before running the effect otherwise you might get duplicates as the second run will append to the existing file.
  12. Here is another scenario for you: 1000x1000 image, run the effect at 800. Resize the image to 100x100, press Ctrl-F to repeat your effect. And another: Open 2 images, 1000x1000 and 100x100. Select the large image and run your effect at 800. Switch to the smaller image and run your effect again.
  13. Seems like an experiment you could try in just a few minutes.
  14. My dream plugin uses a Gaussian blur to create a dream like picture. The thing I never liked was the fact that the default blur level (10) looks great on 800x600 pictures but you can't really see the effect on my camera's pictures 2560x1920. I solved it by having a different default based on the picture size: protected override PropertyCollection OnCreatePropertyCollection() { List<Property> props = new List<Property>(); if (EnvironmentParameters.SourceSurface.Width < 1000) { props.Add(new Int32Property(PropertyNames.Amount1, 10, 0, 100)); } else { props.Add(new Int32Property(PropertyNames.Amount1, 50, 0, 100)); } return new PropertyCollection(props); }And, you're right, CodeLab can't do something like this.
  15. How about typing your text on its own layer and then using the Layer > Flip Horizontal command?
  16. Your algorithm is backwards. When looping though the y (rows) and x (columns) you should be calculating the destination pixel for that x,y address. You might want to review: http://boltbait.com/pdn/CodeLab/help/overview.asp
  17. MJW, I could code up something like what you want, but it wouldn't work when inside of CodeLab. The problem is that when tinkering with a CodeLab script from within CodeLab it doesn't have a UI and therefore the OnSetRenderInfo method never gets called. EDIT: I suppose I could hack something together, I'll think about it... EDITEDIT: Looking around inside of the CodeLab source, I just noticed a bug in the "using" statement handling code. EDITEDITEDIT: Bah! I tried some things and couldn't get anything to work.
  18. This will only work if your scanner has a WIA driver. If your scanner is TWAIN compatible, try this plugin: http://forums.getpaint.net/index.php?showtopic=28153
  19. Remake, that can be fixed by replacing: MessageBox.Show("You can not use the font '" + this.Amount4.Name + "'.\n\nPlease choose a different font.", "Font Error"); With: Form.ActiveForm.Invoke(new Action(delegate() { MessageBox.Show("You can not use the font '" + this.Amount4.Name + "'.\n\nPlease choose a different font.", "Font Error"); }));
  20. Try these: http://forums.getpaint.net/index.php?/topic/692-install-update-or-uninstall-trouble-read-this/?p=326988
  21. I use Visual Studio 2015 Community Edition for all of my development (including CodeLab).
×
×
  • Create New...