Example #1
0
 public ShapeBox(IBaseShape shape)
 {
     Shape  = shape;
     Points = Shape.GetPoints();
     GetBox(Points, out Left, out Top, out Right, out Bottom);
     CenterX = (Left + Right) / 2.0;
     CenterY = (Top + Bottom) / 2.0;
     Width   = Math.Abs(Right - Left);
     Height  = Math.Abs(Bottom - Top);
 }
Example #2
0
        public ShapeBox(IBaseShape shape)
        {
            Shape = shape;

            Points = new List <IPointShape>();

            Shape.GetPoints(Points);

            Bounds = new Box();

            Update();
        }
Example #3
0
        public ShapeBox(IBaseShape shape)
        {
            Shape = shape;

            Points = new List <IPointShape>();

            foreach (var point in Shape.GetPoints())
            {
                Points.Add(point);
            }

            Bounds = new Box();

            Update();
        }