Jump to content

Recommended Posts

Moire Texture Effect Plugin

 

Moire1.jpg

 

What's this?

Provided in the samples with the CodeLab you could find a Moire.cs:

void Render(Surface dst, Surface src, Rectangle rect)
{
   for(int y = rect.Top; y < rect.Bottom; y++)
   {
       int v = (2 * y - dst.Height) / 2;
       for (int x = rect.Left; x < rect.Right; x++)
       {
           int u = (2 * x - dst.Width) / 2;
           byte c = Utility.ClampToByte(
               128 + 127 * Math.Sin((u*u+v*v) / 100.0));
           dst[x, y] = ColorBgra.FromBgr(c,c,c);
       }
   }
}
 

I've revised the code to :

1. have it centered

2. have sliders per chanel of colors Red, Green, Blue and Alpha.

3. change the raduis, etc...

 

:( :oops: all this gives a long UI... Sorry...

 

 

:Warning: This is a texture plugin. It replaces the selection (or the active layer if no selection).

 

 

Download it!

Plugin Moire.dll

ar.pngHere is the DLLal.png

 

 

The MadJik's All plugins package is available !

http://forums.getpaint.net/index.php?showtopic=7186

 

 

How to install

Close Paint.net

 

Classic version of Paint.net

Unzip and (re)place the DLL in your Effect folder usually: C:/Program Files/Paint.NET/Effects

 

Microsoft Store version of Paint.net

Unzip and (re)place the DLL in your Effect folder usually: /My Documents/paint.net App Files/Effects/

You have to adapt for your language My Documents

 

 

The User interface

This plugin is added to the menu Effects, submenu Texture.

Moire_UI.png

 

For each chanel:

Zoom: to increase/decrease the size of the circles.

Light: to set the strength of the color.

Fog: to make the circle smoother or vice-versa.

Offset: you could move the center.

 

Some examples:

moire.jpg

 

moire2.jpg

 

moire3.jpg

 

Link to post
Share on other sites

It is quite interesting what this plug in dose. Thank you for making and publishing it.

But I do have to agrea with the other comments. A few plug ins use scrolling UI. And I think this should be avoided, if possible.

sigxz7gs5.png

My DA: http://leif-j.deviantart.com/

--------------

Some people seek justice so persistent, that they will do great injustice themselves.

Link to post
Share on other sites

Adding tabs won't make the UI easier.

You should focus on a few things, instead of requiring the user to figure out every possible input to your functions. Make the UI fun, not complicated. Just because flexibility is possible doesn't mean it's what anybody wants.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to post
Share on other sites
Adding tabs won't make the UI easier.

You should focus on a few things, instead of requiring the user to figure out every possible input to your functions. Make the UI fun, not complicated. Just because flexibility is possible doesn't mean it's what anybody wants.

Using the indirect UI, is it possible to add tabs? I was under the assumption that the indirect UI is limited to a set of UI controls, and I have not seen the ability to add tabs... did I miss that?

I realize you can use the earlier plugin api to use winforms and create your own UI, but I also assumed that was being obsoleted.

Total hack.

Link to post
Share on other sites
Using the indirect UI, is it possible to add tabs? I was under the assumption that the indirect UI is limited to a set of UI controls, and I have not seen the ability to add tabs... did I miss that?
No. No tabs.
I realize you can use the earlier plugin api to use winforms and create your own UI, but I also assumed that was being obsoleted.

It's not really obsoleted, seeing as the PropertyBasedEffect and whatnot is an extension of Effect. You can't obsolete something when the new version depends heavily on the thing you're trying to obsolete ;)

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to post
Share on other sites

It's not really obsoleted, seeing as the PropertyBasedEffect and whatnot is an extension of Effect. You can't obsolete something when the new version depends heavily on the thing you're trying to obsolete ;)

Understood... but some of the methods (or overrides) are marked as "obsolete", so I assume that means Rick is trying to tell us something.... like, "hey, don't use these, they might not be here later".

I would much rather use my own UI for most things... maybe I'll just start doing that.

Total hack.

Link to post
Share on other sites
  • 4 months later...
  • 5 years later...

"You can't obsolete something when the new version depends heavily on the thing you're trying to obsolete." lol What?

don't worry about it ;P

 

what I do all summer Emote Cursor Pack 'noob gallery

No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait

Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo

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.

×
×
  • Create New...