Jump to content

APShredder

Members
  • Posts

    1,318
  • Joined

  • Last visited

Posts posted by APShredder

  1. Some tutorials were in the Legacy Tutorials section of the forum which recently got removed. This was the announcement made about it:

    Cutting the cord!

    We're finally phasing out "Legacy Tutorials." I haven't had a request that any tutorial be resurrected from the old forum in a long time, so I think it's time it make its noble egress. So long, it has served us well.

    Anyway, the forum is going away, but the data won't be going anywhere for a while. It might be officially and finally deleted sometime, but not anytime soon. So if there's anything pressing you want back, I can get it back for you. As before, just post a request in the Tutorials+ Forum Concerns thread. Thanks!

  2. Unfortunately, that tutorial got removed because it was in the Legacy Tutorials section of the forum.

    Here's the announcement about it:

    Cutting the cord!

    We're finally phasing out "Legacy Tutorials." I haven't had a request that any tutorial be resurrected from the old forum in a long time, so I think it's time it make its noble egress. So long, it has served us well.

    Anyway, the forum is going away, but the data won't be going anywhere for a while. It might be officially and finally deleted sometime, but not anytime soon. So if there's anything pressing you want back, I can get it back for you. As before, just post a request in the Tutorials+ Forum Concerns thread. Thanks!

  3. To access HSV colors do something like this:

    void Render(Surface dst, Surface src, Rectangle rect)
    {
       // Delete any of these lines you don't need
       Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt();
       long CenterX = (long)(((selection.Right - selection.Left) / 2)+selection.Left);
       long CenterY = (long)(((selection.Bottom - selection.Top) / 2)+selection.Top);
       ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor;
       ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor;
       int BrushWidth = (int)EnvironmentParameters.BrushWidth;
    
       ColorBgra CurrentPixel;
       for (int y = rect.Top; y < rect.Bottom; y++)
       {
           for (int x = rect.Left; x < rect.Right; x++)
           {
               CurrentPixel = src[x,y];
               Color col = CurrentPixel.ToColor();     // These are the important lines!
               HsvColor hsv = HsvColor.FromColor(col); //
               dst[x,y] = CurrentPixel;
           }
       }
    }

    Color col = CurrentPixel.ToColor();                  // These are the important lines!
               HsvColor hsv = HsvColor.FromColor(col); //

×
×
  • Create New...