NSD Posted February 6, 2021 Share Posted February 6, 2021 Spoiler // Name: // Submenu: // Author: // Title: // Version: // Desc: // Keywords: // URL: // Help: #region UICode CheckboxControl custom = false; // Custom color ColorWheelControl color = ColorBgra.FromBgr(0, 0, 0); // [PrimaryColor] {custom} Color #endregion // This single-threaded function is called after the UI changes and before the Render function is called // The purpose is to prepare anything you'll need in the Render function void PreRender(Surface dst, Surface src) { } // Here is the main multi-threaded render function // The dst canvas is broken up into rectangles and // your job is to write to each pixel of that rectangle void Render(Surface dst, Surface src, Rectangle rect) { // Delete these lines if you don't need the primary or secondary color ColorBgra PrimaryColor = EnvironmentParameters.PrimaryColor; ColorBgra SecondaryColor = EnvironmentParameters.SecondaryColor; // Step through each row of the current rectangle for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; // Step through each pixel on the current row of the rectangle for (int x = rect.Left; x < rect.Right; x++) { ColorBgra SrcPixel = src[x,y]; ColorBgra DstPixel = dst[x,y]; ColorBgra CurrentPixel = SrcPixel; // TODO: Add additional pixel processing code here dst[x,y] = CurrentPixel; } } } Am I wrong or is something wrong with the color control in CodeLab? Check by checking / unchecking the Custom color checkbox. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted February 6, 2021 Share Posted February 6, 2021 1 hour ago, NSD said: Am I wrong or is something wrong with the color control in CodeLab? This happens with other plugins too, so it's a bug in Paint.NET v4.2.15. 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
toe_head2001 Posted February 11, 2021 Share Posted February 11, 2021 I've split these posts into a separate forum topic. The Radius Corners plugin is a good example to demonstrate this issue. I'm guessing a boolean just got inverted somewhere. ColorWheel when disabled: ColorWheel when enabled: Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
toe_head2001 Posted April 6, 2021 Share Posted April 6, 2021 @NSD, this issue has been fixed in Paint.NET v4.2.16. You can download the beta release here: https://forums.getpaint.net/topic/118070-paintnet-4216-beta-build-7765/ 2 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab 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.