public override bool IsGroupStickedToGroup(Figure figure) { if (figure.IsFigureStickedToGroup(this)) { return(true); } return(false); }
public override bool IsToStick(Figure sticky) { if (sticky is MyPoint) { RectangleF rect = ((MyPoint)sticky).GetPath().GetBounds(); PointF[] points = path.PathPoints; for (int i = 0; i < points.Length; i++) { if ((points[i].X > rect.X) && (points[i].X < (rect.X + rect.Width)) && (points[i].Y > rect.Y) && (points[i].Y < (rect.Y + rect.Height))) { return(true); } } return(false); } if (sticky.IsFigureStickedToGroup(this)) { return(true); } return(false); }