, Visual C#


         


{
// :
Bitmap myBitmap = new Bitmap(pictureBox1.Width,
pictureBox1.Height);
Graphics g = Graphics.FromImage(myBitmap);
g.DrawImage(pictureBox1.Image, -dx, 0);
// :
g.ScaleTransform(1, -100.0F / pictureBox1.Height);
g.TranslateTransform(0, -100);
Pen myPen = new Pen(Color.Blue, 1);
int i;
for (i = 10; i <= 100; i+=10)
g.DrawLine(myPen, pictureBox1.Width - dx, i,
pictureBox1.Width, i);
//
// f():
y1 = f();
// :
Pen myPen2 = new Pen(Color.Black, 1);
g.DrawLine(myPen2,
pictureBox1.Width - 1 - dx, y0,
pictureBox1.Width - 1, y1);
y0 = y1;
//
// PictureBox1:
pictureBox1.Image = myBitmap;
}