@@ -117,7 +117,7 @@ macro_rules! implement_color_scale_for_derived_color_map{
117
117
self . colors. len( )
118
118
) ;
119
119
// Interpolate the final color linearly
120
- calculate_new_color_value!(
120
+ $crate :: calculate_new_color_value!(
121
121
relative_difference,
122
122
self . colors,
123
123
index_upper,
@@ -134,7 +134,7 @@ implement_color_scale_for_derived_color_map! {RGBAColor, RGBColor, HSLColor}
134
134
135
135
macro_rules! count {
136
136
( ) => ( 0usize ) ;
137
- ( $x: tt $( $xs: tt) * ) => ( 1usize + count!( $( $xs) * ) ) ;
137
+ ( $x: tt $( $xs: tt) * ) => ( 1usize + $crate :: count!( $( $xs) * ) ) ;
138
138
}
139
139
140
140
macro_rules! define_colors_from_list_of_values_or_directly{
@@ -171,7 +171,7 @@ macro_rules! implement_linear_interpolation_color_map {
171
171
Self :: COLORS . len( )
172
172
) ;
173
173
// Interpolate the final color linearly
174
- calculate_new_color_value!(
174
+ $crate :: calculate_new_color_value!(
175
175
relative_difference,
176
176
Self :: COLORS ,
177
177
index_upper,
@@ -218,21 +218,21 @@ macro_rules! define_linear_interpolation_color_map{
218
218
219
219
impl $color_scale_name {
220
220
// const COLORS: [$color_type; $number_colors] = [$($color_type($($color_value),+)),+];
221
- // const COLORS: [$color_type; count!($(($($color_value:expr),+))*)] = [$($color_type($($color_value),+)),+];
222
- const COLORS : [ $color_type; count!( $( ( $( $color_value: expr) ,+) ) * ) ] = define_colors_from_list_of_values_or_directly!{ $color_type, $( ( $( $color_value) ,+) ) ,* } ;
221
+ // const COLORS: [$color_type; $crate:: count!($(($($color_value:expr),+))*)] = [$($color_type($($color_value),+)),+];
222
+ const COLORS : [ $color_type; $crate :: count!( $( ( $( $color_value: expr) ,+) ) * ) ] = $crate :: define_colors_from_list_of_values_or_directly!{ $color_type, $( ( $( $color_value) ,+) ) ,* } ;
223
223
}
224
224
225
- implement_linear_interpolation_color_map!{ $color_scale_name, $color_type}
225
+ $crate :: implement_linear_interpolation_color_map!{ $color_scale_name, $color_type}
226
226
} ;
227
227
( $color_scale_name: ident, $color_type: ident, $doc: expr, $( $color_complete: tt) ,+) => {
228
228
#[ doc = $doc]
229
229
pub struct $color_scale_name { }
230
230
231
231
impl $color_scale_name {
232
- const COLORS : [ $color_type; count!( $( $color_complete) * ) ] = define_colors_from_list_of_values_or_directly!{ $( $color_complete) ,+} ;
232
+ const COLORS : [ $color_type; $crate :: count!( $( $color_complete) * ) ] = $crate :: define_colors_from_list_of_values_or_directly!{ $( $color_complete) ,+} ;
233
233
}
234
234
235
- implement_linear_interpolation_color_map!{ $color_scale_name, $color_type}
235
+ $crate :: implement_linear_interpolation_color_map!{ $color_scale_name, $color_type}
236
236
}
237
237
}
238
238
0 commit comments