Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Bitmap bufor = null;
- private void Form1_Paint(object sender, PaintEventArgs e){
- Graphics g = e.Graphics;
- bufor = new Bitmap(this.ClientSize.Width, this.ClientSize.Height);
- for(int x=0;x< this.ClientSize.Width;x++){
- for(int y=0;y<this.ClientSize.Height;y++){
- int G = (int)(255 * 0.5*(1+Math.Sin((y-x)/10.0)));
- int R = (int)(255 * 0.5*(1+Math.Sin((x+y)/10.0)));
- bufor.SetPixel(x,y,Color.FromArgb(R,G,0));
- }
- }
- g.DrawImage(bufor,0,0);
- }
Advertisement
Add Comment
Please, Sign In to add comment