示例#1
0
        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);
        }
示例#2
0
            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));
            }