GridRenderer

Trait GridRenderer 

Source
pub trait GridRenderer<C: PixelColor> {
    // Required methods
    fn draw_major_line<D>(
        &self,
        start: Point,
        end: Point,
        style: &LineStyle<C>,
        target: &mut D,
    ) -> ChartResult<()>
       where D: DrawTarget<Color = C>;
    fn draw_minor_line<D>(
        &self,
        start: Point,
        end: Point,
        style: &LineStyle<C>,
        target: &mut D,
    ) -> ChartResult<()>
       where D: DrawTarget<Color = C>;
    fn draw_grid_line<D>(
        &self,
        start: Point,
        end: Point,
        style: &LineStyle<C>,
        target: &mut D,
    ) -> ChartResult<()>
       where D: DrawTarget<Color = C>;
}
Expand description

Trait for rendering grid lines

Required Methods§

Source

fn draw_major_line<D>( &self, start: Point, end: Point, style: &LineStyle<C>, target: &mut D, ) -> ChartResult<()>
where D: DrawTarget<Color = C>,

Draw a major grid line

§Arguments
  • start - Start point of the grid line
  • end - End point of the grid line
  • style - Line style to use
  • target - The display target to draw to
Source

fn draw_minor_line<D>( &self, start: Point, end: Point, style: &LineStyle<C>, target: &mut D, ) -> ChartResult<()>
where D: DrawTarget<Color = C>,

Draw a minor grid line

§Arguments
  • start - Start point of the grid line
  • end - End point of the grid line
  • style - Line style to use
  • target - The display target to draw to
Source

fn draw_grid_line<D>( &self, start: Point, end: Point, style: &LineStyle<C>, target: &mut D, ) -> ChartResult<()>
where D: DrawTarget<Color = C>,

Draw a grid line with custom style

§Arguments
  • start - Start point of the grid line
  • end - End point of the grid line
  • style - Line style to use
  • target - The display target to draw to

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.

Implementors§