Trait staticmap::tools::Tool[][src]

pub trait Tool {
    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

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

Expand description

Coordinates forming the extent of the object.

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

Expand description

Draw the object to the pixmap using a PathBuilder.

Loading content...

Implementors

impl Tool for Circle[src]

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

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

impl Tool for Icon[src]

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

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

impl Tool for Line[src]

fn extent(&self, _: u8, _: f64) -> (f64, f64, f64, f64)[src]

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

Loading content...