%PDF- %PDF-
Direktori : /lib/python3/dist-packages/reportlab/pdfgen/__pycache__/ |
Current File : //lib/python3/dist-packages/reportlab/pdfgen/__pycache__/pathobject.cpython-312.pyc |
� ��di � �8 � d Z dZddlmZ ddlmZ G d� d� Zy)z3.3.0z� PDFPathObject is an efficient way to draw paths on a Canvas. Do not instantiate directly, obtain one from the Canvas instead. Progress Reports: 8.83, 2000-01-13, gmcm: created from pdfgen.py � )�pdfgeom)�fp_strc �l � e Zd ZdZdd�Zd� Zd� Zd� Zd� Zd� Z dd �Z dd �Zd� Zd� Z dd �Zd� Zd� Zd� Zy)� PDFPathObjecta: Represents a graphic path. There are certain 'modes' to PDF drawing, and making a separate object to expose Path operations ensures they are completed with no run-time overhead. Ask the Canvas for a PDFPath with getNewPathObject(); moveto/lineto/ curveto wherever you want; add whole shapes; and then add it back into the canvas with one of the relevant operators. Path objects are probably not long, so we pack onto one line the code argument allows a canvas to get the operations appended directly so avoiding the final getCode Nc �B � |g f|d u | _ | j | _ y �N)�_code�_init_code_append�_code_append)�self�codes �=/usr/lib/python3/dist-packages/reportlab/pdfgen/pathobject.py�__init__zPDFPathObject.__init__ s$ � ��2�Y�t�t�|�,�� � �2�2��� c � � |j d� s|j d� sJ d� �| j j } |d� ||� || _ y )Nz mz rez%path must start with a moveto or rect�n)�endswithr �appendr )r �c�code_appends r r zPDFPathObject._init_code_append# sK � ��z�z�$��1�:�:�e�#4�]�6]�]�4��j�j�'�'���C���A��'��r c �8 � dj | j � S )z#pack onto one line; used internally� )�joinr �r s r �getCodezPDFPathObject.getCode* s � ��x�x�� � �#�#r c �@ � | j dt ||� z � y )Nz%s m�r r �r �x�ys r �moveTozPDFPathObject.moveTo. � � ����&�6�!�A�;�.�/r c �@ � | j dt ||� z � y )Nz%s lr r s r �lineTozPDFPathObject.lineTo1 r"