• File: __init__.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib/python3.7/site-packages/svgwrite/__pycache__/__init__.cpython-37.pyc
  • Date Modified: 11/23/2019 5:57 PM
  • File size: 2.79 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

s]W	@sdZddlmZmZeZdZdZdZdZddlm	Z	dd	l
mZGd
ddeZ
e
dZe
d
Ze
dZe
dZe
dZe
dZe
dZe
dZe
dZe
dZe
dZe
dZe
dZe
dZdS)ar
A Python library to create SVG drawings.

SVG is a language for describing two-dimensional graphics in XML. SVG allows
for three types of graphic objects: vector graphic shapes (e.g., paths
consisting of straight lines and curves), images and text. Graphical objects
can be grouped, styled, transformed and composed into previously rendered
objects. The feature set includes nested transformations, clipping paths,
alpha masks, filter effects and template objects.

SVG drawings can be interactive and dynamic. Animations can be defined and
triggered either declarative (i.e., by embedding SVG animation elements in
SVG content) or via scripting.

.. seealso:: http://www.w3.org/TR/SVG11/intro.html#AboutSVG

a simple example::

    import svgwrite

    dwg = svgwrite.Drawing('test.svg', profile='tiny')
    dwg.add(dwg.line((0, 0), (10, 0), stroke=svgwrite.rgb(10, 10, 16, '%')))
    dwg.add(dwg.text('Test', insert=(0, 0.2)))
    dwg.save()

SVG Version
-----------

You can only create two types of SVG drawings:

* *SVG 1.2 Tiny Profile*, use Drawing(profile= ``'tiny'``)
* *SVG 1.1 Full Profile*, use Drawing(profile= ``'full'``)

)__version__versionzmozman <me@mozman.at>zManfred Moitzizme@mozman.atz	2014-2019)Drawing)rgbc@s*eZdZdZd
ddZddZddZd	S)Unitz Add units to values.
    cmcCs
||_dS)zL Unit constructor

        :param str unit: specify the unit string
        N)_unit)selfZunitr/__init__.py__init__;sz
Unit.__init__cCsd||jfS)z2 add unit-string to 'other'. (e.g. 5*cm => '5cm') z%s%s)r	)r
otherrrr__rmul__Bsz
Unit.__rmul__csdfdd|DS)z~ Add unit-strings to all arguments.

        :param args: list of values
            e.g.: cm(1,2,3) => '1cm,2cm,3cm'
        ,csg|]}d|jfqS)z%s%s)r	).0arg)r
rr
<listcomp>Lsz!Unit.__call__.<locals>.<listcomp>)join)r
argsr)r
r__call__Fsz
Unit.__call__N)r)__name__
__module____qualname____doc__r
rrrrrrr8s
rrmmemexpxinpcpt%deggradradHzkHzN)rrrZVERSION
__author__ZAUTHOR_NAMEZAUTHOR_EMAILZCYEARZsvgwrite.drawingrZsvgwrite.utilsrobjectrrrrrrZinchr r!Zpercentr#r$r%r&r'rrrr<module>)s.