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ˆdZddlmZddlmZddlmZddlTddlTddl m Z Gdd„deƒZ e d kr„e ƒj ƒZdd lZejd gejƒd d �d S) z3.3.0é)ÚWidget)Úshapes)Úcolors)Ú*)ÚDrawingc@seZdZdZeeedd�eedd�eedd�eedd�eedd�eedd�eed d�eed d�eed d�eed d�eed d�eedd�eddd�ee dd�ee dd�eedd�eedd�ee ddƒdd�ee ddddƒdd�d�Z d&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 tablez table widthz table 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é cKsÜ||_||_d|_d|_tj|_d|_d|_tj|_ tj|_ d|_ d|_ d|_ ddddgdd d d gd d ddgg|_d|_d|_tj|_d|_d|_xD|jƒD]8\}}|t|jjjƒƒkrÆt|||ƒqœtd|jƒ‚qœWdS)NéÈédgà?gÐ?ZNorthZSouthZEastZWesténéxé‚ÚAÚBÚCÚDÚnwér r z&invalid argument supplied for class %s)rrrrrZblackrrrrrrrrrrrrrr ÚitemsÚlistÚ __class__Ú_attrMapÚkeysÚsetattrÚ ValueError)ÚselfrrÚkwÚkÚv©r8úA/tmp/tmp4i9tl1d3/lib64/python/reportlab/graphics/widgets/table.pyÚ__init__)s,$zTableWidget.__init__cCsDtddƒ}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?) rrÚaddr;rrrrZredr)r4ÚdÚtr8r8r9ÚdemoFs  zTableWidget.democCstjƒ}|js|jrNtj|j|j|j|jƒ}|j|_|j|_ |j |_ |j |ƒ|j |jƒ}t|jƒ}t|jdƒ}|jt|ƒ}|jt|ƒ}|jrøxbt|ƒD]V}|j} |j|j} |j||} tj| | | | ƒ} |j| _|j| _ |j| _ |j | ƒqžW|j�rfxdt|ƒD]X}|j||} |j}|j|j}tj| || |ƒ} |j| _|j| _ |j| _ |j | ƒ�q W|jjƒx¦t|jƒD]˜\}}|j||d|d|j} xlt|ƒD]`\}}|�r®|j||d|} tj| | t|ƒ|jd�}|j|_|j|_|j |_|j |ƒ�q®W�q|W|S)z# returns a group of shapes rgà?)r )!rÚGrouprrZRectrrrrZ strokeColorrZ strokeWidthr@ÚpreProcessDatarÚlenÚfloatrÚrangeZLinerZstrokeDashArrayrrrÚreverseÚ enumeraterÚStringÚstrr rr)r4ÚgZrectrZrowsÚcolsZrow_stepZcol_stepÚiÚx1Zx2rÚlinerÚy1Úy2ÚjÚrowZdatumÚsr8r8r9ÚdrawRsX        zTableWidget.drawcCs\|s dggStdd„|Dƒƒ}x8t|ƒD],\}}t|ƒ|kr(|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) NcSsg|] }t|ƒ‘qSr8)rF)Ú.0rr8r8r9ú –sz.TableWidget.preProcessData..)ÚmaxrJrFÚextend)r4rZmax_rowZrowNorUr8r8r9rE�s zTableWidget.preProcessData)r!r!)Ú__name__Ú __module__Ú __qualname__Ú__doc__ZAttrMapZ AttrMapValueZisNumberZ isColorOrNoneZisListOfNumbersOrNoneZ isBoxAnchorZisStringZOneOfr0r:rCrWrEr8r8r8r9rs2                   ;rÚ__main__NZpdf)ÚformatsZoutDirZfnRoot)Ú __version__Zreportlab.graphics.widgetbaserZreportlab.graphicsrZ reportlab.librZreportlab.lib.validatorsZreportlab.lib.attrmapZreportlab.graphics.shapesrrr\rCrAÚosÚsaveÚgetcwdr8r8r8r9Ús