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û2 ã @ sð d Z dZddlZddlmZ ddlmZ ddlmZm Z ddl
mZmZm
Z
ddlmZ dd lmZ dd
lmZ ddd
ddœZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZdd„ ZG dd„ deƒZdd„ Zedkrìeƒ dS )z3.3.0aL Routines to print code page (character set) drawings. Predates unicode.
To be sure we can accurately represent characters in various encodings
and fonts, we need some routines to display all those characters.
These are defined herein. The idea is to include flowable, drawable
and graphic objects for single and multi-byte fonts. é N)ÚCanvas)ÚFlowable)Ú
pdfmetricsÚcidfonts)ÚGroupÚStringÚRect)ÚWidget)Úcolors)Úint2ByteZwinansiÚmacromanZ macexpertZpdfdoc)ÚWinAnsiEncodingZMacRomanEncodingZ MacExpertZPDFDocc @ s2 e Zd ZdZdd„ Zdd„ Zdd„ Zdd d
„ZdS )
Ú
CodeChartBasezrBasic bits of drawing furniture used by
single and multi-byte versions: ability to put letters
into boxes.c C s¾ | j d | j }|t|ƒkr(t|ƒ| _nt|ƒd | _| jd| j | _| jd| j | _g | _x(t| jd ƒD ]}| jj || j ƒ qpW g | _
x(t| jd ƒD ]}| j
j || j ƒ q W dS )z&Work out x and y positions for drawingg ð?é é N)Ú
codePointsÚcharsPerRowÚintÚrowsÚboxSizeÚwidthÚheightÚylistÚrangeÚappendÚxlist)Úselfr ÚrowÚcol© r ú9/tmp/tmp4i9tl1d3/lib64/python/reportlab/lib/codecharts.pyÚ
calcLayout# s zCodeChartBase.calcLayoutc C s | j rd| S d| S d S )Nz%02Xz%d)Úhex)r Úbytr r r Ú
formatByte8 s zCodeChartBase.formatBytec C sŽ | j | j t|ƒ }xt|ƒD ]}|jdƒ qW d}d}| jj| j| jd ƒ �x8|D �].}|dkr´| jj dƒ | jj
d| | j | j | d | j | j| jddd� | jj dƒ n´y.| jj|d | j | j | d | j |ƒ W n„ | jj dƒ | jj
d| | j | j | d | j | j| jddd� | jj|d | j | j | d | j d
ƒ | jj dƒ Y nX |d }|| jkrV|d }d}qVW dS )z]Fills boxes in order. None means skip a box.
Empty boxes at end get filled with grayNr g è?gÍÌÌÌÌÌì?r )ÚstrokeÚfillg g ø?g ì?ú?)r r Úlenr r ÚcanvÚsetFontÚfontNamer ÚsetFillGrayÚrectÚdrawCentredString)r ÚcharListZextraNeededÚir r Úchr r r Ú drawChars> s<