Skip to content

shaejaz/artigen-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Artigen

Artigen Rust library to generate patterns. Uses image and imageproc for drawing utilities. Can output patterns in either base64 strings or image file on the file system

For an example of usage, see the sample Android app

Usage

use artigen::patterns::{blocks};
use artigen::output::file;

fn main() {
    let blocks_pattern = blocks::Blocks {
        config: blocks::Config {
            x: 800,
            y: 640,
            color1: "#000000",
            color2: "#FFFFFF",
            color3: "#FF0000",
            bg_color: "#FFFFFF",
            block_size: 30,
            line_size: 30,
            density: 30.0,
        }
    };

    let img = blocks_pattern.generate();
    file::save_image(&img, "blocks.png");
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages