0% found this document useful (0 votes)
75 views1 page

An Imac Ion

This document contains C# code to animate an ellipse on a Windows form. It uses a timer to redraw the ellipse in a new position on each tick, erasing it in its previous position and drawing it in its new position offset by the incremented 'i' variable, simulating simple animation by repetitive redrawing in new positions over time.

Uploaded by

Fabian Padilla
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views1 page

An Imac Ion

This document contains C# code to animate an ellipse on a Windows form. It uses a timer to redraw the ellipse in a new position on each tick, erasing it in its previous position and drawing it in its new position offset by the incremented 'i' variable, simulating simple animation by repetitive redrawing in new positions over time.

Uploaded by

Fabian Padilla
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

animacion using System; using [Link]; using [Link]; using [Link]; using [Link]; using [Link]; using [Link].

Forms; namespace WindowsApplication29 { public partial class Form1 : Form { float i = 0; Pen plum1 = new Pen([Link], 3); Pen plum2 = new Pen([Link], 3); public Form1() { InitializeComponent(); } private void timer1_Tick(object sender, EventArgs e) { Graphics g1 = CreateGraphics(); [Link](plum2, 80 + i, 90, 50, 50); //borrar i++; //cambiar posicion SolidBrush b1 = new SolidBrush([Link](255, 255, 255, 0)); [Link](plum1, 80 + i, 90, 50, 50); //dibujar [Link](b1, 80+i, 90, 50, 50); //rellenar //pausar con timer1 //repetir, al continuar timer1 habilitado } private void Form1_Load(object sender, EventArgs e) { } }

You might also like