private static void FillXArray(RPLItemMeasurement[] reportItemCol, float parentWidth, List <float> leftPosition)
        {
            int                num                = 0;
            int                num2               = 0;
            RoundedFloat       roundedFloat       = new RoundedFloat(0f);
            RPLItemMeasurement rPLItemMeasurement = null;
            int                num3               = 0;

            if (reportItemCol == null || leftPosition == null)
            {
                return;
            }
            leftPosition.Add(roundedFloat.Value);
            while (num3 < reportItemCol.Length)
            {
                rPLItemMeasurement = reportItemCol[num3];
                if (SkipReportItem(rPLItemMeasurement))
                {
                    num3++;
                    continue;
                }
                RoundedFloat x = new RoundedFloat(rPLItemMeasurement.Left);
                while (num > 0 && x < leftPosition[num])
                {
                    num--;
                }
                if (num < 0 || x != leftPosition[num])
                {
                    leftPosition.Insert(num + 1, rPLItemMeasurement.Left);
                    num2++;
                }
                num = num2;
                roundedFloat.Value = ReportItemRightValue(rPLItemMeasurement);
                while (num > 0 && roundedFloat < leftPosition[num])
                {
                    num--;
                }
                if (num < 0 || roundedFloat != leftPosition[num])
                {
                    leftPosition.Insert(num + 1, roundedFloat.Value);
                    num2++;
                }
                num = num2;
                num3++;
            }
            RoundedFloat x2 = new RoundedFloat(parentWidth);

            if (x2 > leftPosition[num] || 1 == leftPosition.Count)
            {
                leftPosition.Insert(num + 1, parentWidth);
            }
        }
Esempio n. 2
0
        private static void FillYArray(RPLItemMeasurement[] repItemColl, float parentHeight, List <float> topPosition, float delta)
        {
            int                num                = 0;
            int                num2               = 0;
            RoundedFloat       roundedFloat       = new RoundedFloat(0f);
            int                num3               = 0;
            RPLItemMeasurement rPLItemMeasurement = null;

            if (repItemColl == null || topPosition == null)
            {
                return;
            }
            topPosition.Add(roundedFloat.Value);
            while (num3 < repItemColl.Length)
            {
                rPLItemMeasurement = repItemColl[num3];
                if (SkipReportItem(rPLItemMeasurement))
                {
                    num3++;
                    continue;
                }
                RoundedFloat roundedFloat2 = new RoundedFloat(rPLItemMeasurement.Top - delta);
                while (num > 0 && roundedFloat2 < topPosition[num])
                {
                    num--;
                }
                if (num < 0 || roundedFloat2 != topPosition[num])
                {
                    topPosition.Insert(num + 1, roundedFloat2.Value - delta);
                    num2++;
                }
                num = num2;
                roundedFloat.Value = ReportItemBottomValue(rPLItemMeasurement) - delta;
                while (num > 0 && roundedFloat < topPosition[num])
                {
                    num--;
                }
                if (num < 0 || roundedFloat != topPosition[num])
                {
                    topPosition.Insert(num + 1, roundedFloat.Value);
                    num2++;
                }
                num = num2;
                num3++;
            }
            if (new RoundedFloat(parentHeight - delta) > topPosition[num] || 1 == topPosition.Count)
            {
                topPosition.Insert(num + 1, parentHeight - delta);
            }
        }