Parse graphviz’ xdot draw instructions
Project description
xdot
The main function of this package is parse
.
It parses node/edge attributes on graphviz graphs created by xdot
into drawable shapes.
use xdot::{parse, ShapeDraw};
let shapes: Vec<ShapeDraw> = parse("c 7 -#ff0000 p 4 4 4 36 4 36 36 4 36");
Each ShapeDraw
struct contains a shape
with geometry and a pen
with drawing attributes (such as color, line style, and font).
If you have the layout
feature active, you can also use layout_and_draw_graph
(and draw_graph
):
use graphviz_rust::parse;
use graphviz_rust::dot_structures::Graph;
use xdot::{layout_and_draw_graph, ShapeDraw};
let graph: Graph = parse("graph { a -- b}").unwrap();
let shapes: Vec<ShapeDraw> = layout_and_draw_graph(graph).unwrap();
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
File details
Details for the file xdot_rs-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: xdot_rs-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d70e628a0c82058f60efffbad3d3b3f07ea60cd58c01f5842c21d9b2a631602 |
|
MD5 | 9e7fb70a30d7edd3139cd76222463a37 |
|
BLAKE2b-256 | c96537bc9b22626ac3f3d3aeac86f5a1d3f92f630fea2b06d76cd603891ff1de |
File details
Details for the file xdot_rs-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: xdot_rs-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01cba087c5936f41ee2de8d007db57bcfe08ced30b8b167573e0f84828564662 |
|
MD5 | 98b73bf68c3d5d14238d67e46d4ff56f |
|
BLAKE2b-256 | 013b3742c773fe292c38ae49a896c71fb9391f2e40beef28623e2775896fec28 |