Jump to content

Foxxey

Members
  • Posts

    85
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Foxxey

  1. So basically the plugin should work just like the gravity plugin by MadJik but the gravity should be concentrated at one point (see pictures, i tried to recreate it manually). Please code the plugin with Codelab and send me the script, I want to use it for my other plugin. imma credit you. The plugin should also work for non circular shapes.

     

     

    test.png

  2. 3 hours ago, toe_head2001 said:

    The title is misleading. I thought this was going to generate a graphical waveform representation from a audio file. This have nothing to do with sound.

    I would recommend changing the name to 'Random Waveform', or something like that.

    its in the description though.

  3. 37 minutes ago, toe_head2001 said:

    You really need to provide a better description when publishing plugins. Some example images, and a UI screenshot is good too.

     

     

    Where did you get this code from? It looks very old; especially the ColorBgra casts. This code won't even compile with Paint.NET v4.2.11+

    
    Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt();
    int CenterX = ((selection.Right - selection.Left) / 2)+selection.Left;
    int CenterY = ((selection.Bottom - selection.Top) / 2)+selection.Top;
    ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor;
    ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor;
    int BrushWidth = (int)EnvironmentParameters.BrushWidth;

     

    Why are your X,Y loops using selection instead of rect? That can cause serious performance issues.

    
    for (int y = selection.Top; y < selection.Bottom; y++)
    {
        if (IsCancelRequested) return;
        int rnd = 0;
        if (onlyy) rnd = RandomNumber.Next(Min,Max);
        for (int x = selection.Left; x < selection.Right; x++)
        {

     

    So i tried doing the same for my plugin SoundWave and its bugged now. its generating a new random wave height for each rect.

    wave.png

  4. 15 minutes ago, toe_head2001 said:

     

    There's a solution for that. Please use the 'Legacy ROI' option, and switch from selection back to rect.

    CodeLabMenu.png.e9f241f990eba6ced65cd213

     

     

     

    Use the code that CodeLab gives you. The example on BoltBait's site are a bit outdated.

     

    Here's the newer snippet, as displayed by CodeLab:

    
    Rectangle selection = EnvironmentParameters.SelectionBounds;
    int CenterX = ((selection.Right - selection.Left) / 2) + selection.Left;
    int CenterY = ((selection.Bottom - selection.Top) / 2) + selection.Top;
    ColorBgra PrimaryColor = EnvironmentParameters.PrimaryColor;
    ColorBgra SecondaryColor = EnvironmentParameters.SecondaryColor;
    int BrushWidth = (int)EnvironmentParameters.BrushWidth;

     

    i just edited the code. it should be fine now.

  5. 1 minute ago, toe_head2001 said:

     

    There's a solution for that. Please use the 'Legacy ROI' option, and switch from selection back to rect.

    CodeLabMenu.png.e9f241f990eba6ced65cd213

     

     

     

    Use the code that CodeLab gives you. The example on BoltBait's site are a bit outdated.

     

    Here's the newer snippet, as displayed by CodeLab:

    
    Rectangle selection = EnvironmentParameters.SelectionBounds;
    int CenterX = ((selection.Right - selection.Left) / 2) + selection.Left;
    int CenterY = ((selection.Bottom - selection.Top) / 2) + selection.Top;
    ColorBgra PrimaryColor = EnvironmentParameters.PrimaryColor;
    ColorBgra SecondaryColor = EnvironmentParameters.SecondaryColor;
    int BrushWidth = (int)EnvironmentParameters.BrushWidth;

     

    ok tyvm

  6. 9 minutes ago, toe_head2001 said:

    You really need to provide a better description when publishing plugins. Some example images, and a UI screenshot is good too.

     

     

    Where did you get this code from? It looks very old; especially the ColorBgra casts. This code won't even compile with Paint.NET v4.2.11+

    
    Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt();
    int CenterX = ((selection.Right - selection.Left) / 2)+selection.Left;
    int CenterY = ((selection.Bottom - selection.Top) / 2)+selection.Top;
    ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor;
    ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor;
    int BrushWidth = (int)EnvironmentParameters.BrushWidth;

     

    Why are your X,Y loops using selection instead of rect? That can cause serious performance issues.

    
    for (int y = selection.Top; y < selection.Bottom; y++)
    {
        if (IsCancelRequested) return;
        int rnd = 0;
        if (onlyy) rnd = RandomNumber.Next(Min,Max);
        for (int x = selection.Left; x < selection.Right; x++)
        {

     

    I didnt use the rect cause it causes rectangle aborts in the random noice thingy. I use the code from BoltBait's website. I am new to C# and coding plugins. So what exactly should i change to what?

×
×
  • Create New...