Jump to content

derzonk

Newbies
  • Posts

    1
  • Joined

  • Last visited

About derzonk

  • Birthday 01/01/1970

derzonk's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. First let me point out that Code Lab is a great tool. I've done some experiments and some things just did not work the way I expected. Have a look at this: void Render(Surface dst, Surface src, Rectangle rect) { byte t = (byte)rect.Top; 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 = t; CurrentPixel.G = t; CurrentPixel.B = t; dst[x,y] = CurrentPixel; } } } It's a pretty useless example, but the expected output would be, that all pixels are filled with the same color, depending on the position of 'rect'. What it does is, it fills the image with a gradient. Any suggestions?
×
×
  • Create New...