private void SmallLineRotation() { ObjectDrawer = new ObjectDrawer(); var smallLinePointCoordinates = ObjectDrawer.Rotation(_x3, _y3, _x2, _y2, 10); _x3 = smallLinePointCoordinates.Item1; _y3 = smallLinePointCoordinates.Item2; ObjectDrawer.DrawLine(Graphics, Color.Black, _x2, _y2, _x3, _y3); }
private void TimerForRotation_Tick(object sender, EventArgs e) { ObjectDrawer = new ObjectDrawer(); Graphics.FillRectangle(new SolidBrush(Color.Gray), 0, 0, pictureBox.Width, pictureBox.Height); var firstPointCoordinates = ObjectDrawer.Rotation(_x4, _y4, pictureBox.Width / 2, pictureBox.Height / 2, 15); var secondPointCoordinates = ObjectDrawer.Rotation(_x2, _y2, pictureBox.Width / 2, pictureBox.Height / 2, 15); _x4 = firstPointCoordinates.Item1; _y4 = firstPointCoordinates.Item2; _x2 = secondPointCoordinates.Item1; _y2 = secondPointCoordinates.Item2; ObjectDrawer.DrawLine(Graphics, Color.Black, _x4, _y4, _x2, _y2); SmallLineRotation(); ObjectDrawer.DrawLine(Graphics, Color.Black, pictureBox.Width / 2, pictureBox.Height / 2, _x2, _y2); }