Jump to content

Effect UI issue with disabled ColorWheels


Recommended Posts

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.

 

Link to post
Share on other sites
  • 1 month later...

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