# Rasterization
This crate provides iterators and adapters for generating sequential coordinates for various shapes of a circle or its parts using Bresenham's algorithm. ## Gallery Visual examples of different shapes: |||
||
| |:-:|:-:|:-:|:-:|:-:| ## Examples Here's how to use the crate: ```rust use rasterization::{Rasterization, SemicircleFilled, DirectionGradient::Bottom}; let radius = 128_usize; let iter = SemicircleFilled::::new(radius) .circle() .offset(radius as i32, radius as i32); let iter = SemicircleFilled::::new(radius) .circle_long(-128, 0) .offset((radius * 2) as i32, radius as i32); let iter = SemicircleFilled::::new(radius) .semicircle_top() .offset(radius as i32, radius as i32); let iter = SemicircleFilled::::new(radius) .semicircle_bottom() .offset(radius as i32, radius as i32); let iter = SemicircleFilled::::new(radius) .circle() .offset(radius as i32, radius as i32) .gradient(radius as i32, radius * 2, Bottom(colorous::BROWN_GREEN)); ```
## Installation Add the following to your Cargo.toml: ```toml [dependencies] rasterization = "0.2.0" ``` ## License This project is licensed under the MIT License.