pub trait DotBuilder {
    // Required methods
    fn next_row_offset(&mut self, column: u32, row: u32) -> f32;
    fn next_column_offset(&mut self, column: u32, row: u32) -> f32;
    fn add_dot(&mut self, dot: &Dot);

    // Provided methods
    fn first_column_offset(&mut self, _row: u32) -> f32 { ... }
    fn alignment(&mut self, _row: u32) -> Option<f32> { ... }
}
Expand description

The output of Hatcher::dot_path.

Implement this trait to create custom dot patterns.

Required Methods§

source

fn next_row_offset(&mut self, column: u32, row: u32) -> f32

Called for each row of dots.

source

fn next_column_offset(&mut self, column: u32, row: u32) -> f32

Distance between each dot in a given row.

source

fn add_dot(&mut self, dot: &Dot)

Called for each dot.

Provided Methods§

source

fn first_column_offset(&mut self, _row: u32) -> f32

Offset of the first dot after a left edge.

source

fn alignment(&mut self, _row: u32) -> Option<f32>

Whether and how much to align the dots for a given row.

Implementors§