Nanachi - pure Rust 2D graphics library
NOTE: Nanachi is still buggy and the API will changed!
Generated by cargo run --release --example nanachi
Features
- path filling and stroking
- color with: linear gradients, radial gradients and patterns
- 24 composition types
- anti-aliasing (can be disabled)
- path transformation: translation, scaling and rotation
Example
Basic usage example is following:
use RgbaImage;
use ;
let = ;
// Make a Context
let mut context = from_pixel.high_quality;
// Make a Path
let mut builder = new;
builder.move_to;
builder.line_to;
builder.line_to;
builder.line_to;
builder.close;
let path = builder.end;
// Make a FillStyle for filling
let fill_style = new;
// Fill the path
context.fill;
// Make a FillStyle for stroking
let fill_style = new;
// Stroke the path
context.stroke;
// Save the image
let img: RgbaImage = .into;
img.save.unwrap;
Author
- carrotflakes (carrotflakes@gmail.com)
Copyright
Copyright (c) 2020 carrotflakes (carrotflakes@gmail.com)
License
Licensed under the MIT License.