pub struct Map { /* fields omitted */ }
High abstraction Map which helps position objects.
Creates a new map, no min_max are intially required and are
generated automatically when calling Map::map.
Saves the image to disk. Can be absolute or relative path.
let nodes = Node::from_list(&[(0, 0), (10, 10)]);
Map::new()
.map(&nodes)
.save(Path::new("/tmp/example.png"))
.unwrap();
Unwraps the image wrapper
Maps any struct that has implemented Draw, on to an ImageBuffer.
let nodes: Vec<Node> = vec![
Node::new("1", Coordinate::new(0, 0)),
Node::new("2", Coordinate::new(100, 100)),
];
let mut map = Map::new();
map = map.map(&nodes);
Maps the elements but with an added filter parameter to exclude
elements.
Maps the elements with a specified shape struct.
Maps the elements without stabalizing the positions on the canvas.
Maps the elements but with all added parameters.
Performs copy-assignment from source
. Read more
Returns the "default value" for a type. 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
.