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\dZddlmZmZmZmZmZGdddZGdddZGdddZ Gd d d Z d S) z] (Experimental) WCK-style drawing interface operations .. seealso:: :py:mod:`PIL.ImageDraw` )Image ImageColor ImageDraw ImageFont ImagePathc@seZdZdZdddZdS)Penz"Stores an outline color and width.rcCstj||_||_dS)N)rgetrgbcolorwidth)selfr r opacityr//tmp/tmp5hum_rxs/lib64/python/PIL/ImageDraw2.py__init__!s z Pen.__init__N)rr)__name__ __module__ __qualname____doc__rrrrrrsrc@seZdZdZdddZdS)BrushzStores a fill colorrcCstj||_dS)N)rr r )r r r rrrr)szBrush.__init__N)r)rrrrrrrrrr&src@seZdZdZdddZdS)Fontz Stores a TrueType font and color cCstj||_tj|||_dS)N)rr r rZtruetypefont)r r filesizerrrr0s z Font.__init__N)r)rrrrrrrrrr-src@s|eZdZdZdddZddZdddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZdS)Drawz4 (Experimental) WCK-style drawing interface NcCs4t|dstj|||}tj||_||_d|_dS)NZim)hasattrrnewrrdrawimage transform)r rrr rrrr;s   z Draw.__init__cCs|jS)N)r)r rrrflushBsz Draw.flushcCsd}}d}t|tr$|j}|j}nt|tr:|j}|j}t|trL|j}nt|tr\|j}|jrxtj|}|j|j|dkr|jj |||dnt |j||||ddS)Nrline)fillr )r#outline) isinstancerr r rr rPathrr"getattr)r opxyZpenZbrushr$r#r rrrrenderEs$      z Draw.rendercCs|\}}dd|dd|f|_dS)zSets a transformation offset.rN)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)startendoptionsrrrr.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/r0r1rrrr4sz 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)r1rrrr5s z Draw.polygoncGs|jd|f|dS)zg Draws a rectangle. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.rectangle` rectangleN)r*)r r)r1rrrr6szDraw.rectanglecCs8|jrtj|}|j|j|jj|||j|jddS)zw Draws the string at the given position. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.text` )rr#N)r rr&rtextrr )r r)r7rrrrr7s  z Draw.textcCs|jj||jdS)z Return the size of the given string, in pixels. .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.textsize` )r)rtextsizer)r r7rrrrr8sz Draw.textsize)NN)N)rrrrrr!r*r-r.r2r3r"r4r5r6r7r8rrrrr6s       rN) rrrrrrrrrrrrrrs