/// <summary>
        /// Private helper that fills in the points between four points by calling itself
        /// recursively in a divide and conquer fashion
        /// </summary>
        private void FillInGrid(ArrayList pointArray,
                                Point upperLeft,
                                Point upperRight,
                                Point lowerRight,
                                Point lowerLeft)
        {
            // this algorithm improves perf by 20%
            if (!PointsAreCloseEnough(upperLeft, lowerLeft))
            {
                Point midPointLeft  = LassoSelectionBehavior.GeneratePointBetweenPoints(upperLeft, lowerLeft);
                Point midPointRight = LassoSelectionBehavior.GeneratePointBetweenPoints(upperRight, lowerRight);
                pointArray.Add(midPointLeft);
                pointArray.Add(midPointRight);
                FillInPoints(pointArray, midPointLeft, midPointRight);

                if (!PointsAreCloseEnough(upperLeft, midPointLeft))
                {
                    FillInGrid(pointArray, upperLeft, upperRight, midPointRight, midPointLeft);
                }

                //sort the right
                if (!PointsAreCloseEnough(midPointLeft, lowerLeft))
                {
                    FillInGrid(pointArray, midPointLeft, midPointRight, lowerRight, lowerLeft);
                }
            }
        }
 // Token: 0x06006DC0 RID: 28096 RVA: 0x001F89FC File Offset: 0x001F6BFC
 private void FillInPoints(ArrayList pointArray, Point point1, Point point2)
 {
     if (!this.PointsAreCloseEnough(point1, point2))
     {
         Point point3 = LassoSelectionBehavior.GeneratePointBetweenPoints(point1, point2);
         pointArray.Add(point3);
         if (!this.PointsAreCloseEnough(point1, point3))
         {
             this.FillInPoints(pointArray, point1, point3);
         }
         if (!this.PointsAreCloseEnough(point3, point2))
         {
             this.FillInPoints(pointArray, point3, point2);
         }
     }
 }
 // Token: 0x06006DC1 RID: 28097 RVA: 0x001F8A50 File Offset: 0x001F6C50
 private void FillInGrid(ArrayList pointArray, Point upperLeft, Point upperRight, Point lowerRight, Point lowerLeft)
 {
     if (!this.PointsAreCloseEnough(upperLeft, lowerLeft))
     {
         Point point  = LassoSelectionBehavior.GeneratePointBetweenPoints(upperLeft, lowerLeft);
         Point point2 = LassoSelectionBehavior.GeneratePointBetweenPoints(upperRight, lowerRight);
         pointArray.Add(point);
         pointArray.Add(point2);
         this.FillInPoints(pointArray, point, point2);
         if (!this.PointsAreCloseEnough(upperLeft, point))
         {
             this.FillInGrid(pointArray, upperLeft, upperRight, point2, point);
         }
         if (!this.PointsAreCloseEnough(point, lowerLeft))
         {
             this.FillInGrid(pointArray, point, point2, lowerRight, lowerLeft);
         }
     }
 }
        /// <summary>
        /// Private helper that fills in the points between two points by calling itself
        /// recursively in a divide and conquer fashion
        /// </summary>
        private void FillInPoints(ArrayList pointArray, Point point1, Point point2)
        {
            // this algorithm improves perf by 20%
            if (!PointsAreCloseEnough(point1, point2))
            {
                Point midPoint = LassoSelectionBehavior.GeneratePointBetweenPoints(point1, point2);
                pointArray.Add(midPoint);

                if (!PointsAreCloseEnough(point1, midPoint))
                {
                    FillInPoints(pointArray, point1, midPoint);
                }

                //sort the right
                if (!PointsAreCloseEnough(midPoint, point2))
                {
                    FillInPoints(pointArray, midPoint, point2);
                }
            }
        }
        /// <summary>
        /// Private helper that will turn an element in any nesting level into a stroke
        /// in the InkCanvas's coordinate space.  This method calls itself recursively
        /// </summary>
        private void HitTestElement(InkCanvasInnerCanvas parent, UIElement uiElement, List <UIElement> elementsToSelect)
        {
            ElementCornerPoints elementPoints = LassoSelectionBehavior.GetTransformedElementCornerPoints(parent, uiElement);

            if (elementPoints.Set != false)
            {
                Point[] points = GeneratePointGrid(elementPoints);

                //
                // perform hit testing against our lasso
                //
                System.Diagnostics.Debug.Assert(null != _lassoHelper);
                if (_lassoHelper.ArePointsInLasso(points, _percentIntersectForElements))
                {
                    elementsToSelect.Add(uiElement);
                }
            }
            //
            // we used to recurse into the childrens children.  That is no longer necessary
            //
        }
 // Token: 0x06006DBD RID: 28093 RVA: 0x001F8814 File Offset: 0x001F6A14
 private void HitTestElement(InkCanvasInnerCanvas parent, UIElement uiElement, List <UIElement> elementsToSelect)
 {
     LassoSelectionBehavior.ElementCornerPoints transformedElementCornerPoints = LassoSelectionBehavior.GetTransformedElementCornerPoints(parent, uiElement);
     if (transformedElementCornerPoints.Set)
     {
         Point[] points = this.GeneratePointGrid(transformedElementCornerPoints);
         if (this._lassoHelper.ArePointsInLasso(points, 60))
         {
             elementsToSelect.Add(uiElement);
         }
     }
 }