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„ deƒZdd
lmZ G dd„ deƒZde
jdi fdd„Zde
jdi fdd„Zddd„Zedk�r
edd� ddlZeejƒdkrúejd ZndZeedd� dS )z3.3.0z¼Render 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Ú
getStateDeltaÚrenderScaledDrawingÚSTATE_DEFAULTSc C s" t ƒ }|jt| ƒ||||d� dS )z
As it says)ÚshowBoundaryN)Ú_PDFRendererÚdrawr )ÚdrawingZcanvasÚxÚyr Ú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 z±This 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 |tƒo|js| jjƒ t|ƒ}| jj|ƒ | j|i ƒ | j |ƒ | jj
ƒ t |tƒo\|jsh| jjƒ dS )zEThis is the recursive method called for each node
in the treeN)Ú
isinstanceZPathÚ
isClipPathÚ_canvasZ saveStater Ú_trackerÚpushÚapplyStateChangesZdrawNodeDispatcherÚpopZrestoreState)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 )ÚstrokeÚfill)r" r! )ÚrxÚryr Úrectr r ÚwidthÚheightr r Z roundRect)r r% r r r ÚdrawRect= s z_PDFRenderer.drawRectc C sB |j }|r>t|dƒs"tj j|j ƒr>| jj||j|j|j|j ƒ d S )NÚmode)
ÚpathÚhasattrÚosÚexistsr ZdrawInlineImager r r&