Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
`Â_o ã @ s d Z dZd dd„Zd
dd„ZdS )z3.4.34z;Utility functions to position and resize boxes within boxesÚswFc C sd |d
kr&|dkr| |d 7 } n| |7 } |dkrL|d
krD||d 7 }n||7 }|r\| |||fS | |fS )zegiven rectangle controlled by x,y width and height return
the corner corresponding to the anchorÚnwÚwr ÚnÚcÚsg @ÚseÚe)r r r )r r r )r r r )r r r © )ÚxÚyÚwidthÚheightÚanchorZdimsr r ú7/tmp/tmp4i9tl1d3/lib64/python/reportlab/lib/boxstuff.pyÚ
rectCorner s r c C s d} |dkr|}|dkr|}|dk r2| }||8 }|dk rH| }||8 }| r¶t |ƒ}t |ƒ}t|t|ƒ |t|ƒ ƒ} |}
|}| | d }| | d }|s¶t|||
| || |ƒ\}}|�r |dkrÜ||dkrÖ|d n|8 }|dk�r ||dk� rú|d n|8 }||||| fS )ah This function helps position an image within a box.
It first normalizes for two cases:
- if the width is None, it assumes imWidth
- ditto for height
- if width or height is negative, it adjusts x or y and makes them positive
Given
(a) the enclosing box (defined by x,y,width,height where x,y is the lower left corner) which you wish to position the image in, and
(b) the image size (imWidth, imHeight), and
(c) the 'anchor point' as a point of the compass - n,s,e,w,ne,se etc and c for centre,
this should return the position at which the image should be drawn,
as well as a scale factor indicating what scaling has happened.
It returns the parameters which would be used to draw the image
without any adjustments:
x,y, width, height, scale
used in canvas.drawImage and drawInlineImage
g ð?Né g:Œ0âŽyE>r r r r r r g @r r )r r r )r r r )r r r )r r r )ÚabsÚminÚfloatr )Zpreserver r
r r r
ZimWidthZimHeightZ
anchorAtXYZscaleZowidthZoheightr r r ÚaspectRatioFix s6
r N)r F)F)Ú__version__Ú__doc__r r r r r r Ú s