Trait staticmap::tools::Tool

source ·
pub trait Tool {
    // Required methods
    fn extent(&self, zoom: u8, tile_size: f64) -> (f64, f64, f64, f64);
    fn draw(&self, bounds: &Bounds, pixmap: PixmapMut<'_>);
}
Expand description

Trait implemented by types which can be drawn to a map.

Required Methods§

source

fn extent(&self, zoom: u8, tile_size: f64) -> (f64, f64, f64, f64)

Coordinates forming the extent of the object.

source

fn draw(&self, bounds: &Bounds, pixmap: PixmapMut<'_>)

Draw the object to the pixmap using a PathBuilder.

Implementors§