public void RunOnce(GDIRenderer aPort) { aPort.SaveState(); // Orient the axis with origin at upper // left hand corner, y-axis positive going down the screen aPort.SetMappingMode(MappingModes.Text); // Draw the curve aPort.DrawBeziers(fBlackPen, fFigure); // Draw the control lines // Control line 1 aPort.DrawLine(fRedPen, new Point(fFigure[0].X, fFigure[0].Y), new Point(fFigure[1].X, fFigure[1].Y)); // Control line 2 aPort.DrawLine(fRedPen, new Point(fFigure[2].X, fFigure[2].Y), new Point(fFigure[3].X, fFigure[3].Y)); aPort.Flush(); aPort.ResetState(); }