Ejemplo n.º 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);
                    }
                }
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
                    }
                }
            }
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 5
0
 internal void SetOwnerRow(FlowRow owner)
 {
     _OwnerRow = owner;
 }
Ejemplo n.º 6
0
 internal void SetOwnerRow(FlowRow owner)
 {
     _OwnerRow = owner;
 }