%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/reportlab/lib/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/reportlab/lib/__pycache__/styles.cpython-312.pyc

�

׸�eOC��\�dZdZdZddlmZddlmZmZmZm	Z	ddl
mZddlm
ZmZmZmZmZmZmZmZmZmZ m!Z"m#Z$m%Z&eedd�Z'eedd�Z(eedd�Z)Gd	�d
�Z*Gd�de*�Z+e,eeeee	�
�fd�Z-Gd�de*�Z.Gd�de*�Z/e0�Z1Gd�d�Z2d�Z3d�Z4y)z3.3.0a�Classes for ParagraphStyle and similar things.

A style is a collection of attributes, but with some extra features
to allow 'inheritance' from a parent, and to ensure nobody makes
changes after construction.

ParagraphStyle shows all the attributes available for formatting
paragraphs.

getSampleStyleSheet()  returns a stylesheet you can use for initial
development, with a few basic heading and text styles.
)�PropertySet�ParagraphStyle�
str2alignment�	LineStyle�	ListStyle�StyleSheet1�getSampleStyleSheet�)�black)�TA_LEFT�	TA_CENTER�TA_RIGHT�
TA_JUSTIFY)�tt2ps)
�canvas_basefontname�underlineWidth�underlineOffset�underlineGap�strikeWidth�strikeOffset�	strikeGap�spaceShrinkage�platypus_link_underline�hyphenationLang�hyphenationMinWordLength�uriWasteReduce�embeddedHyphenation�c�:�eZdZiZdd�Zd�Zd�Zd�Zd	d�Zdd�Z	y)
rNc��d|jvsJd��d|jvsJd��|rN|j|jk(s5Jd|jj�d|jj����||_||_|j
j
|j�|j�|jdi|��y)	z�When initialized, it copies the class defaults;
        then takes a copy of the attributes of the parent
        if any.  All the work is done in init - styles
        should cost little to use at runtime.�namez1Class Defaults may not contain a 'name' attribute�parentz3Class Defaults may not contain a 'parent' attributez
Parent style z# must have same class as new style N�)	�defaults�	__class__�__name__r r!�__dict__�update�refresh�_setKwds)�selfr r!�kws    �6/usr/lib/python3/dist-packages/reportlab/lib/styles.py�__init__zPropertySet.__init__6s����T�]�]�*�_�,_�_�*��t�}�}�,�c�.c�c�,���#�#�t�~�~�5�
d�qw�rB�rB�rK�rK�LP�LZ�LZ�Lc�Lc�8d�
d�5���	�����
�
���T�]�]�+�
	
������
�
����c�R�|j�D]\}}||j|<�y�N)�itemsr&)r*r+�key�values    r,r)zPropertySet._setKwdsLs)���(�(�*�	(�J�C��"'�T�]�]�3�
�	(r.c�P�d|jj�d|j�d�S)N�<z 'z'>)r$r%r �r*s r,�__repr__zPropertySet.__repr__Qs��"�n�n�5�5�t�y�y�A�Ar.c��|jrA|jjj�D]\}}|dvs�||j|<�yy)z�re-fetches attributes from the parent on demand;
        use if you have been hacking the styles.  This is
        used by __init__)r r!N)r!r&r1)r*r2r3s   r,r(zPropertySet.refreshTsM���;�;�"�k�k�2�2�8�8�:�
/�
��U��0�0�).�D�M�M�#�&�
/�r.c�~�t|dz|j�t|dz|j�t|jj��}|j
�|jd�|jd�|D]1}|jj|d�}t||�d|��z��3y)Nzname =zparent =r r!z = )	�printr r!�listr&�keys�sort�remove�get)r*�indent�keylistr2r3s     r,�	listAttrszPropertySet.listAttrs]s���
�f�x�����+�
�f�z�!�4�;�;�/��t�}�}�)�)�+�,���������v�����x� ��	5�C��M�M�%�%�c�4�0�E��&��U�3�3�4�	5r.c��|j||�}|jj�|_||_|duxr|xs||_|j
di|��|S)Nr")r$r&�copyr r!r))r*r r!�kwds�rs     r,�clonezPropertySet.clonehsX���N�N�4��'���]�]�'�'�)��
�����T�>�*�d�4�f�����
�
��T���r.r0)�)
r%�
__module__�__qualname__r#r-r)r7r(rBrGr"r.r,rr3s&���H��,(�
B�/�	5�r.rc���eZdZide�dd�dd�dd�dd�d	d�d
e�dd�dd�d
e�dd�dd�de�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�de�dd �d!d�d"d�d#e�d$e�d%e	�d&e
�d'e�d(e��e
ddeeed)��Zy)*r�fontName�fontSize�
�leading��
leftIndentr	�rightIndent�firstLineIndent�	alignment�spaceBefore�
spaceAfter�bulletFontName�bulletFontSize�bulletIndent�	textColor�	backColorN�wordWrap�borderWidth�
borderPadding�borderColor�borderRadius�allowWidowsr�allowOrphans�
textTransform�endDots�splitLongWordsr�bulletAnchor�start�justifyLastLine�
justifyBreaksrrrrrr)�
linkUnderline�underlineColor�strikeColorrrr)r%rIrJ�
_baseFontNamerr
�_baseUnderlineWidth�_spaceShrinkage�_baseStrikeWidth�_baseUnderlineOffset�_baseUnderlineGap�_baseStrikeOffset�_baseStrikeGap�_platypus_link_underline�_hyphenationLang�_embeddedHyphenation�_uriWasteReducer#r"r.r,rrps���0
��=�0
��2�0
�	�"�0
�	�Q�	0
�
	�a�0
�	�!�
0
�	�G�0
�	�a�0
�	�Q�0
�	��0
�	��0
�	�q�0
�	�U�0
�	�D�0
� 	�4�!0
�(	�q�)0
�*	��+0
�,	�t�-0
�.	��/0
�0	�q�10
�2	��30
�4	��50
�6	�$�70
�<	��=0
�>	�-�?0
�@	��A0
�B	�1�C0
�D	��E0
�F	�/�G0
�H	�'�I0
�J	�/�K0
�L	�)�M0
�N	�)�O0
�P	�^�Q0
�R2� ��+�3�)�_0
�Hr.r)�centre�center�left�right�justifyc�f�|j|j�d�}|�|St|�d���)Nz is illegal value for alignment)r?�lower�
ValueError)�v�__map__�_s   r,rr�s7��
���A�G�G�I�d�+�A��}��� �A�5�(G�!H�I�Ir.c��eZdZded�Zd�Zy)rr)�width�colorc�&�|jd�y)zKYou can ask a LineStyle to set up the canvas for drawing
        the lines.rN)�setLineWidth)r*�canvass  r,�
prepareCanvaszLineStyle.prepareCanvas�s��	���A�r.N)r%rIrJr
r#r�r"r.r,rr�s����
�H�r.rc�4�eZdZeddddedddddd	d	�
�Zy	)r�r	r{�1�	HelveticarP�auto�ltrN)rQrR�bulletAlign�
bulletType�bulletColorrWrX�
bulletOffsetY�bulletDedent�	bulletDir�bulletFormatrg)r%rIrJ�dictr
r#r"r.r,rr�s0�����"��!�*�!��#��!��
�Hr.rc�@�eZdZdZd�Zd�Zefd�Zd�Zd�Z	d
d�Z
d	�Zy)raG
    This may or may not be used.  The idea is to:
    
    1. slightly simplify construction of stylesheets;
    
    2. enforce rules to validate styles when added
       (e.g. we may choose to disallow having both
       'heading1' and 'Heading1' - actual rules are
       open to discussion);
       
    3. allow aliases and alternate style lookup
       mechanisms
       
    4. Have a place to hang style-manipulation
       methods (save, load, maybe support a GUI
       editor)
   
    Access is via getitem, so they can be
    compatible with plain old dictionaries.
    c� �i|_i|_yr0)�byName�byAliasr6s r,r-zStyleSheet1.__init__�s�������r.c��	|j|S#t$r.	|j|cYS#t$rtd|z��wxYwwxYw)Nz"Style '%s' not found in stylesheet)r��KeyErrorr��r*r2s  r,�__getitem__zStyleSheet1.__getitem__�s_��	K��<�<��$�$���	K�
K��{�{�3�'�'���
K��C�c�I�J�J�
K��	K�s��	A�,�A�A�Ac�D�	||S#t$r|tk7r|cYS�wxYwr0)r��_stylesheet1_undefined)r*r2�defaults   r,r?zStyleSheet1.get�s0��	���9����	��.�.�w���	�s���c�>�||jvxs||jvSr0)r�r�r�s  r,�__contains__zStyleSheet1.__contains__�s���d�l�l�"�8�c�T�[�[�&8�8r.c�
�||vSr0r"r�s  r,�has_keyzStyleSheet1.has_key�s���d�{�r.Nc�B�|j}||jvrtd|z��||jvrtd|z��|r8||jvrtd|z��||jvrtd|z��||j|<|r||j|<yy)Nz(Style '%s' already defined in stylesheetz1Style name '%s' is already an alias in stylesheetz1Alias name '%s' is already an alias in stylesheet)r r�r�r�)r*�style�aliasr2s    r,�addzStyleSheet1.add�s����j�j���$�+�+���E��K�L�L��$�,�,���N�QT�T�U�U������#��I�E�Q�R�R�����$��R�UZ�Z�[�[� ����C���"'�D�L�L���r.c�T�t|jj��}|j�i}t|jj��D]
\}}|||<�|D]>\}}|j|d�}t
||�|jd�t
��@y)Nz    )r;r�r1r=r�r?r:rB)r*�styles�aliir�r�r s      r,r;zStyleSheet1.lists����d�k�k�'�'�)�*�����
���"�4�<�<�#5�#5�#7�8�	 �N�U�E��D��K�	 �#�	�M�T�5��H�H�U�D�)�E��$����O�O�F�#��G�		r.r0)r%rIrJ�__doc__r-r�r�r?r�r�r�r;r"r.r,rr�s0���*�K�4��9��(�"
r.rc���tdd�}t|_d|_d|_|j�t
�td|�}d|_|j�||fS)N�NormalrPg������,@�Literal�Courier)rrmrLrMrOrBr:)�pNormal�pPres  r,�
testStylesr�s]���X�d�+�G�$�G���G���G�O�����	�G��)�W�-�D��D�M��N�N���D�=�r.c���t�}|jtdtdd���|jtd|dd���|jtd|dt�	��|jtd
|dt
ddd�
�d��|jtd|dt
ddtd��d��|jtd|dt
dddd��d��|jtd|dtdddd��d��|jtd|dtdddd��d��|jtd|dt
dddd��d ��|jtd!|dt
d"d#dd$��d%��|jtd&|dd'd(�)�d*��|jtd+|dd'd,d'dt�-�d.��|jtd/|dd0dd1d'd,d2�3��|jtd4d5dd'd6d7td8dd'd9d:d5d5�;�d<��|jtd=d5dd'd6d7td8dd'd9d:d5d5�;�d>��|S)?zReturns a stylesheet objectr�rNrP)r rLrMrO�BodyText�)r r!rU�Italic)r r!rL�Heading1r��)r r!rLrMrOrV�h1)r��Title)r r!rLrMrOrTrV�title�Heading2�)r r!rLrMrOrUrV�h2�Heading3�h3�Heading4��h4�Heading5�	g������%@��h5�Heading6�g������ @��h6�Bulletr	�)r r!rSrU�bu�
Definition�$)r r!rSrQrYrUrW�df�Coder�g������!@rH)r r!rLrMrOrSrQr�
UnorderedListNr{r�r�r�r�)r r!rQrRr�r�r�rWrXr�r�r�r�rg�ul�OrderedList�ol)
rr�rrm�_baseFontNameI�_baseFontNameBr�_baseFontNameBIrr
)�
stylesheets r,rr%s!����J��N�N�>�x�+8�+-�*,�.���N�N�>�z�)3�H�)=�./�1���N�N�>�x�)3�J�)?�-;�=��
�N�N�>�z�)3�H�)=�-;�+-�*,�-.�0��
���N�N�>�w�)3�H�)=�-;�+-�*,�,5�-.�
0�!��"��N�N�>�z�)3�H�)=�-;�+-�*,�.0�-.�
0�����N�N�>�z�)3�H�)=�-<�+-�*,�.0�-.�
0�����N�N�>�z�)3�H�)=�-<�+-�*,�.0�-.�
0�����N�N�>�z�)3�H�)=�-;�+,�*.�./�-.�
0�����N�N�>�z�)3�H�)=�-;�+,�*-�./�-.�
0�����N�N�>�x�)3�H�)=�23�./�1��	���N�N�>�|�)3�H�)=�23�-/�/0�./�1@�
B�����N�N�>�v�)3�H�)=�+4�+,�*-�23�-/�24�6�7��N�N�9�/�'+�+-�,-�,2�+.�,1�/:�/1�./�-3�*/�-1�&*�� �!��$�N�N�9�-�'+�+-�,-�,2�+.�,1�/:�/1�./�-3�*/�-1�&*�� �!��"�r.N)5�__version__r��__all__�reportlab.lib.colorsr
�reportlab.lib.enumsrrr
r�reportlab.lib.fontsr�reportlab.rl_configrrmrrnrrqrrrrrprrsrrtrrorrurrvr�_hyphenationMinWordLengthrrxrrwr�r�r�rrr�rrr�objectr�rr�rr"r.r,�<module>r�s���
��	��	
��'�H�H�%�L�L�L�L��}�Q�q�)���}�Q�q�)���
�a��*��;�;�z1
�[�1
�f!�&�&�"��(�	*�	J�������  ���K�K�Z�Lr.

Zerion Mini Shell 1.0