Skip to content

Very small 2D line segment drawing program in Python

License

Notifications You must be signed in to change notification settings

b-s-code/linedrawpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LineDrawPy

Python port of my C++ graphics program LineDraw, with added support for coloured edges.

image

Usage

python3 src/main.py examples/edges.txt > examples/output/edges.ppm

produces

image

given the following input file edges.txt

  0,   0, 100, 100, ff0000
100, 100, 200,   0, 00ff00
200,   0,   0,   0, 0000ff

Output format

The output of LineDrawPy is in Portable PixMap format. To view this image format, use either an image viewer like feh which supports PPM, or convert the image to another format.

Development

Running tests

make test

About

Very small 2D line segment drawing program in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published