Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
Neb3; @ s d Z dZddlmZ ddlT ddlmZ ddlmZ ddl m
Z
ddlmZm
Z
mZmZ e
jfd d
ZG dd deZdd
lmZ G dd deZde
jdi fddZde
jdi fddZdddZedkr
edd ddlZeejdkrejd ZndZeedd dS )z3.3.0zRender Drawing objects within others PDFs or standalone
Usage::
import renderpdf
renderpdf.draw(drawing, canvas, x, y)
Execute the script to see some test drawings.
changed
)BytesIO)*)Canvas)stringWidth) rl_config)Renderer
getStateDeltarenderScaledDrawingSTATE_DEFAULTSc C s" t }|jt| ||||d dS )z
As it says)showBoundaryN)_PDFRendererdrawr )drawingZcanvasxyr R r =/tmp/tmp4i9tl1d3/lib64/python/reportlab/graphics/renderPDF.pyr
s r
c @ s e Zd ZdZdd Zdd Zdd Zdd Zd
d Zdd
Z dd Z
dd Zdd Zdd Z
dd Zdd Zdd Zdd Zdd Zd S )!r zThis draws onto a PDF document. It needs to be a class
rather than a function, as some PDF-specific state tracking is
needed outside of the state info in the SVG model.c C s d| _ d| _d S )Nr )_stroke_fill)selfr r r __init__% s z_PDFRenderer.__init__c C sl t |to|js| jj t|}| jj| | j|i | j | | jj
t |to\|jsh| jj dS )zEThis is the recursive method called for each node
in the treeN)
isinstanceZPath
isClipPath_canvasZ saveStater _trackerpushapplyStateChangesZdrawNodeDispatcherpopZrestoreState)r nodeZdeltasr r r drawNode) s
z_PDFRenderer.drawNodec C sn |j |j kodkn rB| jj|j|j|j|j| j| j d n(| jj
|j|j|j|j|j | j | jd d S )Nr )strokefill)r" r! )rxryr rectr r widthheightr r Z roundRect)r r% r r r drawRect= s z_PDFRenderer.drawRectc C sB |j }|r>t|ds"tj j|j r>| jj||j|j|j|j d S )Nmode)
pathhasattrosexistsr ZdrawInlineImager r r&