Safi2D is a 2D library written in pure Python without any exernal library
pip install git+https://github.com/Benitmulindwa/safi2D.git
from safi2D.safi import Canvas
HEIGHT = 400
WIDTH = 600
circle = Canvas(WIDTH, HEIGHT)
# Draw a red circle
circle.draw_filled_circle(center=(WIDTH // 2, HEIGHT // 2), radius=80, color=(255, 0, 0))
# Save as a png file
circle.save("outputs/filled_circle.png")
This draws a red circle on a white background.
# This opens a window with the shape on it without saving the image
circle.show()
- Optimize line-drawing algorithm for better performance โ
- Implement support for ellipses and arcs โ
- Add color and style options for shapes
- Implement transformation functions (translation, rotation, scaling)
- Integrate text rendering capabilities for annotations
- Develop event handling mechanisms for user interaction
- Extend export formats to include PNG, JPEG, and SVG โ
- Create comprehensive documentation and examples
- Set up automated testing procedures
- Engage with the developer community for feedback and collaboration