Jump to content

Single Color Plugin Request


Recommended Posts

Could somebody make a plugin for me that:

Turns every pixel's color to your primary color.

And, changes that pixels Alpha to your primary color's alpha, unless that pixel is completly transparent, and you check a certain checkbox.

I would really appreciate it, I was planning to use this to gray out buttons, and things of that sort.

:oops:

Come on, I don't Shmell THAT bad...

Link to comment
Share on other sites

Thanks for your help,

I fiddled around with some code, and I got something very near what I would like.

However, I can't get codelab to create DLLs for me, could somebody build this, call it "Single Color", put it under "Color", and post a download link?

It would be greatly appreciated.

void Render(Surface dst, Surface src, Rectangle rect)
{

Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt();

ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor;

ColorBgra CurrentPixel;
for(int y = rect.Top; y < rect.Bottom; y++)
{
for (int x = rect.Left; x < rect.Right; x++)
{
CurrentPixel = src[x,y];
CurrentPixel.R = (byte)PrimaryColor.R;
CurrentPixel.G = (byte)PrimaryColor.G;
CurrentPixel.B = (byte)PrimaryColor.B;
// CurrentPixel.A = (byte)PrimaryColor.A;
dst[x,y] = CurrentPixel;
}
}
}

Come on, I don't Shmell THAT bad...

Link to comment
Share on other sites

I think Mike Ryan's Silhouette Plus would have done the job.

Silhouette converts the entire canvas into your selected color while preserving the alpha levels of each pixel. As well, you can also specify an alpha range in which to silhouette. This is usefull for object manipulation and for testing the transparency of the canvas is particular areas.
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.

 Share

×
×
  • Create New...