Skip to main content

A cross-platform module for GUI automation for human beings. Control the keyboard and mouse from a Python script.

Project description

A Python module of generators that generate x, y coordinates for various vector shapes such as lines, rectangles, etc. Named after Bresenham of line-algorithm fame.

pip install pybresenham

If you need the x, y coordinates that make up vector shapes such as lines, circles, etc., this module has generators that yield simple (x, y) tuples of the integer points in these shapes. This has applications anywhere you have a 2D grid of discrete points.

For example:

>>> import pybresenham
>>> pybresenham.line(0, 0, 3, 6)
<generator object line at 0x00000000030923B8>
>>> list(pybresenham.line(0, 0, 3, 6))
[(0, 0), (0, 1), (1, 2), (1, 3), (2, 4), (2, 5), (3, 6)]

PyBresenham is currently under development, and is seeking contributors!

The following functions aren’t yet implemented:

  • ellipse()
  • ellipseVertices()
  • arc()
  • arcVertices()
  • star()
  • starVertices()
  • hexGrid()
  • hexGridVertices()
  • hexGridInterior()
  • bezier()
  • bezierVertices()
  • roundedBox()
  • roundedBoxVertices()

The thickness, filled, endcap, and viewport parameters are still unimplemented. (Except for square() and rectangle(), which do implement the filled parameter.)

Project details

Release history Release notifications

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
PyBresenham-0.0.4.tar.gz (8.9 kB) Copy SHA256 hash SHA256 Source None May 3, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page