示例#1
0
 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();
 }
示例#2
0
        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);
        }
示例#3
0
 public void Reset() => rectangleCloud = new RectangleCloud();
示例#4
0
 public LinearLayouter()
 {
     position            = new Point(0, 0);
     this.rectangleCloud = new RectangleCloud();
 }
示例#5
0
 public void Reset() => RectangleCloud = new RectangleCloud(new List <Rectangle>());