This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This module provides function convert that convert all or selected items placed on given canvas object.

Supported items:

  • lines
  • lines with arrows
  • polygons
  • smoothed lines and polygons
  • ovals (i.e. circle & ellipse)
  • arcs (all kind, i.e. ARC, CHORD, PIESLICE)
  • rectangles
  • text (unwrapped only i.e. attribute width = 0)

Unsupported items:

  • images
  • bitmaps
  • windows

Stipples are not applied.

Public functions

convert(document, canvas, items=None, tounicode=None)

  • document — SVG document, object that support DOM, i.e. provides createElement method etc. (function SVGdocument can be used to get such object)
  • canvas — Tkinter.Canvas object
  • items — list of objects to convert; if None then all items are converted
  • tounicode — user function that should return proper unicode string if Tkinter app use other then ASCII encoding. By default tounicode = lambda text: unicode(text).encode('utf-8'). Thanks to Jan Böcker who provided solution.


Takes no arguments, returns SVG document; class provided in standard xml.dom.minidom module is used.

saveall(filename, canvas, items=None, margin=10, tounicode=None)

Helper function: saves whole canvas or selected items in SVG file, sets proper dimensions, and viewport; additional margin can be set.

License & Author

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
canvasvg-1.0.0.tar.gz (10.1 kB) Copy SHA256 Checksum SHA256 Source Nov 23, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting