diff options
Diffstat (limited to 'svgbob_cli/examples/demo.rs')
-rw-r--r-- | svgbob_cli/examples/demo.rs | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/svgbob_cli/examples/demo.rs b/svgbob_cli/examples/demo.rs deleted file mode 100644 index f81bdd2..0000000 --- a/svgbob_cli/examples/demo.rs +++ /dev/null @@ -1,129 +0,0 @@ -extern crate svg; -extern crate svgbob; - -use svgbob::Grid; -use svgbob::Settings; - -fn main() { - let file = "examples/demo.svg"; - let g = Grid::from_str(get_arg(), &Settings::compact()); - let svg = g.get_svg(); - svg::save(file, &svg).unwrap(); - println!("Saved to {}", file); -} - -fn get_arg() -> &'static str { - let arg = r#" - - -+------+ +-----+ +-----+ +-----+ -| | | | | | | | -| Foo +-->| Bar +---+ Baz |<--+ Moo | -| | | | | | | | -+------+ +-----+ +--+--+ +-----+ - ^ | - | V -.-------------+-----------------------. -| Hello here and there and everywhere | -'-------------------------------------' - - - ____________ - .--------------. \ \ - / a == b \ \ \ __________ - ( && ) ) process ) \ \ - \ 'string' ne '' / / / / process / - '--------------' /___________/ /_________/ - - - __________________ - \_________________\ - \ \ - . another process . - /_________________/ - /_________________/ - - User code ^ ^ OS code - \ / - \ .--' - \ / - User code <--- Mode ----> OS code - / \ - .--' \___ - / \ - v v - User code OS code - - .---. .---. .---. .---. .---. .---. - OS API '---' '---' '---' '---' '---' '---' - | | | | | | - v v | v | v - .------------. | .-----------. | .-----. - | Filesystem | | | Scheduler | | | MMU | - '------------' | '-----------' | '-----' - | | | | - v | | v - .----. | | .---------. - | IO |<----' | | Network | - '----' | '---------' - | | | - v v v - .---------------------------------------. - | HAL | - '---------------------------------------' - - - ____[] - | ___ | - || || device - ||___|| loads - | ooo |----------------------------------------------------------. - | ooo | | | | - | ooo | | | | - '-----' | | | - | | | - v v v - .-------------------. .---------------------------. .-------------------. - | Loadable module C | | Loadable module A | | Loadable module B | - '-------------------' |---------------------------| | (instrumented) | - | | .-----. | '-------------------' - '------------+-------->| A.o | | | - calls | '-----' | | - | .------------------. | | - | / A.instrumented.o /<---+-------------' - | '------------------' | calls - '---------------------------' - - .--------------. - \ \ - '--------------' - - .--> Base::Class::Derived_A - / - .----> Base::Class::Derived_B - Something -------. / \ - \ / .---> Base::Class::Derived - Something::else \ / \ - \ \ / '--> Base::Class::Derived - \ \ / - \ \ .-----------> Base::Class::Derived_C - \ \ / - '------ Base::Class - / \ \ \ - ' \ \ \ - | \ \ \ - . \ \ '--- The::Latest - /| \ \ \ - With::Some::fantasy ' \ \ '---- The::Latest::Greatest - /| \ \ - More::Stuff ' \ '- I::Am::Running::Out::Of::Ideas - /| \ - More::Stuff ' \ - / '--- Last::One - More::Stuff V - - -"#; - - arg -} |