{"id":26658155,"url":"https://github.com/deep110/ada","last_synced_at":"2025-04-11T13:07:54.146Z","repository":{"id":57479338,"uuid":"330757526","full_name":"deep110/ada","owner":"deep110","description":"Primitive shapes rendering library in rust","archived":false,"fork":false,"pushed_at":"2021-05-22T21:43:28.000Z","size":55,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T09:18:47.003Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deep110.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-18T18:46:49.000Z","updated_at":"2023-03-04T10:00:55.000Z","dependencies_parsed_at":"2022-09-17T04:51:32.179Z","dependency_job_id":null,"html_url":"https://github.com/deep110/ada","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep110%2Fada","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep110%2Fada/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep110%2Fada/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep110%2Fada/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deep110","download_url":"https://codeload.github.com/deep110/ada/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248404405,"owners_count":21097729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-25T09:18:50.021Z","updated_at":"2025-04-11T13:07:54.115Z","avatar_url":"https://github.com/deep110.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ada\n\n[![Build Status](https://travis-ci.com/deep110/ada.svg?branch=master)](https://travis-ci.com/deep110/ada)\n[![Crates.io](https://img.shields.io/crates/v/ada.svg)](https://crates.io/crates/ada)\n[![docs.rs](https://docs.rs/ada/badge.svg)](https://docs.rs/ada)\n\nA 2D Shapes pixel rendering library in rust. Supported shapes are:\n* Line2D\n* Rectangle2D\n* Ellipse2D\n* Polygon2D\n* Bezier2D [Both quadratic and cubic]\n\nNo use of unsafe blocks. `#![forbid(unsafe_code)]` is also declared at crate level.\n\n## Usage\n\nAdd this to `Cargo.toml` file:\n```toml\n[dependencies]\nada = \"0.3.0\"\n```\n\nExample code:\n\n```rust\nuse ada::{shape, Canvas};\n\nconst WIDTH: usize = 512;\nconst HEIGHT: usize = 512;\n\n// create a pixel buffer for RGBA values\nlet mut buffer = vec![0u8; 4 * WIDTH * HEIGHT];\n\n// create canvas\nlet mut canvas = Canvas::new(WIDTH, HEIGHT).unwrap();\n\n// draw line\nshape::draw_line2d(50, 50, 200, 300, canvas, \u0026ada::color::WHITE, \u0026mut buffer[..]);\n\n// draw rectangle\nshape::draw_rect2d(50, 100, 100, 150, canvas, \u0026ada::color::RED, \u0026mut buffer[..]); // hollow\nshape::draw_rect2d_filled(50, 100, 90, 120, canvas, \u0026ada::color::GREEN, \u0026mut buffer[..]); // filled\n```\n\nYou can find more examples for all shapes in `examples` folder. To run an example:\n```shell\ncargo run --example draw_hollow\n```\n\n## Contributing\nPlease feel free to open any issues or pull requests.\n\n## License\n\nThis is under Apache 2.0 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeep110%2Fada","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeep110%2Fada","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeep110%2Fada/lists"}