%PDF- %PDF-
Direktori : /lib/python3/dist-packages/reportlab/lib/__pycache__/ |
Current File : //lib/python3/dist-packages/reportlab/lib/__pycache__/codecharts.cpython-312.pyc |
� ��d�2 � � � d Z dZddlZddlmZ ddlmZ ddlmZm Z ddl mZmZm Z ddlmZ dd lmZ dd lmZ ddd dd�Z G d� de� Z G d� de� Z G d� de� Z G d� de� Zd� Z G d� de� Zd� Zedk( r e� yy)z3.3.0aL Routines to print code page (character set) drawings. Predates unicode. To be sure we can accurately represent characters in various encodings and fonts, we need some routines to display all those characters. These are defined herein. The idea is to include flowable, drawable and graphic objects for single and multi-byte fonts. � N)�Canvas)�Flowable)� pdfmetrics�cidfonts)�Group�String�Rect)�Widget)�colors)�int2Byte�winansi�macroman� macexpert�pdfdoc)�WinAnsiEncoding�MacRomanEncoding� MacExpert�PDFDocc �* � e Zd ZdZd� Zd� Zd� Zdd�Zy)� CodeChartBasezrBasic bits of drawing furniture used by single and multi-byte versions: ability to put letters into boxes.c �T � | j dz | j z }|t |� k( rt |� | _ nt |� dz | _ | j d| j z z | _ | j d| j z z | _ g | _ t | j dz � D ]* }| j j || j z � �, g | _ t | j dz � D ]* }| j j || j z � �, y)z&Work out x and y positions for drawingg �?� � N)� codePoints�charsPerRow�int�rows�boxSize�width�height�ylist�range�append�xlist)�selfr �row�cols �:/usr/lib/python3/dist-packages/reportlab/lib/codecharts.py� calcLayoutzCodeChartBase.calcLayout# s� � � ����$�t�'7�'7�7���3�t�9���D� �D�I��D� �A� �D�I��\�\�Q�t�'7�'7�%7�8�� ��l�l�a�� � �k�2��� �� �����Q��'� 2�C��J�J���c�D�L�L�0�1� 2��� ���)�)�A�-�.� 2�C��J�J���c�D�L�L�0�1� 2� c �. � | j rd|z S d|z S )N�%02Xz%d)�hex)r% �byts r( � formatBytezCodeChartBase.formatByte8 s � ��8�8��C�<���#�:�r* c �� � | j | j z t |� z }t |� D ] }|j d� � d}d}| j j | j | j dz � |D �] }|��| j j d� | j j d|z | j z | j |z dz | j z | j | j dd�� | j j d� nK | j j |dz | j z | j |z d z | j z |� |dz }|| j k( s��|dz }d}�� y# | j j d� | j j d|z | j z | j |z dz | j z | j | j dd�� | j j |dz | j z | j |z d z | j z d � | j j d� Y ��xY w)z]Fills boxes in order. None means skip a box. Empty boxes at end get filled with grayNr � �?g�������?r ��stroke�fill� � �?g �?�?)r r �lenr"