Union() публичный Метод

public Union ( Point point ) : void
point Point
Результат void
Пример #1
0
 /// <summary>
 /// Gets the rectangle.
 /// </summary>
 /// <returns></returns>
 public Windows.Foundation.Rect GetRect()
 {
     this.CheckRects();
     Windows.Foundation.Rect empty = Windows.Foundation.Rect.Empty;
     empty.Union(this.cellRect);
     empty.Union(this.headerRect);
     empty.Union(this.frozenRect);
     empty.Union(this.repeatRect);
     empty.Union(this.frozenTrailingRect);
     empty.Union(this.footerRect);
     return(empty);
 }
Пример #2
0
        /// <summary>
        /// Gets the range.
        /// </summary>
        /// <param name="context">The context</param>
        /// <param name="x">The x</param>
        /// <param name="y">The y</param>
        /// <param name="width">The width</param>
        /// <param name="high">The height</param>
        /// <param name="blocks">The blocks</param>
        /// <param name="allSize">All sizes</param>
        /// <param name="buildInControlState">State of the build in control</param>
        /// <param name="horizontal">If set to <c>true</c>, [horizontal]</param>
        /// <param name="continuePage">If set to <c>true</c>, [continue page]</param>
        /// <returns></returns>
        internal virtual GcRangeBlock GetRange(GcReportContext context, int x, int y, int width, int high, List <GcBlock> blocks, Windows.Foundation.Size allSize, object buildInControlState, bool horizontal, bool continuePage)
        {
            List <GcRangeBlock> list = this.GetBuildInControlRange(context, x, y, width, high, buildInControlState, horizontal, continuePage);

            Windows.Foundation.Size size = allSize;
            Windows.Foundation.Rect rect = new Windows.Foundation.Rect(0.0, 0.0, size.Width, size.Height);
            if ((list != null) && (list.Count > 0))
            {
                foreach (GcRangeBlock block in list)
                {
                    rect.Union(new Windows.Foundation.Rect(block.X, block.Y, block.Width, block.Height));
                }
            }
            Windows.Foundation.Rect rect2 = new Windows.Foundation.Rect((double)x, (double)y, (double)width, (double)high);
            if (!IsIntersect(rect, rect2))
            {
                return(new GcRangeBlock(0.0, 0.0, 0.0, 0.0));
            }
            rect.Intersect(rect2);
            GcRangeBlock block2 = new GcRangeBlock(0.0, 0.0, (double)((int)Math.Ceiling(rect.Width)), (double)((int)Math.Ceiling(rect.Height)))
            {
                OffsetX = (int)rect.X,
                OffsetY = (int)rect.Y
            };

            if ((list != null) && (list.Count > 0))
            {
                foreach (GcRangeBlock block3 in list)
                {
                    block2.Blocks.Add(block3);
                }
            }
            foreach (GcBlock block4 in blocks)
            {
                if (block4.IntersectWith((double)((int)rect.X), (double)((int)rect.Y), (double)((int)rect.Width), (double)((int)rect.Height)))
                {
                    block2.Blocks.Add(block4.Clone());
                }
            }
            return(block2);
        }
 public static Rect union(Rect r, Point p)
 {
     r.Union(p);
     return r;
 }
 public static Rect union(Rect r1, Rect r2)
 {
     r1.Union(r2);
     return r1;
 }