Lines Matching +full:use +full:- +full:cross
1 use super::*;
2 use super::{Drawable, PointCollection};
3 use crate::style::{Color, ShapeStyle, SizeDesc};
4 use plotters_backend::{BackendCoord, DrawingBackend, DrawingErrorKind};
7 A common trait for elements that can be interpreted as points: A cross, a circle, a triangle marker…
19 fn make_point(pos: Coord, size: Size, style: ShapeStyle) -> Self; in make_point()
23 A cross marker for visualizing data series.
27 pub struct Cross<Coord, Size: SizeDesc> { struct
33 impl<Coord, Size: SizeDesc> Cross<Coord, Size> { argument
35 Creates a cross marker.
39 pub fn new<T: Into<ShapeStyle>>(coord: Coord, size: Size, style: T) -> Self { in new()
48 impl<'a, Coord: 'a, Size: SizeDesc> PointCollection<'a, Coord> for &'a Cross<Coord, Size> { implementation
51 fn point_iter(self) -> std::iter::Once<&'a Coord> { in point_iter()
56 impl<Coord, DB: DrawingBackend, Size: SizeDesc> Drawable<DB> for Cross<Coord, Size> { implementation
62 ) -> Result<(), DrawingErrorKind<DB::ErrorType>> { in draw()
65 let (x0, y0) = (x - size, y - size); in draw()
91 pub fn new<T: Into<ShapeStyle>>(coord: Coord, size: Size, style: T) -> Self { in new()
103 fn point_iter(self) -> std::iter::Once<&'a Coord> { in point_iter()
114 ) -> Result<(), DrawingErrorKind<DB::ErrorType>> { in draw()
117 let points = [-90, -210, -330] in draw()
132 impl<Coord, Size: SizeDesc> PointElement<Coord, Size> for Cross<Coord, Size> { implementation
133 fn make_point(pos: Coord, size: Size, style: ShapeStyle) -> Self { in make_point()
139 fn make_point(pos: Coord, size: Size, style: ShapeStyle) -> Self { in make_point()
145 fn make_point(pos: Coord, size: Size, style: ShapeStyle) -> Self { in make_point()
151 fn make_point(pos: Coord, _: Size, style: ShapeStyle) -> Self { in make_point()