Trait MapImage

Source
pub trait MapImage {
    // Required methods
    fn draw_text<T: Borrow<str>>(&mut self, text: T);
    fn draw_legend<C: Into<Rgb<u8>>, I: IntoIterator<Item = (String, C)>>(
        &mut self,
        legend: I,
    );
    fn save_in_thread<P: AsRef<Path>>(self, path: P);
}

Required Methods§

Source

fn draw_text<T: Borrow<str>>(&mut self, text: T)

Source

fn draw_legend<C: Into<Rgb<u8>>, I: IntoIterator<Item = (String, C)>>( &mut self, legend: I, )

Source

fn save_in_thread<P: AsRef<Path>>(self, path: P)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl MapImage for RgbImage

Source§

fn draw_text<T: Borrow<str>>(&mut self, text: T)

Draws given text on an image buffer, the text is placed at the bottom left corner and is 5% of the height of the image

Source§

fn draw_legend<C: Into<Rgb<u8>>, I: IntoIterator<Item = (String, C)>>( &mut self, legend: I, )

Draws a legend on the given image buffer, the legend is placed at the bottom right corner and consists of a series of colored rectangles with text labels

Source§

fn save_in_thread<P: AsRef<Path>>(self, path: P)

Implementors§