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§
Sourcefn draw_major_line<D>(
&self,
start: Point,
end: Point,
style: &LineStyle<C>,
target: &mut D,
) -> ChartResult<()>where
D: DrawTarget<Color = C>,
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 lineend- End point of the grid linestyle- Line style to usetarget- The display target to draw to
Sourcefn draw_minor_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>,
Draw a minor grid line
§Arguments
start- Start point of the grid lineend- End point of the grid linestyle- Line style to usetarget- The display target to draw to
Sourcefn draw_grid_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>,
Draw a grid line with custom style
§Arguments
start- Start point of the grid lineend- End point of the grid linestyle- Line style to usetarget- 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.