예제 #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);
        }
예제 #3
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);
                    }
                }
            }
        }
예제 #4
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;
        }
예제 #5
0
 internal void SetOwnerRow(FlowRow owner)
 {
     _OwnerRow = owner;
 }
예제 #6
0
 internal void SetOwnerRow(FlowRow owner)
 {
     _OwnerRow = owner;
 }