pub fn new_with_callback<F>(start: (i32, i32), end: (i32, i32), callback: F) -> Self
        where F: FnMut(i32, i32) -> bool
    {
        let mut line: Line = Line::new(start, end);
        line.step_with_callback(callback);
        line
    }
/// Creates a new line and steps over it using provided closure as a callback.
/// The stepping is aborted when the closure returns false. The function returs
/// a part of the line that has not been stepped over.
///
/// # Examples
///
/// ```no_run
/// # use tcod::line::Line;
/// let mut line = Line::new_with_callback((1, 1), (5, 5), |x, _y| {
///     x < 4
/// });
/// assert_eq!(Some((5, 5)), line.next());
/// ```
Creates a new line and steps over it using provided closure as a callback.
The stepping is aborted when the closure returns false. The function returs
a part of the line that has not been stepped over.
Creates a new line and steps over it using provided closure as a callback . The stepping is aborted when the closure returns false . The function returs a part of the line that has not been stepped over .
pub fn new_with_callback<F>(start: (i32, i32), end: (i32, i32), callback: F) -> Self
        where F: FnMut(i32, i32) -> bool
    {
        let mut line: Line = Line::new(start, end);
        line.step_with_callback(callback);
        line
    }
pub fn new_with_callback < F > ( start : ( i32 , i32 ) , end : ( i32 , i32 ) , callback : F ) -> Self where F : FnMut ( i32 , i32 ) -> bool { let mut line : Line = Line :: new ( start , end ) ; line . step_with_callback ( callback ) ; line }
Creates a new line and steps over it using provided closure as a callback.
Creates a new line and steps over it using provided closure as a callback .
start
(i32, i32)
end
(i32, i32)
callback
F
examples
None
use tcod::line::line;
None