Giter Club home page Giter Club logo

safi2d's Introduction

Safi2D

Safi2D is a 2D library written in pure Python without any exernal library

๐Ÿšจ(THIS LIBRARY IS A WORK IN PROGRESS)

Installation

pip install git+https://github.com/Benitmulindwa/safi2D.git

Usage

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.

Output:

# This opens a window with the shape on it without saving the image
circle.show()

TODO:

  • 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

safi2d's People

Contributors

benitmulindwa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.