Struct pathfinder::Group [−][src]
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<'b>
nodes: Vec<Node<'a>>
Methods
impl<'a, 'b> Group<'a, 'b>
[src]
impl<'a, 'b> Group<'a, 'b>
pub fn new(name: &str, coordinates: Coordinate) -> Group<'a, 'b>
[src]
pub fn new(name: &str, coordinates: Coordinate) -> Group<'a, 'b>
Constructs a new Group
pub fn link<L: Location>(&mut self, other: &'b Group)
[src]
pub fn link<L: Location>(&mut self, other: &'b Group)
impl<'a, 'b> Group<'a, 'b>
[src]
impl<'a, 'b> Group<'a, 'b>
pub fn get_nodes(&self) -> &Vec<Node>
[src]
pub fn get_nodes(&self) -> &Vec<Node>
Returns the nodes that exists inside the Group.
pub fn new_node(&mut self, name: &str)
[src]
pub fn new_node(&mut self, name: &str)
Adds a Node dynamically to the Group.
pub fn new_node_min_auto(&mut self, name: &str, min: u32) -> &Node
[src]
pub fn new_node_min_auto(&mut self, name: &str, min: u32) -> &Node
Adds a Node with a static distance from the center of the Group.
pub fn new_node_min_max(&mut self, name: &str, min: u32, max: u32) -> &Node
[src]
pub fn new_node_min_max(&mut self, name: &str, min: u32, max: u32) -> &Node
Adds a Node with a specific minimum and maximum distance from the center of the Group.
pub fn new_node_inner(&mut self, geo: Coordinate, name: &str) -> &Node
[src]
pub fn new_node_inner(&mut self, geo: Coordinate, name: &str) -> &Node
Constructs a new node for the Group and mirrors the properties to it.
pub fn new_simple(x: i16, y: i16) -> Group<'a, 'b>
[src]
pub fn new_simple(x: i16, y: i16) -> Group<'a, 'b>
Removes all non-essentials from the standard implementation.
pub fn push(&mut self, node: Node<'a>)
[src]
pub fn push(&mut self, node: Node<'a>)
Pushes a Node to the Group.
pub fn get_dynamic_radius(&self) -> u32
[src]
pub fn get_dynamic_radius(&self) -> u32
Returns a dynamic radius based on the number of Nodes in the Group.
pub fn gen_color(&self, coordinates: Coordinate) -> Rgba<u8>
[src]
pub fn gen_color(&self, coordinates: Coordinate) -> Rgba<u8>
Trait Implementations
impl<'a, 'b> Clone for Group<'a, 'b>
[src]
impl<'a, 'b> Clone for Group<'a, 'b>
fn clone(&self) -> Group<'a, 'b>
[src]
fn clone(&self) -> Group<'a, 'b>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a, 'b> Debug for Group<'a, 'b>
[src]
impl<'a, 'b> Debug for Group<'a, 'b>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, 'b> Location for Group<'a, 'b>
[src]
impl<'a, 'b> Location for Group<'a, 'b>
fn get_coordinate(&self) -> &Coordinate
[src]
fn get_coordinate(&self) -> &Coordinate
impl<'a, 'b> Draw for Group<'a, 'b>
[src]
impl<'a, 'b> Draw for Group<'a, 'b>
fn draw<S: Shape>(
&self,
image: ImageBuffer<Rgba<u8>, Vec<u8>>,
x_offset: i16,
y_offset: i16,
size: u32,
shape: &S
) -> ImageBuffer<Rgba<u8>, Vec<u8>>
[src]
fn draw<S: Shape>(
&self,
image: ImageBuffer<Rgba<u8>, Vec<u8>>,
x_offset: i16,
y_offset: i16,
size: u32,
shape: &S
) -> ImageBuffer<Rgba<u8>, Vec<u8>>
Draws the Nodes inside that Group. If none the Group is draw as blank.
fn get_size(&self) -> u32
[src]
fn get_size(&self) -> u32
fn get_links(&self) -> &Vec<Link<Node>>
[src]
fn get_links(&self) -> &Vec<Link<Node>>
impl<'a, 'b> Hash for Group<'a, 'b>
[src]
impl<'a, 'b> Hash for Group<'a, 'b>