pub struct Group {
pub nodes: Vec<Node>,
// some fields omitted
}
Holds a set of nodes and applies properties to all child nodes when drawn.
The group itself has no displayed output and is not visible.
It contains a Node used for Group meta data.
Adds a Node dynamically to the Group.
Set the radius for the group's meta-data.
Retrieves the nodes drawing in the group. Positions are relative to the
group.
Retrieves a mutable group meta data.
Adds a set of nodes randomly located inside the group.
Applies the closure over each mutable child node.
Sets the color of the Group.
Plots node according to the fn provided.
The closure parameter is the number of children the group has.
Adds a Node with a specific minimum and maximum distance from the
center of the Group.
Removes all non-essentials from the standard implementation.
Pushes a Node to the Group.
Returns a dynamic radius based on the number of Nodes in the Group.
Rotates all the nodes inside the group.
Generates an image::Rgba based on the color of the Group and the
distance from center.
Converts a list of tuples (x,y) to a Vector of Groups.
Names are assigned from "A" and upwards automatically.
use pathfinder::Group;
let list = [(0, 0), (10, 10), (15, 15)];
let groups = Group::from_list(&list);
assert_eq!(groups.len(), 3);
Links together two groups.
use pathfinder::{Coordinate, Group, Location};
let b: Group = Group::new("B", Coordinate::new(100, 100));
let mut a: Group = Group::new("A", Coordinate::new(0, 0));
a.link(&b);
Recursively calls find as the group contains sets of Nodes.
Retrieves the position Coordinates.
Returns if the positions are equal or not.
Retrieves the X coordinate.
Retrieves the Y coordinate.
Returns the sum of the x and y value.
Draws the Nodes inside that Group. If none the Group is draw as blank.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
Sets value
as a parameter of self
.