public void TryDrawLink(System.Drawing.Point currentPoint, System.Drawing.Graphics graphics, PolygonsContainer data) { NullablePoint linkPoint = isNearVertex(currentPoint, data.GetAllPoints()); if (linkPoint != null) { graphics.DrawRectangle(new System.Drawing.Pen(POINT_LINK_COLOR, POINT_LINK_LINE_WIDTH), linkPoint.X - POINT_LINK_RECT_WIDTH / 2, linkPoint.Y - POINT_LINK_RECT_WIDTH / 2, POINT_LINK_RECT_WIDTH, POINT_LINK_RECT_WIDTH); } }
public NullablePoint GetLinkPoint(System.Drawing.Point currentPoint, System.Drawing.Graphics graphics, PolygonsContainer data) { return isNearVertex(currentPoint, data.GetAllPoints()); }