Rick Brewster

paint.net 4.1.7 alpha build 7107

Recommended Posts

Okay so hopefully this is the last alpha build before I'm able to get a beta out the door (incl. updated translations). Just fixing up a few things that were important enough to fix quickly instead of waiting for the beta.

 

Download link: https://www.getpaint.net/files/zip/test/paint.net.4.107.7107.34783.install.zip

NoteGive me a few minutes and this will also be available via the built-in updater.

 

Changes since build 7104:

 

  • Improved: TGA images now load about 4x faster (thanks @null54!)
  • Fixed: Clipboard extension methods now available for plugins to use
  • Fixed a crash at startup when loading some FileType plugins
  • Improved: Slightly increased the size of the Settings dialog to reduce the need for scrolling in a few important situations
  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites

Here is an example of how the new IClipboardService can be used, this example is from the updated CodeLab template.

 

Spoiler

		

		private Surface clipboardSurface = null;
		private bool readClipboard = false;		

		protected override void OnDispose(bool disposing)
		{
		    if (disposing)
		    {
		        // Release any surfaces or effects you've created.
		        if (clipboardSurface != null) clipboardSurface.Dispose();
		        clipboardSurface = null;
		    }		

		    base.OnDispose(disposing);
		}		

		void PreRender(Surface dst, Surface src)
		{
		    if (!readClipboard)
		    {
		        readClipboard = true;
		        clipboardSurface = Services.GetService<IClipboardService>().TryGetSurface();
		    }
		}		

		// Here is the main render loop function
		void Render(Surface dst, Surface src, Rectangle rect)
		{
		    for (int y = rect.Top; y < rect.Bottom; y++)
		    {
		        if (IsCancelRequested) return;
		        for (int x = rect.Left; x < rect.Right; x++)
		        {
		            ColorBgra CurrentPixel = src[x,y];
		            if (IsCancelRequested) return;
		            // If clipboard has an image, get it
		            if (clipboardSurface != null)
		            {
		                CurrentPixel = clipboardSurface.GetBilinearSampleWrapped(x, y);
		            }		

		            // TODO: Add additional pixel processing code here		

		 		

		            dst[x,y] = CurrentPixel;
		        }
		    }
		}		

  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites

Well then that's a problem with Custom Mini Brushes :) Or things just weren't cached yet or something. Nothing I've done in the app should affect that at this time.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.