Metadata-Version: 2.1
Name: drawzero
Version: 0.1.11
Summary: Простое рисование на холсте без бойлерплейта
Home-page: https://github.com/ShashkovS/drawzero
Author: Sergey Shashkov
Author-email: sh57@yandex.ru
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: End Users/Desktop
Classifier: Environment :: Win32 (MS Windows)
Classifier: Environment :: X11 Applications
Classifier: Environment :: MacOS X
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: Russian
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Multimedia :: Graphics
Description-Content-Type: text/x-rst
Requires-Dist: pygame


Draw Zero
=========

A zero-boilerplate canvas drawing framework for Python 3, based on Pygame.


Some examples
-------------

Here's some of the neat stuff you can do::

    # import all
    from drawzero import *

    # simple shapes
    fill('#12bbae')
    line('red', (400, 400), (800, 800))
    circle('yellow', (500, 560), 200)
    filled_circle('brown', (500, 500), 20)
    text('red', 'Hello, world!', (300, 200), 72)
    rect('blue', (200, 600), 100, 100)
    filled_rect('orange', (400, 600), 100, 100)
    polygon('white', [(20, 200), (100, 240), (40, 160)])
    filled_polygon('burlywood', 200, 400, 130, 304, 20, 342, 20, 458, 130, 496, )


.. image:: https://raw.githubusercontent.com/ShashkovS/drawzero/master/doc/hello_world.png
    :width: 75%

Animation
---------

Animations are also straightforward::

    from drawzero import *
    from math import sin, cos, pi

    earth_orbit = 400
    earth_radius = 30
    earth_rot_step = 2 * pi / 360
    moon_orbit = 100
    moon_radius = 10
    moon_rot_step = 2 * pi / 60

    i = 0
    while True:
        i += 1
        e_x = 500 + earth_orbit * cos(earth_rot_step * i)
        e_y = 500 + earth_orbit * sin(earth_rot_step * i)
        m_x = e_x + moon_orbit * cos(moon_rot_step * i)
        m_y = e_y + moon_orbit * sin(moon_rot_step * i)

        clear()
        filled_circle(c_red, (500, 500), 100)
        filled_circle(c_blue, (e_x, e_y), earth_radius)
        filled_circle(c_yellow, (m_x, m_y), moon_radius)
        tick()


.. image:: https://raw.githubusercontent.com/ShashkovS/drawzero/master/doc/planet_animation.gif
    :width: 50%

Installation
------------

In a Terminal window, type::

    pip install drawzero



