use xege::*;
fn main() {
let mut xege = initgraph(1000, 800, Init::NoSysDPI).unwrap();
xege.setbkcolor(color::DARKGRAY);
xege.setcolor(color::BLACK);
xege.setfillcolor(color::CYAN);
xege.clear();
xege.enable_aa(true);
const TEXTS: [&str; 10] = [
"Hello, World!",
"你好,世界!",
"こんにちは世界",
"안녕하세요 세계!",
"Привет мир!",
"مرحبا بالعالم!",
"Γεια σου κόσμε!",
"नमस्ते दुनिया!",
"∑(π²) ≠ ∞",
"←↑→↓ ↖↗↘↙",
];
let mut path = Path::new();
for (i, &s) in TEXTS.iter().enumerate() {
path.addtext(
30f32,
10f32 + i as f32 * 40f32,
s,
"黑体",
30f32,
FontStyle::Black,
);
}
path.outline(Option::<Mat3<f32>>::None, 0.0);
xege.drawpath_at(&path, 16.0, 16.0);
xege.fillpath_at(&path, 15.0, 15.0);
loop {}
}