public static IExplicitShape <int> Translate(this IExplicitShape <int> shape, int n) { var newBounds = GridInterval.Translate(shape.Bounds, n); var newShape = ImplicitShape.Translate(shape, n).ToExplicit(newBounds); return(newShape); }
public ExplicitShape1 Translate(int offset) { var map = Map.Translate(offset); var newRect = GridInterval.Translate(storageBounds, offset); var newShape = ImplicitShape.Transform(implicitShape, map); return(new ExplicitShape1(newShape, newRect)); }