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); }
public ShapeBox(IBaseShape shape) { Shape = shape; Points = new List <IPointShape>(); Shape.GetPoints(Points); Bounds = new Box(); Update(); }
public ShapeBox(IBaseShape shape) { Shape = shape; Points = new List <IPointShape>(); foreach (var point in Shape.GetPoints()) { Points.Add(point); } Bounds = new Box(); Update(); }