Jump to content

EnvironmentParametersEx


Tim!
 Share

Recommended Posts

I've found the read-only EnvironmentParameters to be quite useful, but it could be more useful.

While I've been writing my first plugin I've looked at other programmers plugins and I've noticed that it's common to have a parallel set of drawing settings (e.g. antialias, brush type, etc).

Would it be possible to make more enviroment settings available to plugins and make them both writeable and readable.

Any thoughts?

Link to comment
Share on other sites

  • 2 weeks later...
OOI, are you looking to use this in a canvas plugin or one with a simple dialog?

I'm new to Paint.NET, so correct me if I'm wrong. Does a canvas plugin mean an Effect plugin without a config dialog.

For effect plugins without a config dialog, the EnvironmentParametersEx would only need to be read-only; for effect plugins with config dialogs, the EvironmentParametersEx could both readable and writeable.

As an example, my Rounded Rectangle config dialog could have a brush width selector initialised to the value in EnvironmentParametersEx.BrushWidth when the dialog opens, the user then changes it and then the new value is written to EnvironmentParametersEx.BrushWidth when the dialog closes.

What do you think?

Link to comment
Share on other sites

If you want to persist values between application sessions for your own effect, then .NET already has stuff built-in for you to do that. Token values are already persisted between effect instances during the same application instance.

Also, do not overwrite Paint.NET's built-in configuration, e.g. its registry settings. Effects are not allowed to write to this.

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...