
    kh                     N    d Z ddlmZ ddlmZ ddlmZ ddlmZ  G d de      Z	y)	a  Column of Section.

In most cases, one section per page. But in case multi-columns page, sections are used
to distinguish these different layouts.

.. note::
    Currently, support at most two columns.

::

    {
        'bbox': (x0, y0, x1, y1),
        'blocks': [{
            ... # block instances
        }, ...],
        'shapes': [{
            ... # shape instances
        }, ...]
    }
   )
Collection)Layout)Shape)Linec                   2    e Zd ZdZed        ZdefdZd Zy)ColumnzColumn of Section.c                     | j                   S )N)bbox)selfs    R/var/www/teggl/fontify/venv/lib/python3.12/site-packages/pdf2docx/layout/Column.pyworking_bboxzColumn.working_bbox   s    #'99,    elementsc                     |D cg c]  }t        |t              s| }}|D cg c]  }t        |t              s| }}| j                  |       | j	                  |       yc c}w c c}w )z@Add candidate elements, i.e. lines or shapes, to current column.N)
isinstancer   r   assign_blocksassign_shapes)r   r   eblocksshapess        r   add_elementszColumn.add_elements#   s^    %=At)<!==%>Au)=!>>6"6" >>s   A$A$A)A)c                 :    | j                   j                  |       y)zrCreate Section Column in docx.

        Args:
            doc (Document): ``python-docx`` document object
        N)r   	make_docx)r   docs     r   r   zColumn.make_docx+   s     	c"r   N)	__name__
__module____qualname____doc__propertyr   r   r   r    r   r   r   r      s$    , ,#J ##r   r   N)
r   common.Collectionr   layout.Layoutr   shape.Shaper   	text.Liner   r   r    r   r   <module>r%      s$   * + "  #V #r   