Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1.     for(int x = 0; x < width; x++) {
  2.         for(int y = 0; y < height; y++) {
  3.  
  4.          setPixel(x, y, (255-(x*255)/width+(y*255)/height)/2, (255+(x*255)/width-(y*255)/height)/2, 0);
  5.         }
  6.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement