%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/reportlab/platypus/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/reportlab/platypus/__pycache__/para.cpython-312.pyc |
� ��dIk � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z dZdZdZ ddlmZmZmZmZ G d � d � Zd� Zd� Zdd lmZ d� Zd� Zd� Zefd�Zd� Z G d� d� Z G d� d� Zdddddddddd d!d"d#d$� Z G d%� d&e� Z d'� Z!dmd)�Z" G d*� d+e� Z# G d,� d-� Z$ G d.� d/� Z% G d0� d1e%� Z& G d2� d3e%� Z' G d4� d5e'� Z( G d6� d7e'� Z) G d8� d9e%� Z* G d:� d;� Z+d<� Z,dmd=�Z-dnd>�Z. G d?� d@� Z/ e/� Z0 G dA� dBe/� Z1 G dC� dDe1� Z2 G dE� dFe1� Z3dG� Z4dHZ5dIZ6dJ� Z7 e1dK� Z8dLdMdNdOdPefdQe fdRdSg e4dT� z dUe8fgz e4dV� z dWe8fdXdPefdYdQe fdRdSgz e4dZ� z dXdPefd[d\dRdSdLd]gz e4d^� z dUe0fgz e4d_� z dWe0fd`dadbdcdddbd`dedbdfdMdgdXdPefdhdidRdSgz e4dj� z dfdXgz Z9dk� Z:e;dlk( r e:� y(y()oa! new experimental paragraph implementation Intended to allow support for paragraphs in paragraphs, hotlinks, embedded flowables, and underlining. The main entry point is the function def Paragraph(text, style, bulletText=None, frags=None) Which is intended to be plug compatible with the "usual" platypus paragraph except that it supports more functionality. In this implementation you may embed paragraphs inside paragraphs to create hierarchically organized documents. This implementation adds the following paragraph-like tags (which support the same attributes as paragraphs, for font specification, etc). - Unnumberred lists (ala html):: <ul> <li>first one</li> <li>second one</li> </ul> Also <ul type="disc"> (default) or <ul type="circle">, <ul type="square">. - Numberred lists (ala html):: <ol> <li>first one</li> <li>second one</li> </ol> Also <ul type="1"> (default) or <ul type="a">, <ul type="A">. - Display lists (ala HTML): For example <dl bulletFontName="Helvetica-BoldOblique" spaceBefore="10" spaceAfter="10"> <dt>frogs</dt> <dd>Little green slimy things. Delicious with <b>garlic</b></dd> <dt>kittens</dt> <dd>cute, furry, not edible</dd> <dt>bunnies</dt> <dd>cute, furry,. Delicious with <b>garlic</b></dd> </dl> ALSO the following additional internal paragraph markup tags are supported <u>underlined text</u> <a href="http://www.reportlab.com">hyperlinked text</a> <a href="http://www.reportlab.com" color="blue">hyperlinked text</a> <link destination="end" >Go to the end (go to document internal destination)</link> <link destination="start" color="cyan">Go to the beginning</link> <setLink destination="start" color="magenta">This is the document start (define document destination inside paragraph, color is optional)</setLink> � ��stringWidth)�fp_str)�Flowable��colors)� _baseFontNameg�h㈵��>)�TA_LEFT� TA_CENTER�TA_RIGHT� TA_JUSTIFYc �h � e Zd Zdd�ZdZd� Zd� Zdd�Zd� Zd� Z d � Z d � Zd� Zd� Z d � Zd� Zd� Zd� Zy)�paragraphEngineNc �� � ddl m} |�g }g | _ || _ dx| _ | _ d| _ d| _ d| _ d| _ || _ dx| _ x| _ | _ ddlm} || _ g | _ y )Nr ��black� � Helvetica� � )r )�reportlab.lib.colorsr �lineOpHandlers�program�indent�rightIndent� baseindent�fontName�fontSize�leading� fontColor�x�y�rise�reportlab.lib.enumsr � alignment�textStateStack)�selfr r r s �9/usr/lib/python3/dist-packages/reportlab/platypus/para.py�__init__zparagraphEngine.__init__W sw � �.��?��G� ������),�,���d�&����#�� ��� �������&)�)���)���$�)�/� ��� ��� ) r r r r r r r r# r% c � � g }| j D ] }t | |� }|j |� �! | j |gz | _ |S �N)�TEXT_STATE_VARIABLES�getattr�appendr&