diff options
author | seancarroll <seanc28@gmail.com> | 2021-01-07 22:47:41 -0600 |
---|---|---|
committer | seancarroll <seanc28@gmail.com> | 2021-01-07 22:47:41 -0600 |
commit | 4eb06140d996b1a5a6ac15578089ef9f61f95663 (patch) | |
tree | 22d21c0e8abb8ddbd16cfbe41afdf107bc981ac1 /src/attributes/label.rs | |
parent | c95ff86e2c8fbdd8e0cf6550aadc7ffc676dcc16 (diff) | |
download | dotavious-4eb06140d996b1a5a6ac15578089ef9f61f95663.zip |
adding rustdocs
Diffstat (limited to 'src/attributes/label.rs')
-rw-r--r-- | src/attributes/label.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/attributes/label.rs b/src/attributes/label.rs index e62de2b..303b449 100644 --- a/src/attributes/label.rs +++ b/src/attributes/label.rs @@ -1,6 +1,14 @@ use crate::dot::DotString; use std::borrow::Cow; +/// Justification for cluster labels. +/// +/// Right, the label is right-justified within bounding rectangle +/// Left, left-justified +/// Else the label is centered. +/// +/// Note that a subgraph inherits attributes from its parent. +/// Thus, if the root graph sets labeljust=l, the subgraph inherits this value. pub enum LabelJustification { Left, Right, @@ -17,6 +25,23 @@ impl<'a> DotString<'a> for LabelJustification { } } +/// Vertical placement of labels for nodes, root graphs and clusters. +/// +/// For graphs and clusters, only labelloc=t and labelloc=b are allowed, +/// corresponding to placement at the top and bottom, respectively. +/// +/// By default, root graph labels go on the bottom and cluster labels go on the top. +/// +/// Note that a subgraph inherits attributes from its parent. +/// Thus, if the root graph sets labelloc=b, the subgraph inherits this value. +/// +/// For nodes, this attribute is used only when the height of the node is larger than the height +/// of its label. +/// +/// If labelloc=t, labelloc=c, labelloc=b, the label is aligned with the top, centered, or aligned +/// with the bottom of the node, respectively. +/// +/// By default, the label is vertically centered. pub enum LabelLocation { Top, Center, |