bgddlmZddlmZmZmZGddeeeeZGddeeeZGddeeeZGd d eeeZ Gd d eeeeZ Gd de Z dS)) BaseElement) PresentationMarkers Transformc(eZdZdZdZdfd ZxZS)Linezc The **line** element defines a line segment that starts at one point and ends at another. linerrc tt|jdi||\}}|\}}||d<||d<||d<||d<dS)z :param 2-tuple start: start point (**x1**, **y1**) :param 2-tuple end: end point (**x2**, **y2**) :param extra: additional SVG attributes as keyword-arguments x1y1x2y2N)superr__init__) selfstartendextrar r rr __class__s `/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/svgwrite/shapes.pyrz Line.__init__sb #dD"++U+++BBT T T T )r r __name__ __module__ __qualname____doc__ elementnamer __classcell__rs@rrr sNK          rrc(eZdZdZdZdfd ZxZS)Rectz The **rect** element defines a rectangle which is axis-aligned with the current user coordinate system. Rounded rectangles can be achieved by setting appropriate values for attributes **rx** and **ry**. rectr r&Nc tt|jdi||\}}|\}} ||d<||d<||d<| |d<|||d<|||d<dSdS) a) :param 2-tuple insert: insert point (**x**, **y**), left-upper point :param 2-tuple size: (**width**, **height**) :param rx: corner x-radius :param ry: corner y-radius :param extra: additional SVG attributes as keyword-arguments xywidthheightNrxryr)rr#r) rinsertsizer,r-rr(r)r*r+rs rrz Rect.__init__*s #dD"++U+++1 vS S W X >DJ >DJJJ >r)r r%NNrr!s@rr#r##sNKrr#c(eZdZdZdZdfd ZxZS)CirclezS The **circle** element defines a circle based on a center point and a radius. circler r&c ptt|jdi||\}}||d<||d<||d<dS)z :param 2-tuple center: circle center point (**cx**, **cy**) :param length r: circle-radius **r** :param extra: additional SVG attributes as keyword-arguments cxcyrNr)rr1r)rcenterr6rr4r5rs rrzCircle.__init__EsP %fd$--u---BT T S r)r r&rr!s@rr1r1@sLK          rr1c(eZdZdZdZdfd ZxZS)Ellipsez The **ellipse** element defines an ellipse which is axis-aligned with the current user coordinate system based on a center point and two radii. ellipser r%c tt|jdi||\}}|\}}||d<||d<||d<||d<dS)z :param 2-tuple center: ellipse center point (**cx**, **cy**) :param 2-tuple r: ellipse radii (**rx**, **ry**) :param extra: additional SVG attributes as keyword-arguments r4r5r,r-Nr)rr9r) rr7r6rr4r5r,r-rs rrzEllipse.__init__Ysb &gt%.....BBT T T T r)r r%rr!s@rr9r9SsNK          rr9c:eZdZdZdZgffd ZfdZdZxZS)Polylinez The **polyline** element defines a set of connected straight line segments. Typically, **polyline** elements define open shapes. polylinec tt|jdi|t||_|jrE|jD]?}|\}}|j|d|j|d>dSdS)z :param `iterable` points: `iterable` of points (points are `2-tuples`) :param extra: additional SVG attributes as keyword-arguments coordinateNr)rr=rlistpointsdebug validatorcheck_svg_type)rrBrpointr(r)rs rrzPolyline.__init__os 'h&/////6ll : ? ? ?1--a>>>--a>>>>  ? ? ? ?rc||j|jd<tt|S)NrB)points_to_stringrBattribsrr=get_xml)rrs rrJzPolyline.get_xml}s;!%!6!6t{!C!C XXt$$,,...rcg}|D]}t|dkrtdt|z|\}}|jr6|j|d|j|d|jdkrJt |trt|d}t |trt|d}|d|}| |d |S)za Convert a `list` of points `2-tuples` to a `string` ``'p1x,p1y p2x,p2y ...'``. z%got %s values, but expected 2 values.r@tiny, ) len TypeErrorrCrDrEprofile isinstancefloatroundappendjoin)rrBstringsrFr(r)s rrHzPolyline.points_to_strings  " "E5zzQ G#e** TUUUDAqz ?--a>>>--a>>>|v%%a''$a Aa''$a A qq!!$E NN5 ! ! ! !xx   r) rrrrrrrJrHr r!s@rr=r=isyK ? ? ? ? ? ?/////!!!!!!!rr=ceZdZdZdZdS)Polygonz The **polygon** element defines a closed shape consisting of a set of connected straight line segments. Same as :class:`~svgwrite.shapes.Polyline` but closed. polygonN)rrrrrrrrr[r[s KKKrr[N) svgwrite.basersvgwrite.mixinsrrrrr#r1r9r=r[rrrr_sV&%%%%%<<<<<<<<<<; <,; <:[)\&k9l,,!,!,!,!,!{I|W,!,!,!^hr