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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file PyBresenham-0.0.4.tar.gz
.
File metadata
- Download URL: PyBresenham-0.0.4.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 369380f63fb133aff401569b88535077922ca737b8e82618cb8de9196f571e6a |
|
MD5 | 87f2ddfc00d753c035ecb11639d2f9b8 |
|
BLAKE2b-256 | 55f7b16f4540171e94a7ead28ee6df3080225d3b3ca2f28772f27441ca529d03 |