/// <summary>
        /// Adds a floating region.
        /// </summary>
        /// <param name="region">The content rectangle.</param>
        /// <param name="maxUpOffset">How much the content can move up.</param>
        /// <param name="maxDownOffset">How much the content can move down.</param>
        /// <param name="maxLeftOffset">How much the content can move to the left.</param>
        /// <param name="maxRightOffset">How much the content can move to the right.</param>
        /// <remarks>A floating region is a a region that can be placed within the boundries of a bigger region.</remarks>
        /// <returns>An updated clone of this settings object.</returns>
        public ICheckSettings Floating(Rectangle region, int maxUpOffset, int maxDownOffset, int maxLeftOffset, int maxRightOffset)
        {
            CheckSettings clone = Clone();

            clone.Floating_(region, maxUpOffset, maxDownOffset, maxLeftOffset, maxRightOffset);
            return(clone);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds a floating region.
        /// </summary>
        /// <param name="region">The content rectangle.</param>
        /// <param name="maxUpOffset">How much the content can move up.</param>
        /// <param name="maxDownOffset">How much the content can move down.</param>
        /// <param name="maxLeftOffset">How much the content can move to the left.</param>
        /// <param name="maxRightOffset">How much the content can move to the right.</param>
        /// <remarks>A floating region is a a region that can be placed within the boundries of a bigger region.</remarks>
        /// <returns>An updated clone of this settings object.</returns>
        public ICheckSettings Floating(Rectangle region, int maxUpOffset, int maxDownOffset, int maxLeftOffset, int maxRightOffset)
        {
            CheckSettings clone = Clone();

            clone.Floating_(region, maxUpOffset, maxDownOffset, maxLeftOffset, maxRightOffset);
            clone.fluentCode_.Append($"{nameof(Floating)}(new {nameof(Rectangle)}({region.X},{region.Y},{region.Width},{region.Height}),{maxUpOffset},{maxDownOffset},{maxLeftOffset},{maxRightOffset})");
            return(clone);
        }
        /// <summary>
        /// Adds a floating region.
        /// </summary>
        /// <param name="maxOffset">How much each of the content rectangles can move in any direction.</param>
        /// <param name="regions">One or more content rectangles.</param>
        /// <remarks>A floating region is a a region that can be placed within the boundries of a bigger region.</remarks>
        /// <returns>An updated clone of this settings object.</returns>
        public ICheckSettings Floating(int maxOffset, params Rectangle[] regions)
        {
            CheckSettings clone = Clone();

            foreach (Rectangle region in regions)
            {
                clone.Floating_(region, maxOffset, maxOffset, maxOffset, maxOffset);
            }
            return(clone);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Adds a floating region.
        /// </summary>
        /// <param name="maxOffset">How much each of the content rectangles can move in any direction.</param>
        /// <param name="regions">One or more content rectangles.</param>
        /// <remarks>A floating region is a a region that can be placed within the boundries of a bigger region.</remarks>
        /// <returns>An updated clone of this settings object.</returns>
        public ICheckSettings Floating(int maxOffset, params Rectangle[] regions)
        {
            CheckSettings clone = Clone();

            clone.fluentCode_.Append($"{nameof(Floating)}({maxOffset}");
            foreach (Rectangle region in regions)
            {
                clone.Floating_(region, maxOffset, maxOffset, maxOffset, maxOffset);
                clone.fluentCode_.Append($", new {nameof(Rectangle)}({region.X},{region.Y},{region.Width},{region.Height})");
            }
            clone.fluentCode_.Append(")");
            return(clone);
        }