Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
Neb ã @ sˆ d Z ddlmZ ddlmZ ddlmZ ddlT ddlT ddl m
Z
G dd„ deƒZed kr„eƒ j
ƒ Zdd
lZejdgejƒ d
d� d
S )
z3.3.0é )ÚWidget)Úshapes)Úcolors)Ú*)ÚDrawingc @ s e Zd ZdZeeedd�eedd�eedd�eedd�eedd�eedd�eed d�eed
d�eedd�eedd�eed
d�eedd�eddd�ee dd�ee
dd�eedd�eedd�eeddƒdd�eeddddƒdd�d�Zd&dd„Z
d d!„ Zd"d#„ Zd$d%„ ZdS )'ÚTableWidgetz%A two dimensions table of labels
z x position of left edge of table)Údescz"y position of bottom edge of tableztable widthztable heightztable border colorztable fill colorzborder line widthz"table inner horizontal lines colorz table inner vertical lines colorz"table inner horizontal lines widthz table inner vertical lines widthzDash array for dividerLines.Nz6a list of list of strings to be displayed in the cellsz%location of the table anchoring pointztext font in the tablezfont size of the tablez
font colorÚleftÚrightzAlignment of text within cellsÚstartZmiddleÚendÚnumeric)ÚxÚyÚwidthÚheightÚborderStrokeColorÚ fillColorÚborderStrokeWidthÚhorizontalDividerStrokeColorÚverticalDividerStrokeColorÚhorizontalDividerStrokeWidthÚverticalDividerStrokeWidthÚdividerDashArrayÚdataÚ boxAnchorÚfontNameÚfontSizeÚ fontColorÚ alignmentÚ
textAnchoré
c K sÜ || _ || _d| _d| _tj| _d | _d| _tj| _ tj| _
d| _d| _d | _
ddddgdd d
dgdd
ddgg| _d| _d| _tj| _d| _d| _xD|jƒ D ]8\}}|t| jjjƒ ƒkrÆt| ||ƒ qœtd| j ƒ‚qœW d S )NéÈ éd g à?g Ð?ZNorthZSouthZEastZWestén éx é‚ ÚAÚBÚCÚDÚnwé r
r z&invalid argument supplied for class %s)r r r r r Zblackr r r r r r r r r r r r r r ÚitemsÚlistÚ __class__Ú_attrMapÚkeysÚsetattrÚ
ValueError)Úselfr r ÚkwÚkÚv© r8 úA/tmp/tmp4i9tl1d3/lib64/python/reportlab/graphics/widgets/table.pyÚ__init__) s, $zTableWidget.__init__c C sD t ddƒ}tƒ }|j|dd� d
|j_d|j_d |j_tj|j_ |S )z3 returns a sample of this widget with data
i� r" Útable)Únameé é é Nr )r= r> r? )
r r Úaddr; r r r r Zredr )r4 ÚdÚtr8 r8 r9 ÚdemoF s
zTableWidget.democ C s t jƒ }| js| jrNt j| j| j| j| jƒ}| j|_| j|_ | j
|_|j|ƒ | j
| jƒ}t| jƒ}t| jd ƒ}| jt|ƒ }| jt|ƒ }| jrøxbt|ƒD ]V}| j} | j| j }
| j|| }t j| ||
|ƒ}| j|_| j|_| j|_ |j|ƒ qžW | j�rfxdt|ƒD ]X}| j|| }
| j}| j| j }t j|
||
|ƒ}| j|_| j|_| j|_ |j|ƒ �q
W | jjƒ x¦t| jƒD ]˜\}}| j|| d| d| j }xlt|ƒD ]`\}}|�r®| j|| d| }
t j|
|t|ƒ| jd�}| j|_| j|_| j |_|j|ƒ �q®W �q|W |S )z# returns a group of shapes
r g à?)r )!r ÚGroupr r ZRectr r r r ZstrokeColorr ZstrokeWidthr@ ÚpreProcessDatar ÚlenÚfloatr ÚrangeZLiner ZstrokeDashArrayr r r ÚreverseÚ enumerater ÚStringÚstrr r r )r4 ÚgZrectr ZrowsÚcolsZrow_stepZcol_stepÚiÚx1Zx2r Úliner Úy1Úy2ÚjÚrowZdatumÚsr8 r8 r9 ÚdrawR sX
zTableWidget.drawc C s\ |sdggS t dd„ |D ƒƒ}x8t|ƒD ],\}}t|ƒ|k r(|jdg|t|ƒ ƒ q(W |S )zªpreprocess and return a new array with at least one row
and column (use a None) if needed, and all rows the same
length (adding Nones if needed)
Nc S s g | ]}t |ƒ‘qS r8 )rF )Ú.0r r8 r8 r9 ú
– s z.TableWidget.preProcessData..)ÚmaxrJ rF Úextend)r4 r Zmax_rowZrowNorU r8 r8 r9 rE � s zTableWidget.preProcessData)r! r! )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ZAttrMapZAttrMapValueZisNumberZ
isColorOrNoneZisListOfNumbersOrNoneZisBoxAnchorZisStringZOneOfr0 r: rC rW rE r8 r8 r8 r9 r s2
;r Ú__main__NZpdf)ÚformatsZoutDirZfnRoot)Ú__version__Zreportlab.graphics.widgetbaser Zreportlab.graphicsr Z
reportlab.libr Zreportlab.lib.validatorsZreportlab.lib.attrmapZreportlab.graphics.shapesr r r\ rC rA ÚosÚsaveÚgetcwdr8 r8 r8 r9 Ú s