StarryMosaic
A library for generating colorful mosaic images with various geometrical patterns.
How to create mosaic image
To create mosaic simply:
- set size of resulting image;
- choose shape which mosaic is based on,
- set its position, rotation and scale
- and finally build selected type of mosaic.
Then this mosaic can be painted with any color or gradient.
Example
Next code creates logo of this project (the one you can see above).
use LinSrgb;
use ;
let mosaic = default
.set_regular_polygon_shape
.set_image_size
.set_center
.set_uniform_scale
.build_star
.unwrap;
let gradient = vec!;
let mosaic_image = mosaic.draw;
let save_result = mosaic_image.save;
assert!;
More images
To see more images visit images
directory
in repository of this project.