private static bool IsPointVisible(Point fromPoint, Point targetPoint, Rect[] rectangles) { return rectangles.All(rect => !RectangleIntersectsLine(rect, fromPoint, targetPoint)); }