Crates.io | shogi-img |
lib.rs | shogi-img |
version | 0.3.0 |
source | src |
created_at | 2024-01-18 13:56:51.235021 |
updated_at | 2024-07-26 05:15:43.61223 |
description | library for generating images that visualize the position in Shogi (Japanese chess) |
homepage | |
repository | https://github.com/sugyan/shogi-img |
max_upload_size | |
id | 1104200 |
size | 852,916 |
shogi-img
is a library for generating images that visualize the position in Shogi (Japanese chess).
use shogi_img::pos2img;
use shogi_usi_parser::FromUsi;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let pos = shogi_core::PartialPosition::from_usi(
"sfen 3sks3/9/4S4/9/1+B7/9/9/9/9 b S2rb4g4n4l18p 1",
)?;
pos2img(&pos).save("out.png")?;
Ok(())
}
This repository includes images sourced from Shogi Images, which are distributed under the CC0 1.0 Universal license.
This repository includes the MonaSpace font by GitHub, licensed under the SIL Open Font License 1.1.