Rick Brewster

CodeLab v4.2 (for advanced users) Released March 18, 2019

Recommended Posts

Hey hey hey BoltBait! I've gone and found a bug!

When you use the Delete key to make a change to the code, it does not seem to realize that the code has changed and therefore does not recompile... Minor, I know, but I just thought I'd let you know.

Page one called... they want their bug report back... :D

http://paintdotnet.12.forumer.com/viewt ... =4617#4617

Owned :D

Share this post


Link to post
Share on other sites
Rick (or BB I guess) will you ever be releasing the codelab script, for us to browse and look at?

You mean the source code to CodeLab? If so, it is available for download on my page. (Link in sig)

Share this post


Link to post
Share on other sites
Rick (or BB I guess) will you ever be releasing the codelab script, for us to browse and look at?

You mean the source code to CodeLab? If so, it is available for download on my page. (Link in sig)

One final question, where do you get Visual Studio from?

Share this post


Link to post
Share on other sites
Microsoft, try searching microsofts site for it :)

There's a free version & a version that you have to pay money for.

Thanks.

I'll download it when I've learnt enough C# that I can transfer it to another program, which leads the question, is there anywhere where you can learn it?

Share this post


Link to post
Share on other sites
There are places on the internet (google) but according to various people on here that know C# a book is one of the best ways to learn it.

Looks like I'm going to the libary tomorrow.

Share this post


Link to post
Share on other sites

Yes.

In fact, I've asked Rick for a hand full of other words as well. He's hesitant to add them, but he hasn't said "no".

Share this post


Link to post
Share on other sites
Yes.

In fact, I've asked Rick for a hand full of other words as well. He's hesitant to add them, but he hasn't said "no".

It's nice to see that you have it in mind. :)

The point is that codelab is also used by plugin developers, and such a simple string change would affect all new plugins made with codelab in a positive way. Maybe it should be changed before including the other features...

And last but not least: BoltBait, haven't you said you would change your plugins according to the new strings? It's quite a while since PDN 3.10 is out...

Or did I missed changes? :shock:

Share this post


Link to post
Share on other sites

I really think, that you should update this plugin, for me this is the best plugin ever made by anyone.

Can`t you please make changes like this:

int Amount1=0;	//[0,100]Slider 1 Description
int Amount2=0;	//[0,100]Slider 2 Description
int Amount3=0;	//[0,100]Slider 3 Description
int BoxesNumber=4;
void Render(Surface dst, Surface src, Rectangle rect)
{
   PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds);

   // 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++)
       {
           if (selectionRegion.IsVisible(x, y))
           {
               CurrentPixel = src[x,y];
               // TODO: Add pixel processing code here
               // Access RGBA values this way, for example:
               // CurrentPixel.R = (byte)PrimaryColor.R;
               // CurrentPixel.G = (byte)PrimaryColor.G;
               // CurrentPixel.B = (byte)PrimaryColor.B;
               // CurrentPixel.A = (byte)PrimaryColor.A;
               // if(CheckBox[1]){CurrentPixel.R=CurrentPixel.G;}
               // if(CheckBox[2]){CurrentPixel.G=CurrentPixel.B;}
               // if(CheckBox[3]){CurrentPixel.B=CurrentPixel.R;}
               dst[x,y] = CurrentPixel;
           }
       }
   }
}

and in variable BoxesNumber will be number of checkboxes to create

in array CheckBox[] would be stored state of checkboxes, that would be created for Plugin when you will choose "Make DLL" button.

You must listen to me! I beg you!

Share this post


Link to post
Share on other sites
Will there be a new version of codelab, maybe supporting localized namespaces and the new UI features? Is there any ETA?

Yes. But, no ETA.

I'm busy at the moment, but when my work load eases up a little, I'll update CodeLab.

Share this post


Link to post
Share on other sites
Will there be a new version of codelab, maybe supporting localized namespaces and the new UI features? Is there any ETA?

I found some time to update CodeLab! Yay!!! :AddNoise:

NEW IN 3.2

- When a standard Effects submenu is used (for example Blurs), effects made

with CodeLab will show up in the localized menu when running Paint.NET

in a localized mode.

- If the Adjustments submenu is chosen, the effect will show up in the

Adjustments menu instead of the Effects > Adjustments menu.

- A default submenu can be defined in code by using the following comment:

// submenu: blurs

- CodeLab has been moved under the Effects > Advanced submenu.

- Removed the "if (selectionRegion.IsVisible(x, y))" check in the default script

NOTE: This is the last update before I tackle the new UI stuff...

Go get it here: http://boltbait.googlepages.com/codelab

Enjoy. 8)

Share this post


Link to post
Share on other sites

Thanks for the update...

About adjustments, it's just sad, I(we) create an effect and because we(I) want it under Adjustment, then we/I can't use the repeat function Ctrl+F :(

Share this post


Link to post
Share on other sites

Yay! Updates! :D

Thanks for the update...

About adjustments, it's just sad, I(we) create an effect and because we(I) want it under Adjustment, then we/I can't use the repeat function Ctrl+F :(

If you really need to Ctrl-F an adjustment, use ScriptLab.

Share this post


Link to post
Share on other sites

You should remove the "if (selectionRegion.IsVisible(x, y))" lines from the default code sample, as Rick has stated on multiple occasions that - at least within the context of CodeLab - it serves no purpose other than to hinder performance.

Share this post


Link to post
Share on other sites

Dang it! I thought I already did that! Grrr... :evil:

OK, I'll update it in a couple of hours. :roll:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.