public CircularCloudLayouter(Point center) { if (center.X < 0 || center.Y < 0) { throw new ArgumentException("Coordinates of the center must be positive numbers"); } this.center = center; spiralGenerator = new SpiralGenerator(this.center); RectangleCloud = new RectangleCloud(); }
public CircularCloudLayouter(IRectangleCloud rectangleCloud) { if (!rectangleCloud.Rectangles.Any()) { throw new ArgumentException("Tags cloud could not be empty"); } var firstRectangle = rectangleCloud.Rectangles.First(); var firstRectangleCenter = firstRectangle.GetRectangleCenter(); if (firstRectangleCenter.X < 0 || firstRectangleCenter.Y < 0) { throw new ArgumentException("Coordinates of the center must be positive numbers"); } this.center = firstRectangleCenter; this.RectangleCloud = rectangleCloud; spiralGenerator = new SpiralGenerator(this.center); }
public void Reset() => rectangleCloud = new RectangleCloud();
public LinearLayouter() { position = new Point(0, 0); this.rectangleCloud = new RectangleCloud(); }
public void Reset() => RectangleCloud = new RectangleCloud(new List <Rectangle>());