@@ -10,7 +10,9 @@ use crate::coord::ranged3d::{ProjectionMatrix, ProjectionMatrixBuilder};
10
10
use crate :: coord:: { CoordTranslate , ReverseCoordTranslate , Shift } ;
11
11
12
12
use crate :: drawing:: { DrawingArea , DrawingAreaErrorKind } ;
13
- use crate :: element:: { Drawable , EmptyElement , PathElement , PointCollection , Polygon , Text } ;
13
+ use crate :: element:: {
14
+ CoordMapper , Drawable , EmptyElement , PathElement , PointCollection , Polygon , Text ,
15
+ } ;
14
16
use crate :: style:: text_anchor:: { HPos , Pos , VPos } ;
15
17
use crate :: style:: { ShapeStyle , TextStyle } ;
16
18
@@ -97,13 +99,14 @@ impl<'a, DB: DrawingBackend, CT: CoordTranslate> ChartContext<'a, DB, CT> {
97
99
// of points reference with the same lifetime.
98
100
// However, this doesn't work if the coordinate doesn't live longer than the backend,
99
101
// this is unnecessarily strict
100
- pub ( super ) fn draw_series_impl < E , R , S > (
102
+ pub ( super ) fn draw_series_impl < B , E , R , S > (
101
103
& mut self ,
102
104
series : S ,
103
105
) -> Result < ( ) , DrawingAreaErrorKind < DB :: ErrorType > >
104
106
where
105
- for < ' b > & ' b E : PointCollection < ' b , CT :: From > ,
106
- E : Drawable < DB > ,
107
+ B : CoordMapper ,
108
+ for < ' b > & ' b E : PointCollection < ' b , CT :: From , B > ,
109
+ E : Drawable < DB , B > ,
107
110
R : Borrow < E > ,
108
111
S : IntoIterator < Item = R > ,
109
112
{
@@ -120,13 +123,14 @@ impl<'a, DB: DrawingBackend, CT: CoordTranslate> ChartContext<'a, DB, CT> {
120
123
}
121
124
122
125
/// Draw a data series. A data series in Plotters is abstracted as an iterator of elements
123
- pub fn draw_series < E , R , S > (
126
+ pub fn draw_series < B , E , R , S > (
124
127
& mut self ,
125
128
series : S ,
126
129
) -> Result < & mut SeriesAnno < ' a , DB > , DrawingAreaErrorKind < DB :: ErrorType > >
127
130
where
128
- for < ' b > & ' b E : PointCollection < ' b , CT :: From > ,
129
- E : Drawable < DB > ,
131
+ B : CoordMapper ,
132
+ for < ' b > & ' b E : PointCollection < ' b , CT :: From , B > ,
133
+ E : Drawable < DB , B > ,
130
134
R : Borrow < E > ,
131
135
S : IntoIterator < Item = R > ,
132
136
{
0 commit comments