Skip to content
forked from cduck/drawsvg

A Python 3 library for programmatically generating SVG images (vector drawings) and rendering them or displaying them in a Jupyter notebook

License

Notifications You must be signed in to change notification settings

aufarah/draw2Svg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

draw2Svg

This is fork to drawSvg, in which we try to readjust its coordinate system to follow SVG standard

A Python 3 library for programmatically generating SVG images (vector drawings) and rendering them or displaying them in a Jupyter notebook.

Most common SVG tags are supported and others can easily be added by writing a small subclass of DrawableBasicElement or DrawableParentElement.

An interactive Jupyter notebook widget, drawSvg.widgets.DrawingWidget, is included that can update drawings based on mouse events.

Install

draw2Svg is available on PyPI:

$ pip install draw2Svg

Prerequisites

Cairo needs to be installed separately. When Cairo is installed, drawSvg can output PNG or other image formats in addition to SVG. See platform-specific instructions for Linux, Windows, and macOS from Cairo. Below are some examples for installing Cairo on Linux distributions and macOS.

Ubuntu

$ sudo apt-get install libcairo2

macOS

Using homebrew:

$ brew install cairo

Example result

This is sample application of this library to do some generative art exercise here

Pie poster:
svg

Sol Le Witt styled poster: svg

For more detailed manuals, go to our website: https://draw2svg.netlify.app/

About

A Python 3 library for programmatically generating SVG images (vector drawings) and rendering them or displaying them in a Jupyter notebook

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%