Exemplo n.º 1
0
        private void BuildCellCorners(TableWriter tb, CellInfo cell)
        {
            var pos  = cell.Position;
            var size = cell.CellSize;

            tb.AddConnection(pos.Height, pos.Width, BorderConnection.Up | BorderConnection.Left);
            tb.AddConnection(pos.Height, pos.Width + size.Width - 1, BorderConnection.Up | BorderConnection.Right);
            tb.AddConnection(pos.Height + size.Height - 1, pos.Width, BorderConnection.Down | BorderConnection.Left);
            tb.AddConnection(pos.Height + size.Height - 1, pos.Width + size.Width - 1, BorderConnection.Down | BorderConnection.Right);
        }
Exemplo n.º 2
0
        private void BuildCellWalls(TableWriter tb, CellInfo cell)
        {
            var pos  = cell.Position;
            var size = cell.CellSize;

            for (var i = 1; i < size.Height - 1; i++)
            {
                tb.AddConnection(i + pos.Height, pos.Width, BorderConnection.Vertical);
                tb.AddConnection(i + pos.Height, pos.Width + size.Width - 1, BorderConnection.Vertical);
            }
            for (var i = 1; i < size.Width - 1; i++)
            {
                tb.AddConnection(pos.Height, i + pos.Width, BorderConnection.Horizontal);
                tb.AddConnection(pos.Height + size.Height - 1, i + pos.Width, BorderConnection.Horizontal);
            }
        }