MJW Posted November 10, 2016 Share Posted November 10, 2016 In the CodeLap 2.0 release, one of the changes is: BlendOps have been changed from UserBlendOp to BinaryPixelOp. What is the distinction between them? I believe UserBlendOp is a subclass of BinaryPixelOp, but what is the significance of the change? I notice UserBlendOp has an associated class called UserBlendOps that provides a number of helpful methods, while PixelBlendOps is labeled as obsolete. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted November 10, 2016 Share Posted November 10, 2016 The following works in Paint.NET 3.5.11 and below // Darken private UserBlendOp darkenOp = new UserBlendOps.DarkenBlendOp(); The following works in paint.net 4.0+ // Setup for using Darken blend op private BinaryPixelOp darkenOp = LayerBlendModeUtil.CreateCompositionOp(LayerBlendMode.Darken); The change was made by Rick when developing 4.0. I think the change was made to match the naming convention of Unary pixel ops. EDIT: Binary pixel operations take two pixels for input. Unary pixel ops take one pixel for input: // Setup for using pixel op private UnaryPixelOps.Desaturate desaturateOp = new UnaryPixelOps.Desaturate(); 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
MJW Posted November 10, 2016 Author Share Posted November 10, 2016 Thanks, BoltBait. (I kind of like the old way better, but I suppose there was a good reason for the change.) Quote Link to comment Share on other sites More sharing options...
BoltBait Posted November 10, 2016 Share Posted November 10, 2016 I just edited the reasoning into the previous post. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game 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.