Jump to content

BoltBait

Administrator
  • Posts

    15,610
  • Joined

  • Last visited

  • Days Won

    378

Posts posted by BoltBait

  1. 2 hours ago, Ambreville said:

    Is there a plan for improving Paint.Net's printer interface?

     

    Yes.

     

    However, it is WAAAAAAAAY down the features list.

     

    So, don't hold your breath waiting for that.

     

    (This is 2024, people don't print anymore.)

  2. Here is a classic script to help you determine when you are on the edge of a selection...

     

    Spoiler
    // Name:
    // Submenu:
    // Author:
    // Title:
    // Version:
    // Desc:
    // Keywords:
    // URL:
    // Help:
    #region UICode
    ReseedButtonControl Amount1 = 0; // Randomize
    #endregion
    
    // Here is the main multi-threaded render function
    // The dst canvas is broken up into rectangles and
    // your job is to write to each pixel of that rectangle
    void Render(Surface dst, Surface src, Rectangle rect)
    {
        // uint seed = RandomNumber.InitializeSeed(RandomNumberRenderSeed, rect.Location);
        // Delete this line if you don't need the selection outline shape
        PdnRegion selectionRegion = EnvironmentParameters.GetSelectionAsPdnRegion();
    
    
        // Step through each row of the current rectangle
        for (int y = rect.Top; y < rect.Bottom; y++)
        {
            if (IsCancelRequested) return;
            // Step through each pixel on the current row of the rectangle
            for (int x = rect.Left; x < rect.Right; x++)
            {
                ColorBgra SrcPixel = src[x,y];
                ColorBgra DstPixel = dst[x,y];
    
                ColorBgra CurrentPixel = SrcPixel;
    
                if ( (!selectionRegion.IsVisible(x-1,y)) || (!selectionRegion.IsVisible(x,y-1)) || (!selectionRegion.IsVisible(x+1,y)) || (!selectionRegion.IsVisible(x,y+1)) )
                {
                    // This pixel is next to the marching ants
    
                    // as an example, I'm changing that pixel to a random color
                    CurrentPixel = ColorBgra.FromBgr((byte)RandomNumber.Next(ref RandomNumberRenderSeed,255),(byte)RandomNumber.Next(ref RandomNumberRenderSeed,255),(byte)RandomNumber.Next(ref RandomNumberRenderSeed,255));
    
    
                }
                else
                {
                    // This pixel is NOT next to the marching ants
                }
                dst[x,y] = CurrentPixel;
            }
        }
    }
    

     

     

    So, select your building outline and run the script.

     

    Hope this helps.

    • You're a Smart Cookie! 1
×
×
  • Create New...