, Visual C#


         

RotateAt


// myGraphicsPath2:
myGraphicsPath =
(GraphicsPath)myGraphicsPath2.Clone();
// ,
// :
PointF myPointF =
myGraphicsPath.GetBounds().Location;
myPointF.X = myPointF.X +
myGraphicsPath.GetBounds().Width / 2;
myPointF.Y = myPointF.Y +
myGraphicsPath.GetBounds().Height / 2;
//
// step_alpha
// RotateAt Matrix:
myMatrix1.RotateAt(step_alpha, myPointF);
// Transform GraphicsPath
// myMatrix:
myGraphicsPath.Transform(myMatrix1);
myGraphicsPath.Transform(myMatrix2);
// :
myGraphics.DrawPath(new Pen(Color.Red, 3),
myGraphicsPath);
}
}
Properties ( PictureBox) Events Paint. PictureBox_Paint, .
56.2. PictureBox.
private void pictureBox1_Paint(object sender,
PaintEventArgs e)
{
// FigureDraw
// i- :
myAnimation.FigureDraw(e.Graphics, i);
// i- :
i = i + 1;
}
Interval Timer Value TrackBar, TrackBar . Form9.cs , .
56.3. TrackBar.
private void trackBar1_Scroll(object sender, EventArgs e)
{
timer1.Enabled = true;
timer1.Interval = trackBar1.Value;
}
, Timer ( ). Form9.cs , .
56.4. Timer.
private void timer1_Tick(object sender, EventArgs e)
{
pictureBox1.Refresh();
}