示例#1
0
        void getRows(ref FlowRowElement parentElement, IHaveChild block)
        {
            FlowRow currentRow = new FlowRow();

            foreach (PrintElementBase current in block.Childs)
            {
                FlowRowElement currentRowElement = new FlowRowElement(current);

                if (current is LineBreak)
                {
                    parentElement.ChildsRows.Add(currentRow);
                    currentRow = new FlowRow();
                    currentRow.Elements.Add(currentRowElement);
                    parentElement.ChildsRows.Add(currentRow);
                    currentRow = new FlowRow();
                }
                else
                {
                    currentRow.Elements.Add(currentRowElement);

                    if (current is IHaveChild)
                    {
                        getRows(ref currentRowElement, (IHaveChild)current);
                    }
                }
            }
        }
示例#2
0
        private Rect getRowBounds(FlowRow row)
        {
            foreach (FlowRowElement element in row.Elements)
            {
                Rect rectElement = GetRect(element.Element);

                foreach (FlowRow childRow in element.ChildsRows)
                {
                    Rect rect = getRowBounds(childRow);

                    rectElement.Extend(rectElement);
                }
            }

            return(Rect.Empty);
        }
        void getRows(ref FlowRowElement parentElement, IHaveChild block)
        {
            FlowRow currentRow = new FlowRow();

            foreach (PrintElementBase current in block.Childs)
            {
                FlowRowElement currentRowElement = new FlowRowElement(current);

                if (current is LineBreak)
                {
                    parentElement.ChildsRows.Add(currentRow);
                    currentRow = new FlowRow();
                    currentRow.Elements.Add(currentRowElement);
                    parentElement.ChildsRows.Add(currentRow);
                    currentRow = new FlowRow();
                }
                else
                {
                    currentRow.Elements.Add(currentRowElement);

                    if (current is IHaveChild)
                    {
                        getRows(ref currentRowElement, (IHaveChild)current);
                    }
                }
            }
        }
        private Rect getRowBounds(FlowRow row)
        {
            foreach (FlowRowElement element in row.Elements)
            {
                Rect rectElement = GetRect(element.Element);

                foreach (FlowRow childRow in element.ChildsRows)
                {
                    Rect rect = getRowBounds(childRow);

                    rectElement.Extend(rectElement);
                }
            }

            return Rect.Empty;
        }
示例#5
0
 internal void SetOwnerRow(FlowRow owner)
 {
     _OwnerRow = owner;
 }
示例#6
0
 internal void SetOwnerRow(FlowRow owner)
 {
     _OwnerRow = owner;
 }