public void DrawFillFigure(AFigure aFigure) { List <Point> points = aFigure.DoFigureMath(); ConnectPoints(points, aFigure.SetColor(), aFigure.SetThickness()); aFigure.FillFigure(); }
public void HighlightSelectedFigureW(AFigure aFigure) { if (aFigure != null) { List <Point> points = aFigure.DoFigureMath(); if (points.Count > 100) { if (points.Count > 360) { for (int i = 0; i < points.Count; i = i + (points.Count / 4)) { DrawLine(points[i], points[i], 7, Color.White); } } for (int i = 0; i < points.Count; i = i + 45) { if (i == 0 || i == 90 || i == 180 || i == 270 || i == 360) { } else { DrawLine(points[i], points[i], 7, Color.White); } } } else { for (int i = 0; i < points.Count; i++) { DrawLine(points[i], points[i], 7, Color.White); } } } }
public void DrawUponFigureWithWhite(AFigure aFigure) { if (aFigure != null) { List <Point> points = aFigure.DoFigureMath(); ConnectPoints(points, Color.White, aFigure.SetThickness()); } }
public bool PointInPoint(AFigure aF, Point e) { List <Point> points = aF.DoFigureMath(); for (int i = 0; i < points.Count; i++) { if (e == points[i]) { DrawLine(points[i], points[i], 7, Color.Green); return(true); } } return(false); }
public void HighlightSelectedFigure(AFigure aFigure) { if (aFigure != null) { List <Point> points = aFigure.DoFigureMath(); if (points.Count > 50) { if (points.Count == 360) // круг { for (int i = 0; i < points.Count; i = i + 45) { if (i == 0 || i == 90 || i == 180 || i == 270 || i == 360) { } else { DrawLine(points[i], points[i], 7, Color.Red); } } } else { Point first = aFigure.ReturnPoints()[0]; Point second = aFigure.ReturnPoints()[1]; List <Point> focusPoints = new MathEllipse().FindFocusPoints(first, second); Point right = focusPoints[1]; Point left = focusPoints[2]; Point top = focusPoints[3]; Point bottom = focusPoints[4]; DrawLine(right, right, 7, Color.Red); DrawLine(left, left, 7, Color.Red); DrawLine(top, top, 7, Color.Red); DrawLine(bottom, bottom, 7, Color.Red); } } else { for (int i = 0; i < points.Count; i++) { DrawLine(points[i], points[i], 7, Color.Red); } } } }