Jump to content

Effect Request: Polar to rectangle


Recommended Posts

If only there was a tutorial on the basics of changing a codelab script (with an input or two) into an effect DLL.

I don't even know where to begin. Besides the compiler (which one?) what else do I need on the system in order to make an Effect DLL?

What kind of project should it be? etc.

I know my questions sound pretty basic, but all the C# coding I do is for the web.

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to comment
Share on other sites

If only there was a tutorial on the basics of changing a codelab script (with an input or two) into an effect DLL.

I don't even know where to begin. Besides the compiler (which one?) what else do I need on the system in order to make an Effect DLL?

What kind of project should it be? etc.

I know my questions sound pretty basic, but all the C# coding I do is for the web.

None of those are very difficult problems to figure out. Try writing an effect from scratch. Dissect the CodeLab source code and project files -- it's just an effect plugin itself. Look at the source code for the effects that are built-in to Paint.NET. Once you do that, you have all the pieces you need.

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

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

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Hey BoltBait,

After writing my Cloud Effect, I have started writing up my development process... I'm still working on it, but it might be a good place for you to start. I have created a Project Template in Visual Studio 2005 that might be a good starting place...

http://www.sepcot.com/blog/2006/11-2006-PDN-EffectPluginTemplate.shtml

Link to comment
Share on other sites

Hey BoltBait,

After writing my Cloud Effect, I have started writing up my development process... I'm still working on it, but it might be a good place for you to start. I have created a Project Template in Visual Studio 2005 that might be a good starting place...

http://www.sepcot.com/blog/2006/11-2006-PDN-EffectPluginTemplate.shtml

Hey Sepcot, a few notes about your template:

1) Please make the default namespace something other than PaintDotNet.Effects. This is generally the namespace for effects that are built-in to Paint.NET, or that the Paint.NET team has released. Plugins authors should have their own namespace ... like maybe BoltBait.PdnEffects or something.

2) The line of code for, "if (selectionRegion.Visible(x, y))" is redundant. The 'rois' parameter only contains rectangles that are within the selected region (or the entire canvas if there is no selection).

* As an aside: the effect must only render to the areas in dstArgs that are designated by the Rectangles in the 'rois' array that are within the range [startIndex, startIndex+length-1]. This is an absolute requirement. Drawing anywhere else will lead to undefined behavior and may cause children to weep fiercely. You can read from any pixels in srcArgs however.

3) System.Data and System.Xml are not required references. (afaik)

Otherwise, cool stuff.

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

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

forumSig_bmwE60.jpg

Link to comment
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.

 Share

×
×
  • Create New...