circle/circle.rs
1use omage::colors::*;
2use omage::{Components, Config, Image};
3
4const HEIGHT: u32 = 1080;
5const WIDTH: u32 = 1920;
6
7fn main() -> Result<(), Box<dyn std::error::Error>> {
8 let config = Config::new(WIDTH, HEIGHT, WHITE, Some(BLACK), "output.png", None);
9
10 let mut image = Image::new();
11
12 let circle = Components::Circle(config.width / 2, config.height / 2, 300, RED);
13
14 image.config(config).init()?.add_component(&circle).draw()?;
15 Ok(())
16}