Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ia›ã@s\dZddlmZmZmZmZmZGdd„dƒZGdd„dƒZGdd„dƒZ Gd d „d ƒZ d S) z] (Experimental) WCK-style drawing interface operations .. seealso:: :py:mod:`PIL.ImageDraw` é)ÚImageÚ ImageColorÚ ImageDrawÚ ImageFontÚ ImagePathc@seZdZdZddd„ZdS)ÚPenz"Stores an outline color and width.réÿcCstj|ƒ|_||_dS)N)rÚgetrgbÚcolorÚwidth)Úselfr r Úopacity©rú//tmp/tmp5hum_rxs/lib64/python/PIL/ImageDraw2.pyÚ__init__!s z Pen.__init__N)rr)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrrrsrc@seZdZdZddd„ZdS)ÚBrushzStores a fill colorrcCstj|ƒ|_dS)N)rr r )r r r rrrr)szBrush.__init__N)r)rrrrrrrrrr&src@seZdZdZddd„ZdS)ÚFontz Stores a TrueType font and coloré cCstj|ƒ|_tj||ƒ|_dS)N)rr r rZtruetypeÚfont)r r ÚfileÚsizerrrr0s z Font.__init__N)r)rrrrrrrrrr-src@s|eZdZdZddd„Zdd„Zddd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„ZdS)ÚDrawz4 (Experimental) WCK-style drawing interface NcCs4t|dƒstj|||ƒ}tj|ƒ|_||_d|_dS)NZim)ÚhasattrrÚnewrrÚdrawÚimageÚ transform)r rrr rrrr;s   z Draw.__init__cCs|jS)N)r)r rrrÚflushBsz Draw.flushcCs®d}}d}t|tƒr$|j}|j}nt|tƒr:|j}|j}t|tƒrL|j}nt|tƒr\|j}|jrxtj|ƒ}|j|jƒ|dkr”|jj |||d�nt |j|ƒ|||d�dS)NrÚline)Úfillr )r#Úoutline) Ú isinstancerr r rr rÚPathrr"Úgetattr)r ÚopÚxyZpenZbrushr$r#r rrrÚrenderEs$      z Draw.rendercCs|\}}dd|dd|f|_dS)zSets a transformation offset.réN)r )r ÚoffsetZxoffsetZyoffsetrrrÚ settransform]szDraw.settransformcGs|jd|||f|žŽdS)zÄ Draws an arc (a portion of a circle outline) between the start and end angles, inside the given bounding box. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.arc` ÚarcN)r*)r r)ÚstartÚendÚoptionsrrrr.bszDraw.arccGs|jd|||f|žŽdS)z· Same as :py:meth:`~PIL.ImageDraw2.Draw.arc`, but connects the end points with a straight line. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.chord` ÚchordN)r*)r r)r/r0r1rrrr2ksz Draw.chordcGs|jd|f|žŽdS)z‚ Draws an ellipse inside the given bounding box. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.ellipse` ÚellipseN)r*)r r)r1rrrr3tsz Draw.ellipsecGs|jd|f|žŽdS)zˆ Draws a line between the coordinates in the ``xy`` list. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.line` r"N)r*)r r)r1rrrr"|sz Draw.linecGs|jd|||f|žŽdS)zÁ Same as arc, but also draws straight lines between the end points and the center of the bounding box. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.pieslice` ÚpiesliceN)r*)r r)r/r0r1rrrr4„sz Draw.pieslicecGs|jd|f|žŽdS)a  Draws a polygon. The polygon outline consists of straight lines between the given coordinates, plus a straight line between the last and the first coordinate. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.polygon` ÚpolygonN)r*)r r)r1rrrr5�s z Draw.polygoncGs|jd|f|žŽdS)zg Draws a rectangle. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.rectangle` Ú rectangleN)r*)r r)r1rrrr6šszDraw.rectanglecCs8|jrtj|ƒ}|j|jƒ|jj|||j|jd�dS)zw Draws the string at the given position. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.text` )rr#N)r rr&rÚtextrr )r r)r7rrrrr7¢s  z Draw.textcCs|jj||jd�S)zƒ Return the size of the given string, in pixels. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.textsize` )r)rÚtextsizer)r r7rrrrr8­sz Draw.textsize)NN)N)rrrrrr!r*r-r.r2r3r"r4r5r6r7r8rrrrr6s       rN) rÚrrrrrrrrrrrrrÚs