Jump to content

Using the Foreground/Background Colors


SearedIce

Recommended Posts

Is there any way to use the user-selected foreground and background colors from within an effect?

I have tried "Workspace.Environment.ForeColor" as it is used in various tool source code files, but the effects system (and/or CodeLab) won't let me access "Workspace" from within the effect code.

Is the only solution to allow users to input colors through controls in my effect?

-John

Link to comment
Share on other sites

EffectEnvironmentParameters?

Please explain the use, or let me know which file might show an example use.

Link to comment
Share on other sites

Don't know what else to tell you ... should be pretty easy if you're using Visual Studio with its Intellisense popups.

this.EnvironmentParameters.ForeColor

this.EnvironmentParameters.BackColor

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

Good point...didn't even think to use Visual Studio while looking through the source for reference. I have been using CodeLab for effects coding...it's great how fast changes can be seen!

Thanks for your help!

Link to comment
Share on other sites

Ok...I have the colors working. Thanks again for the help!

What about Tolerance? I'm looking at EffectEnvironmentParameters.cs and it seems that only the colors, brush size, and selection are available.

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.

×
×
  • Create New...