Jump to content

tev

Newbies
  • Posts

    2
  • Joined

  • Last visited

tev's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • First Post
  • Conversation Starter

Recent Badges

0

Reputation

  1. I completely goofed; I was working on a new empty layer the entire time instead of my target background layer. Thank you for the response, anyways, much appreciated!
  2. I'm working on a plugin that isolates and rearranges certain areas of a file while essentially deleting the un-wanted areas: very minimal plugin as it's my first. Running into an issue where assigning the currentPixel variable to be transparent is not bearing any change. void Render(Surface dst, Surface src, Rectangle rect) { // Delete any of these lines you don't need Rectangle selection = EnvironmentParameters.SelectionBounds; int centerX = ((selection.Right - selection.Left) / 2) + selection.Left; int centerY = ((selection.Bottom - selection.Top) / 2) + selection.Top; ColorBgra currentPixel; for (int y = 0; y <= 558; y++) // Scoping through. { if (IsCancelRequested) return; for (int x = 0; x <= 584; x++) { currentPixel = src[x,y]; if (x == 231 && y == 74) { // Basic test to change a select pixel, works fine. currentPixel = ColorBgra.Red; } else { currentPixel = ColorBgra.Transparent; // This here is the issue. // The destination and source pixel are the still same after the assignment. } dst[x,y] = currentPixel; } } } I thought maybe initializing the dst array to be empty(?), not even sure how to work that.
×
×
  • Create New...