SearedIce Posted March 12, 2006 Share Posted March 12, 2006 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 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted March 12, 2006 Share Posted March 12, 2006 There should be an EffectEnvironment property you can use. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
SearedIce Posted March 12, 2006 Author Share Posted March 12, 2006 EffectEnvironmentParameters? Please explain the use, or let me know which file might show an example use. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted March 12, 2006 Share Posted March 12, 2006 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 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
SearedIce Posted March 12, 2006 Author Share Posted March 12, 2006 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! Quote Link to comment Share on other sites More sharing options...
SearedIce Posted March 13, 2006 Author Share Posted March 13, 2006 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.