%PDF- %PDF-
Mini Shell

Mini Shell

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

�

��d[D����dZdZddlmZmZmZmZmZmZm	Z	ddl
mZmZddl
mZddlmZddlmZmZmZddlmZ	Gd	�d
e�Zd�Zedd
eeeed�eed�ee	d�eed�eed�eed�eed�eed�eed�eed�eed��eed��eed��eed����ddgd ��!�Zed"d#eed$�%�d&d'd(d)g�!�Zed*d+ee�,�d&d-�Zed.d/eeeed���0�d1d2�Zed3d4eeeed���0�d1d5�Zed6d7ee�,�d8d9�Zed:d;ee�,�d8d<�Zed=d>ee�,�dd�Z ed?d@ee�,�ddA�Z!edBdCeeeedD��E�ddF�Z"edGdHeeeedI�eedJ�eedK�eedL�eedM�eedN�eed��eed��eed���O�
dPdQ�Z#edRdSeeeedT�eedU�eedV�eedW�eed��eed��eed���X�dPdY�Z$edRdZeeeed[�eed\�eed��eed��eed]��eed^��eed��eed_��eed`��eeda���b�dcdddedf�g�Z%edhdhed�idie�djeedk���dleedm���d_eedn���doeedp���dqeeeef�dr���dsedtdu���dvedtdu���dwedtdu���dxedtdu���dyedtdu���dzedtdu���d{edtdu���d|edtdu���d}edtd~���dedtd~���d�edtd~���d�edtd~���d�edtd~���d�edtd~���d�edtd~���d�edtd~���d�edtd~���d�edtd~���d�edtd~����d�d��Z&e'd�k(re(d���yt)�z3.3.0)�BarcodeI2of5�BarcodeCode128�BarcodeStandard93�BarcodeExtended93�BarcodeStandard39�BarcodeExtended39�
BarcodeMSI�BarcodeCodabar�
BarcodeCode11�
BarcodeFIM�BarcodePOSTNET�BarcodeUSPS_4State�)�isInt�isNumber�isString�
isColorOrNone�	isBoolean�EitherOr�isNumberOrNone)�AttrMap�AttrMapValue)�black)�rl_exec)�Rect�Group�String)�PlotAreac� �eZdZeeeed��eed��eed��eee	ef�d��eed��ee
�ee	d��edd	��ee	d
��edd��eed���
�Ze
xZZdZdZdZdd�Zd�Zd�Zdd�Zy)�_BarcodeWidgetzColor of bar borders.��desczColor of bar interior areas.zWidth of bar borders.�Value.zColor of human readable text.zvalidated form of inputNzencoded form of inputzdecomposed form of inputz%temporarily used for internal methodszWidth of inter character gaps.)�BASE�barStrokeColor�barFillColor�barStrokeWidth�value�	textColor�valid�	validated�encoded�
decomposed�canv�gaprc��tj|�d|jvr
|jd=d|jvr
|jd=dx|_|_|jd|�|jj|fi|��y)N�width�heightrr')r�__init__�__dict__�x�y�
setdefault�_BCC)�self�_value�kws   �D/usr/lib/python3/dist-packages/reportlab/graphics/barcode/widgets.pyr2z_BarcodeWidget.__init__>ss�����$���d�m�m�#����w�)?��t�}�}�$�$�-�-��*A�������
�
�
�g�f�%���	�	���4�%�"�%�c��d|jfd|jfd|jffD]\}}|j||��|j	t|j|z|j|z||fi|���y)N�strokeColor�strokeWidth�	fillColor)r$r&r%r6�_Gaddrr4r5)r8r4r5�w�hr:�k�vs        r;�rectz_BarcodeWidget.rectFs���#�4�#6�#6�7�"�4�#6�#6�7� ��!2�!2�3�5�	�C�A�a�
�M�M�!�A��	�	
�
�
�4����q�������!�A�4��4�5r<c�v�|js"td|jjz��||_t�}|j|_|jt|j|j|j|jddd���|jj|�|`|`|S)Nz!Abstract class %s cannot be drawng-C��6?)r@r>r?)r7�NotImplementedError�	__class__�__name__r-r�addrArr4r5r0r1�draw)r8�Gs  r;rLz_BarcodeWidget.drawOs����y�y� 3�4W�Z^�Zh�Zh�Zq�Zq�4q� r�r���	��G���U�U��
��
�
�4����t�v�v�d�j�j����t�X\�io�p�q��	�	���t���I�t�z��r<c��|jt|j|z|j|z|||||j���y)N)�fontName�fontSize�
textAnchorr@)rArr4r5r()r8r4r5�textrOrP�anchors       r;�annotatez_BarcodeWidget.annotateYs:���
�
�6�$�&�&��(�4�6�6�!�8�D�(�H�'-����H�	Ir<)�)�middle)rJ�
__module__�__qualname__rrrrrrrrr�_attrMaprr(r%r$r&r7r2rFrLrT�r<r;rr+s����H�%�m�:Q�R�#�M�8V�W�%�h�5L�M��X�x��&9�:��J� ��5T�U��Y�'� ��/H�I��t�)@�A�!�(�0J�K��D�&M�N��>�0P�Q�
�H� %�$�I���N��N��D�&�6��Ir<rc�b�|jdd�}|jdd�}d|z}t�j�}	d|�d|��}
t|
|	�t|	d<|rd|znd|	d	<d
|	z}
t|
|	�|	|}|r||_|j
�D]\}}
t|||
��|S)zfactory for Barcode Widgets�	_pre_initrU�_methods�Barcodezfrom z import rz

	'''%s'''�docz�class %(name)s(_BarcodeWidget,%(codeName)s):%(doc)s
	_BCC = %(codeName)s
	codeName = %(codeName)r
	def __init__(self,**kw):%(_pre_init)s
		_BarcodeWidget.__init__(self,%(value)r,**kw)%(_methods)s)�pop�vars�copyrrrY�items�setattr)r_�codeName�attrMap�modr'�kwdsr\r]�name�ns�code�KlassrDrEs              r;�_BCWrm]s�������R�(�I��x�x�
�2�&�H��X��D�	
�����B�"%�h�/�D��D���)�B���*-��#�%�2�B�u�I�@�CE�	E�D�
�D����t�H�E������
�
�����1���a�����Lr<a�Interleaved 2 of 5 is used in distribution and warehouse industries.

    It encodes an even-numbered sequence of numeric digits. There is an optional
    module 10 check digit; if including this, the total length must be odd so that
    it becomes even after including the check digit.  Otherwise the length must be
    even. Since the check digit is optional, our library does not check it.
    �I2of5z(float, default .0075):
            X-Dimension, or width of the smallest element
            Minumum is .0075 inch (7.5 mils).z�(float, default 2.2):
            The ratio of wide elements to narrow elements.
            Must be between 2.0 and 3.0 (or 2.2 and 3.0 if the
            barWidth is greater than 20 mils (.02 inch))zb(float or None, default None):
            width of intercharacter gap. None means "use barWidth".z�(float, see default below):
            Height of the symbol.  Default is the height of the two
            bearer bars (if they exist) plus the greater of .25 inch
            or .15 times the symbol's length.zM(bool, default 1):
            Whether to compute and include the check digita0(float, in units of barWidth. default 3.0):
            Height of bearer bars (horizontal bars along the top and
            bottom of the barcode). Default is 3 x-dimensions.
            Set to zero for no bearer bars. (Bearer bars help detect
            misscans, so it is suggested to leave them on).z>(bool, default 0):
            if True turn bearers into a boxzL(bool, default 1):
            Whether to include quiet zones in the symbol.z�(float, see default below):
            Quiet zone size to left of code, if quiet is true.
            Default is the greater of .25 inch, or .15 times the symbol's
            length.z`(float, defaults as above):
            Quiet zone size to right left of code, if quiet is true.zhuman readable fontr zhuman readable font sizezif human readablez(if we use start/stop symbols (default 1))r#�barWidth�ratior.�	barHeight�checksum�bearers�	bearerBox�quiet�lquiet�rquietrOrP�
humanReadable�stopz!reportlab.graphics.barcode.commoni�)�12�1234�123456�12345678�
1234567890)�_testszECode 128 encodes any number of characters in the ASCII character set.�Code128)rsrrrprrry)r#�UNWANTEDz"reportlab.graphics.barcode.code128zAB-12345678zReportLab Rocks!�PFWZFz%Modified Code128 to use auto encoding�Code128Auto)r#�
XY149740345GBz$This is a compressed form of Code 39�
Standard93)r#ryz!reportlab.graphics.barcode.code93zCODE 93zEThis is a compressed form of Code 39, allowing the full ASCII charset�
Extended93zL@@K! Code 93 ;-)z�Code39 is widely used in non-retail, especially US defence and health.
                        Allowed characters are 0-9, A-Z (caps only), space, and -.$/+%*.�
Standard39z!reportlab.graphics.barcode.code39z
A012345B%Rz�Extended 39 encodes the full ASCII character set by encoding
                        characters as pairs of Code 39 characters; $, /, % and + are used as
                        shift characters.�
Extended39z	A012345B}z�MSI is used for inventory control in retail applications.

                There are several methods for calculating check digits so we
                do not implement one.
                �MSIz~Used in blood banks, photo labs and FedEx labels.
                    Encodes 0-9, -$:/.+, and four start/stop characters A-D.�Codabar�A012345BzfUsed mostly for labelling telecommunications equipment.
                    It encodes numeric digits.�Code11aU(integer, default 2):
                            Whether to compute and include the check digit(s).
                            (0 none, 1 1-digit, 2 2-digit, -1 auto, default -1):
                            How many checksum digits to include. -1 ("auto") means
                            1 if the number of digits is 10 or less, else 2.)r#rr�01234545634563a�
                FIM was developed as part of the POSTNET barcoding system.
                FIM (Face Identification Marking) is used by the cancelling machines
                to sort mail according to whether or not they have bar code
                and their postage requirements. There are four types of FIM
                called FIM A, FIM B, FIM C, and FIM D.

                The four FIM types have the following meanings:
                    FIM A- Postage required pre-barcoded
                    FIM B - Postage pre-paid, no bar code exists
                    FIM C- Postage prepaid prebarcoded
                    FIM D- Postage required, no bar code exists�FIMz'(float, default 1/32in): the bar width.zp(float or None, default 1/16in):
                        width of intercharacter gap. None means "use barWidth".z'(float, default 5/8in): The bar height.zX(bool, default 0):
                        Whether to include quiet zones in the symbol.ze(float, default: 15/32in):
                        Quiet zone size to left of code, if quiet is true.zh(float, default 1/4in):
                        Quiet zone size to right left of code, if quiet is true.)
r#ro�
spaceWidthrqrurvrwrOrPrxzreportlab.graphics.barcode.usps�ArU�POSTNETz)(float, default 0.018*in): the bar width.z?(float or None, default 0.0275in): width of intercharacter gap.z.(float, default 0.05in): The short bar height.z.(float, default 0.125in): The full bar height.)r#ror��shortHeightrqrOrPrxz
78247-1043�USPS_4StatezB(float, default 1): the bar width size adjustment between 0 and 1.zC(float, default 1): the bar height size adjustment between 0 and 1.z
tracking datazrouting datarorq�pitch)r#�	widthSize�
heightSizerOrP�tracking�routingrxrorqr�z!reportlab.graphics.barcode.usps4s�01234567094987654321z*
		kw.setdefault('routing','01234567891')
z�
	def annotate(self,x,y,text,fontName,fontSize,anchor='middle'):
		_BarcodeWidget.annotate(self,x,y,text,fontName,fontSize,anchor='start')
)r\r]�ECC200DataMatrixr#r4z3X position of the lower-left corner of the barcode.r5z3Y position of the lower-left corner of the barcode.zSize of data modules.r%zColor of data modules.r'r"r1N�ignoredr0r>r?r@�
background�debugr.�row_modulesz???�col_modules�row_regions�col_regions�cw_data�cw_ecc�row_usable_modules�col_usable_modulesr)r*r,z+reportlab.graphics.barcode.ecc200datamatrixz�JGB 0204H20B012722900021AC35B2100001003241014241014TPS01  WJ067073605GB185 MOUNT PLEASANT MAIL CENTER         EC1A1BB9ZGBREC1A1BB  EC1A1BB  STEST FILE       FOR SPEC                                       �__main__z!widgets.py has no script functionrZ))�__version__�__all__�reportlab.lib.validatorsrrrrrrr�reportlab.lib.attrmaprr�reportlab.lib.colorsr�reportlab.lib.utilsr�reportlab.graphics.shapesrrr�reportlab.graphics.charts.areasrrrmrr�BarcodeCode128Autorrrrrr	r
rrr
�BarcodeECC200DataMatrixrJ�
ValueErrorrZr<r;�<module>r�sk��
��

��s�r�r�7�&�'�9�9�4��"0I�X�0I�d�,�������*1�2��X�'<�=��>�+G�H� ��+1�2� �	�+>�?��x�)?�@�
!��,/�0��Y�(=�>��h�(��
�h�(H�I���/D�E���/I�J�$�Y�5H�I��I�,V�W�I%
�L(��
�c8��t�a���\�3c�d�4��,�g�6����7���^�,�4�����A�$��^�'3�I�Dn�'o�"�<�!�
���b�$��^�'3�I�Dn�'o�"�<�+�
���\�$��\�2�;�$����-�%��\�2�;�#�
����
��\�*�3��	�
��P����.�7�����2����#/��7P�$Q��8�$��
��C���^�+�H�5b�c�!-�h�8S�"T� ,�X�6c� d�(��4I�J�)�(�4N�O�)�(�4T�U�+�H�;P�Q�+�H�;U�V�$0��AT�$U��2��;�
�@�B����'3�H�=l�'m�)5�h�@E�*F�*6�x�@t�*u�(4�X�>r�(s�'3�H�CX�'Y�'3�H�C]�'^�,8��I\�,]��6� �
����%��^�(4�X�?G�)H�)5�h�@I�*J�'3�H�CX�'Y�'3�H�C]�'^�'3�H�?�'S�&2�8�.�&Q�,8��I\�,]�'3�H�:�'N�(4�X�K�(P�$0���$H��<�.�"R�$w�#��&�������
�x�&[�
\��
�x�&[�
\���h�-D�E��"�-�6N�O�	�
�8�X�h�$7�8�x�H���D�y�1�
��4�i�0��!��I�6��!��I�6���t�)�4�� ��9�5���4�i�0��
��I�.��!��E�2��!��E�2�� !��E�2�!�"!��E�2�#�$�T��.�%�&�D�u�-�'�(*�$�U�;�)�**�$�U�;�+�,�T��.�-�.!��E�2�/�0"�$�U�3�1�42�S�=��B�Z��
�8�
9�9�r<

Zerion Mini Shell 1.0