public void DeleteBezierSegment() { _segments.RemoveAt(_currentHoverData.HoveredSegmentIndex); OrganizeNeighbors(_currentHoveredSegment.Neighbor, _currentHoveredSegment.OtherNeighbor); _currentHoveredSegment.OtherNeighbor.Update(); _currentHoveredSegment.Delete(); _currentPathObject.UpdatePointsHandlesRenderer(); _currentPathObject.SegmentCount--; }
public void CloseCurve() { BezierSegment first = _segments[0]; first.isFirst = false; first.SegmentCount = _program.SEGMENTS_PER_CURVE; first.Delete(); first.AddCurvePoints(); BezierSegment last = _segments[_segments.Count - 1]; OrganizeNeighbors(last, _segments[0]); first.Update(); first.PointSelected = false; last.PointSelected = false; _currentPathObject.IsClosed = true; _currentPathObject.UpdatePointsHandlesRenderer(); _program.AllowPathObjectUpdate(); }