pub struct LayoutUtils;Expand description
Layout utilities
Implementations§
Source§impl LayoutUtils
impl LayoutUtils
Sourcepub fn center_graph<N: Clone, E>(graph: &mut Graph<N, E>)
pub fn center_graph<N: Clone, E>(graph: &mut Graph<N, E>)
Center a graph around the origin
Sourcepub fn scale_to_fit<N: Clone, E>(
graph: &mut Graph<N, E>,
target_width: f64,
target_height: f64,
)
pub fn scale_to_fit<N: Clone, E>( graph: &mut Graph<N, E>, target_width: f64, target_height: f64, )
Scale a graph to fit within given bounds
Sourcepub fn apply_padding<N, E>(graph: &mut Graph<N, E>, padding: f64)
pub fn apply_padding<N, E>(graph: &mut Graph<N, E>, padding: f64)
Apply padding around a graph
Auto Trait Implementations§
impl Freeze for LayoutUtils
impl RefUnwindSafe for LayoutUtils
impl Send for LayoutUtils
impl Sync for LayoutUtils
impl Unpin for LayoutUtils
impl UnwindSafe for LayoutUtils
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more