Struct pathfinder::Group

source ·
pub struct Group {
    pub settings: Node,
    pub nodes: Vec<Node>,
}
Expand description

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.

Fields§

§settings: Node§nodes: Vec<Node>

Implementations§

Constructs a new Group

Adds a Node dynamically to the Group.

Sets the color of the Group.

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.

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);

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Draws the Nodes inside that Group. If none the Group is draw as blank.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Sets value as a parameter of self.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.