Trait dotavious::attributes::GraphAttributes[][src]

pub trait GraphAttributes<'a> {
    fn add_attribute<S: Into<String>>(
        &mut self,
        key: S,
        value: AttributeText<'a>
    ) -> &mut Self;
fn add_attributes(
        &'a mut self,
        attributes: HashMap<String, AttributeText<'a>>
    ) -> &mut Self;
fn get_attributes_mut(&mut self) -> &mut IndexMap<String, AttributeText<'a>>;
fn add_validation_error(
        &mut self,
        field: &'static str,
        message: &'static str
    ); fn background(&mut self, background: String) -> &mut Self { ... }
fn background_color(&mut self, background_color: Color<'a>) -> &mut Self { ... }
fn background_colorlist(
        &mut self,
        background_colors: ColorList<'a>
    ) -> &mut Self { ... }
fn bounding_box(&mut self, bounding_box: String) -> &mut Self { ... }
fn center(&mut self, center: bool) -> &mut Self { ... }
fn charset(&mut self, charset: String) -> &mut Self { ... }
fn class(&mut self, class: String) -> &mut Self { ... }
fn cluster_rank(&mut self, cluster_rank: ClusterMode) -> &mut Self { ... }
fn color(&mut self, color: Color<'a>) -> &mut Self { ... }
fn color_scheme(&mut self, color_scheme: String) -> &mut Self { ... }
fn comment(&mut self, comment: String) -> &mut Self { ... }
fn compound(&mut self, compound: String) -> &mut Self { ... }
fn concentrate(&mut self, concentrate: String) -> &mut Self { ... }
fn dpi(&mut self, dpi: f32) -> &mut Self { ... }
fn fill_color(&mut self, fill_color: Color<'a>) -> &mut Self { ... }
fn fill_color_with_colorlist(
        &mut self,
        fill_colors: ColorList<'a>
    ) -> &mut Self { ... }
fn fill_color_with_iter<I>(&mut self, fill_colors: I) -> &mut Self
    where
        I: IntoIterator,
        I::Item: IntoWeightedColor<'a>
, { ... }
fn font_color(&mut self, font_color: Color<'a>) -> &mut Self { ... }
fn font_name(&mut self, font_name: String) -> &mut Self { ... }
fn font_names(&mut self, font_names: String) -> &mut Self { ... }
fn font_path(&mut self, font_path: String) -> &mut Self { ... }
fn font_size(&mut self, font_size: f32) -> &mut Self { ... }
fn force_label(&mut self, force_label: bool) -> &mut Self { ... }
fn gradient_angle(&mut self, gradient_angle: u32) -> &mut Self { ... }
fn image_path(&mut self, image_path: String) -> &mut Self { ... }
fn label<S: Into<String>>(&mut self, label: S) -> &mut Self { ... }
fn label_justification(
        &mut self,
        label_justification: LabelJustification
    ) -> &mut Self { ... }
fn label_location(&mut self, label_location: LabelLocation) -> &mut Self { ... }
fn landscape(&mut self, landscape: bool) -> &mut Self { ... }
fn layer_list_sep(&mut self, layer_list_sep: String) -> &mut Self { ... }
fn layers(&mut self, layers: String) -> &mut Self { ... }
fn layer_select(&mut self, layer_select: String) -> &mut Self { ... }
fn layer_sep(&mut self, layer_sep: String) -> &mut Self { ... }
fn lheight(&mut self, lheight: f32) -> &mut Self { ... }
fn label_position(&mut self, lp: Point) -> &mut Self { ... }
fn lwidth(&mut self, lwidth: f32) -> &mut Self { ... }
fn margin(&mut self, margin: f32) -> &mut Self { ... }
fn margin_point(&mut self, margin: Point) -> &mut Self { ... }
fn mclimit(&mut self, mclimit: f32) -> &mut Self { ... }
fn mindist(&mut self, mindist: u32) -> &mut Self { ... }
fn newrank(&mut self, newrank: bool) -> &mut Self { ... }
fn nodesep(&mut self, nodesep: f32) -> &mut Self { ... }
fn no_justify(&mut self, no_justify: bool) -> &mut Self { ... }
fn nslimit(&mut self, nslimit: f32) -> &mut Self { ... }
fn ordering(&mut self, ordering: Ordering) -> &mut Self { ... }
fn orientation(&mut self, orientation: f32) -> &mut Self { ... }
fn output_order(&mut self, output_order: OutputMode) -> &mut Self { ... }
fn pack(&mut self, pack: bool) -> &mut Self { ... }
fn pack_int(&mut self, pack: u32) -> &mut Self { ... }
fn pack_mode(&mut self, pack_mode: PackMode) -> &mut Self { ... }
fn pad(&mut self, pad: f32) -> &mut Self { ... }
fn pad_point(&mut self, pad: Point) -> &mut Self { ... }
fn page(&mut self, page: f32) -> &mut Self { ... }
fn page_point(&mut self, page: Point) -> &mut Self { ... }
fn page_dir(&mut self, page_dir: PageDirection) -> &mut Self { ... }
fn quantum(&mut self, quantum: f32) -> &mut Self { ... }
fn rank_dir(&mut self, rank_dir: RankDir) -> &mut Self { ... }
fn rank_sep(&mut self, rank_sep: String) -> &mut Self { ... }
fn ratio(&mut self, ratio: Ratio) -> &mut Self { ... }
fn remincross(&mut self, remincross: bool) -> &mut Self { ... }
fn rotate(&mut self, rotate: u32) -> &mut Self { ... }
fn show_boxes(&mut self, show_boxes: u32) -> &mut Self { ... }
fn size(&mut self, size: u32, desired_min: bool) -> &mut Self { ... }
fn size_point(&mut self, size: Point) -> &mut Self { ... }
fn sortv(&mut self, sortv: u32) -> &mut Self { ... }
fn splines(&mut self, splines: Splines) -> &mut Self { ... }
fn style(&mut self, style: GraphStyle) -> &mut Self { ... }
fn stylesheet(&mut self, stylesheet: String) -> &mut Self { ... }
fn target(&mut self, target: String) -> &mut Self { ... }
fn true_color(&mut self, true_color: bool) -> &mut Self { ... }
fn url(&mut self, url: String) -> &mut Self { ... }
fn viewport(&mut self, viewport: ViewPort) -> &mut Self { ... } }

Required methods

fn add_attribute<S: Into<String>>(
    &mut self,
    key: S,
    value: AttributeText<'a>
) -> &mut Self
[src]

Add an attribute to the node.

fn add_attributes(
    &'a mut self,
    attributes: HashMap<String, AttributeText<'a>>
) -> &mut Self
[src]

Add multiple attributes to the node.

fn get_attributes_mut(&mut self) -> &mut IndexMap<String, AttributeText<'a>>[src]

fn add_validation_error(&mut self, field: &'static str, message: &'static str)[src]

Loading content...

Provided methods

fn background(&mut self, background: String) -> &mut Self[src]

fn background_color(&mut self, background_color: Color<'a>) -> &mut Self[src]

The color used as the background for entire canvas.

fn background_colorlist(
    &mut self,
    background_colors: ColorList<'a>
) -> &mut Self
[src]

The color used as the background for entire canvas with a gradient fill. A colon-separated list of weighted color values: WC(:WC)* where each WC has the form C(;F)? with C a color value and the optional F a floating-point number, 0 ≤ F ≤ 1. The sum of the floating-point numbers in a colorList must sum to at most 1.

fn bounding_box(&mut self, bounding_box: String) -> &mut Self[src]

Type: rect which is “%f,%f,%f,%f” The rectangle llx,lly,urx,ury gives the coordinates, in points, of the lower-left corner (llx,lly) and the upper-right corner (urx,ury).

fn center(&mut self, center: bool) -> &mut Self[src]

If true, the drawing is centered in the output canvas.

fn charset(&mut self, charset: String) -> &mut Self[src]

Specifies the character encoding used when interpreting string input as a text label.

fn class(&mut self, class: String) -> &mut Self[src]

Classnames to attach to the node, edge, graph, or cluster’s SVG element. Combine with stylesheet for styling SVG output using CSS classnames. Multiple space-separated classes are supported.

fn cluster_rank(&mut self, cluster_rank: ClusterMode) -> &mut Self[src]

Mode used for handling clusters. If clusterrank=local, a subgraph whose name begins with cluster is given special treatment. The subgraph is laid out separately, and then integrated as a unit into its parent graph, with a bounding rectangle drawn about it. If the cluster has a label parameter, this label is displayed within the rectangle. Note also that there can be clusters within clusters. The modes clusterrank=global and clusterrank=none appear to be identical, both turning off the special cluster processing.

fn color(&mut self, color: Color<'a>) -> &mut Self[src]

Basic drawing color for graphics, not text. For the latter, use the fontcolor attribute. If any fraction is used, the colors are drawn in series, with each color being given roughly its specified fraction of the edge.

fn color_scheme(&mut self, color_scheme: String) -> &mut Self[src]

This attribute specifies a color scheme namespace: the context for interpreting color names. In particular, if a color value has form “xxx” or “//xxx”, then the color xxx will be evaluated according to the current color scheme. If no color scheme is set, the standard X11 naming is used. For example, if colorscheme=bugn9, then color=7 is interpreted as color=“/bugn9/7”.

fn comment(&mut self, comment: String) -> &mut Self[src]

Comments are inserted into output. Device-dependent

fn compound(&mut self, compound: String) -> &mut Self[src]

fn concentrate(&mut self, concentrate: String) -> &mut Self[src]

fn dpi(&mut self, dpi: f32) -> &mut Self[src]

Specifies the expected number of pixels per inch on a display device. Also known as resolution

fn fill_color(&mut self, fill_color: Color<'a>) -> &mut Self[src]

Color used to fill the background of a node or cluster assuming style=filled, or a filled arrowhead.

fn fill_color_with_colorlist(&mut self, fill_colors: ColorList<'a>) -> &mut Self[src]

Color used to fill the background, with a gradient, of a node or cluster assuming style=filled, or a filled arrowhead.

fn fill_color_with_iter<I>(&mut self, fill_colors: I) -> &mut Self where
    I: IntoIterator,
    I::Item: IntoWeightedColor<'a>, 
[src]

Color used to fill the background, with a gradient, of a node or cluster assuming style=filled, or a filled arrowhead. TODO: example crate::attributes::GraphAttributes::dpi

fn font_color(&mut self, font_color: Color<'a>) -> &mut Self[src]

Color used for text.

fn font_name(&mut self, font_name: String) -> &mut Self[src]

Font used for text.

fn font_names(&mut self, font_names: String) -> &mut Self[src]

fn font_path(&mut self, font_path: String) -> &mut Self[src]

fn font_size(&mut self, font_size: f32) -> &mut Self[src]

Font size, in points, used for text. default: 14.0, minimum: 1.0

fn force_label(&mut self, force_label: bool) -> &mut Self[src]

fn gradient_angle(&mut self, gradient_angle: u32) -> &mut Self[src]

If a gradient fill is being used, this determines the angle of the fill.

fn image_path(&mut self, image_path: String) -> &mut Self[src]

fn label<S: Into<String>>(&mut self, label: S) -> &mut Self[src]

An escString or an HTML label.

fn label_justification(
    &mut self,
    label_justification: LabelJustification
) -> &mut Self
[src]

If labeljust=r, the label is right-justified within bounding rectangle If labeljust=l, left-justified Else the label is centered.

fn label_location(&mut self, label_location: LabelLocation) -> &mut Self[src]

fn landscape(&mut self, landscape: bool) -> &mut Self[src]

fn layer_list_sep(&mut self, layer_list_sep: String) -> &mut Self[src]

Specifies the separator characters used to split an attribute of type layerRange into a list of ranges.

fn layers(&mut self, layers: String) -> &mut Self[src]

Specifies a linearly ordered list of layer names attached to the graph The graph is then output in separate layers. Only those components belonging to the current output layer appear.

fn layer_select(&mut self, layer_select: String) -> &mut Self[src]

Selects a list of layers to be emitted.

fn layer_sep(&mut self, layer_sep: String) -> &mut Self[src]

Specifies the separator characters used to split the layers attribute into a list of layer names. default: “:\t “

fn lheight(&mut self, lheight: f32) -> &mut Self[src]

Height of graph or cluster label, in inches.

fn label_position(&mut self, lp: Point) -> &mut Self[src]

Label position The position indicates the center of the label.

fn lwidth(&mut self, lwidth: f32) -> &mut Self[src]

Width of graph or cluster label, in inches.

fn margin(&mut self, margin: f32) -> &mut Self[src]

Sets x and y margins of canvas, in inches. Both margins are set equal to the given value. See crate::attributes::GraphAttributes::margin_point

fn margin_point(&mut self, margin: Point) -> &mut Self[src]

Sets x and y margins of canvas, in inches. Note that the margin is not part of the drawing but just empty space left around the drawing. The margin basically corresponds to a translation of drawing, as would be necessary to center a drawing on a page. Nothing is actually drawn in the margin. To actually extend the background of a drawing, see the pad attribute. Whilst it is possible to create a Point value with either a third co-ordinate or a forced position, these are ignored for printing. By default, the value is 0.11,0.055.

fn mclimit(&mut self, mclimit: f32) -> &mut Self[src]

Multiplicative scale factor used to alter the MinQuit (default = 8) and MaxIter (default = 24) parameters used during crossing minimization. These correspond to the number of tries without improvement before quitting and the maximum number of iterations in each pass.

fn mindist(&mut self, mindist: u32) -> &mut Self[src]

Specifies the minimum separation between all nodes.

fn newrank(&mut self, newrank: bool) -> &mut Self[src]

Whether to use a single global ranking, ignoring clusters. The original ranking algorithm in dot is recursive on clusters. This can produce fewer ranks and a more compact layout, but sometimes at the cost of a head node being place on a higher rank than the tail node. It also assumes that a node is not constrained in separate, incompatible subgraphs. For example, a node cannot be in a cluster and also be constrained by rank=same with a node not in the cluster. This allows nodes to be subject to multiple constraints. Rank constraints will usually take precedence over edge constraints.

fn nodesep(&mut self, nodesep: f32) -> &mut Self[src]

specifies the minimum space between two adjacent nodes in the same rank, in inches. default: 0.25, minimum: 0.02

fn no_justify(&mut self, no_justify: bool) -> &mut Self[src]

By default, the justification of multi-line labels is done within the largest context that makes sense. Thus, in the label of a polygonal node, a left-justified line will align with the left side of the node (shifted by the prescribed margin). In record nodes, left-justified line will line up with the left side of the enclosing column of fields. If nojustify=true, multi-line labels will be justified in the context of itself. For example, if nojustify is set, the first label line is long, and the second is shorter and left-justified, the second will align with the left-most character in the first line, regardless of how large the node might be.

fn nslimit(&mut self, nslimit: f32) -> &mut Self[src]

Sets number of iterations in network simplex applications. nslimit is used in computing node x coordinates. If defined, # iterations = nslimit * # nodes; otherwise, # iterations = MAXINT.

fn ordering(&mut self, ordering: Ordering) -> &mut Self[src]

If ordering=“out”, then the outedges of a node, that is, edges with the node as its tail node, must appear left-to-right in the same order in which they are defined in the input.

If ordering=“in”, then the inedges of a node must appear left-to-right in the same order in which they are defined in the input.

If defined as a graph or subgraph attribute, the value is applied to all nodes in the graph or subgraph.

Note that the graph attribute takes precedence over the node attribute.

fn orientation(&mut self, orientation: f32) -> &mut Self[src]

Used only if rotate is not defined. Default: 0.0 and minimum: 360.0

fn output_order(&mut self, output_order: OutputMode) -> &mut Self[src]

Specify order in which nodes and edges are drawn. default: breadthfirst

fn pack(&mut self, pack: bool) -> &mut Self[src]

Whether each connected component of the graph should be laid out separately, and then the graphs packed together. If false, the entire graph is laid out together. The granularity and method of packing is influenced by the packmode attribute.

fn pack_int(&mut self, pack: u32) -> &mut Self[src]

Whether each connected component of the graph should be laid out separately, and then the graphs packed together. This is used as the size, in points,of a margin around each part; otherwise, a default margin of 8 is used. pack is treated as true if the value of pack iso a non-negative integer.

fn pack_mode(&mut self, pack_mode: PackMode) -> &mut Self[src]

This indicates how connected components should be packed (cf. packMode). Note that defining packmode will automatically turn on packing as though one had set pack=true.

fn pad(&mut self, pad: f32) -> &mut Self[src]

Specifies how much, in inches, to extend the drawing area around the minimal area needed to draw the graph. Both the x and y pad values are set equal to the given value. See crate::attributes::GraphAttributes::pad_point

fn pad_point(&mut self, pad: Point) -> &mut Self[src]

Specifies how much, in inches, to extend the drawing area around the minimal area needed to draw the graph. This area is part of the drawing and will be filled with the background color, if appropriate. default: 0.0555

fn page(&mut self, page: f32) -> &mut Self[src]

Width and height of output pages, in inches. Value given is used for both the width and height.

fn page_point(&mut self, page: Point) -> &mut Self[src]

Width and height of output pages, in inches.

fn page_dir(&mut self, page_dir: PageDirection) -> &mut Self[src]

The order in which pages are emitted. Used only if page is set and applicable. Limited to one of the 8 row or column major orders.

fn quantum(&mut self, quantum: f32) -> &mut Self[src]

If quantum > 0.0, node label dimensions will be rounded to integral multiples of the quantum. default: 0.0, minimum: 0.0

fn rank_dir(&mut self, rank_dir: RankDir) -> &mut Self[src]

Sets direction of graph layout. For example, if rankdir=“LR”, and barring cycles, an edge T -> H; will go from left to right. By default, graphs are laid out from top to bottom. This attribute also has a side-effect in determining how record nodes are interpreted. See record shapes.

fn rank_sep(&mut self, rank_sep: String) -> &mut Self[src]

sets the desired rank separation, in inches. This is the minimum vertical distance between the bottom of the nodes in one rank and the tops of nodes in the next. If the value contains equally, the centers of all ranks are spaced equally apart. Note that both settings are possible, e.g., ranksep=“1.2 equally”.

fn ratio(&mut self, ratio: Ratio) -> &mut Self[src]

Sets the aspect ratio (drawing height/drawing width) for the drawing. Note that this is adjusted before the size attribute constraints are enforced.

fn remincross(&mut self, remincross: bool) -> &mut Self[src]

If true and there are multiple clusters, run crossing minimization a second time.

fn rotate(&mut self, rotate: u32) -> &mut Self[src]

If rotate=90, sets drawing orientation to landscape.

fn show_boxes(&mut self, show_boxes: u32) -> &mut Self[src]

Print guide boxes in PostScript at the beginning of routesplines if showboxes=1, or at the end if showboxes=2. (Debugging, TB mode only!) default: 0, minimum: 0

fn size(&mut self, size: u32, desired_min: bool) -> &mut Self[src]

Maximum width and height of drawing, in inches. Value used for both the width and the height. If defined and the drawing is larger than the given size, the drawing is uniformly scaled down so that it fits within the given size. If desired_min is true, and both both dimensions of the drawing are less than size, the drawing is scaled up uniformly until at least one dimension equals its dimension in size. See crate::attributes::GraphAttributes::size_point

fn size_point(&mut self, size: Point) -> &mut Self[src]

Maximum width and height of drawing, in inches. If defined and the drawing is larger than the given size, the drawing is uniformly scaled down so that it fits within the given size. If desired_min is true, and both both dimensions of the drawing are less than size, the drawing is scaled up uniformly until at least one dimension equals its dimension in size.

fn sortv(&mut self, sortv: u32) -> &mut Self[src]

If packmode indicates an array packing, sortv specifies an insertion order among the components, with smaller values inserted first. default: 0, minimum: 0

fn splines(&mut self, splines: Splines) -> &mut Self[src]

Controls how, and if, edges are represented.

fn style(&mut self, style: GraphStyle) -> &mut Self[src]

Set style information for components of the graph.

fn stylesheet(&mut self, stylesheet: String) -> &mut Self[src]

A URL or pathname specifying an XML style sheet, used in SVG output. Combine with class to style elements using CSS selectors.

fn target(&mut self, target: String) -> &mut Self[src]

If the object has a URL, this attribute determines which window of the browser is used for the URL.

fn true_color(&mut self, true_color: bool) -> &mut Self[src]

Whether internal bitmap rendering relies on a truecolor color model or uses a color palette. If truecolor is unset, truecolor is not used unless there is a shapefile property for some node in the graph. The output model will use the input model when possible.

fn url(&mut self, url: String) -> &mut Self[src]

Hyperlinks incorporated into device-dependent output.

fn viewport(&mut self, viewport: ViewPort) -> &mut Self[src]

Clipping window on final drawing. viewport supersedes any size attribute. The width and height of the viewport specify precisely the final size of the output. The viewPort W,H,Z,x,y or W,H,Z,N specifies a viewport for the final image. The pair (W,H) gives the dimensions (width and height) of the final image, in points. The optional Z is the zoom factor, i.e., the image in the original layout will be W/Z by H/Z points in size. By default, Z is 1. The optional last part is either a pair (x,y) giving a position in the original layout of the graph, in points, of the center of the viewport, or the name N of a node whose center should used as the focus.

Loading content...

Implementors

impl<'a> GraphAttributes<'a> for GraphAttributeStatementBuilder<'a>[src]

fn add_attributes(
    &'a mut self,
    attributes: HashMap<String, AttributeText<'a>>
) -> &mut Self
[src]

Add multiple attributes to the node.

Loading content...