pub(crate) fn into_drawn_themed(self, draw: Draw<S>, p: &theme::Primitive) -> DrawnPolygon<S>
    where
        S: BaseFloat,
    {
        let Polygon {
            position,
            orientation,
            color,
            stroke_color,
            vertex_data_ranges: (fill_vdr, stroke_vdr),
            index_ranges: (fill_ir, stroke_ir),
            min_index,
        } = self;

        let fill_color = match fill_ir.len() == 0 {
            true => None,
            false => color.or_else(|| Some(draw.theme().fill_lin_srgba(p))),
        };
        let stroke_color = match stroke_ir.len() == 0 {
            true => None,
            false => stroke_color.or_else(|| Some(draw.theme().stroke_lin_srgba(p))),
        };

        let fill_vertices = VerticesFromRanges::new(fill_vdr, fill_color);
        let fill_indices = IndicesFromRange::new(fill_ir, min_index);
        let stroke_vertices = VerticesFromRanges::new(stroke_vdr, stroke_color);
        let stroke_indices = IndicesFromRange::new(stroke_ir, min_index);
        let vertices = (fill_vertices, stroke_vertices).into();
        let indices = (fill_indices, stroke_indices).into();
        let dimensions = spatial::dimension::Properties::default();
        let spatial = spatial::Properties {
            dimensions,
            orientation,
            position,
        };

        (spatial, vertices, indices)
    }
/// The implementation of `into_drawn` that allows for the retrieval of different theming
/// defaults.
The implementation of `into_drawn` that allows for the retrieval of different theming
defaults.
The implementation of ` into_drawn ` that allows for the retrieval of different theming defaults .
pub(crate) fn into_drawn_themed(self, draw: Draw<S>, p: &theme::Primitive) -> DrawnPolygon<S>
    where
        S: BaseFloat,
    {
        let Polygon {
            position,
            orientation,
            color,
            stroke_color,
            vertex_data_ranges: (fill_vdr, stroke_vdr),
            index_ranges: (fill_ir, stroke_ir),
            min_index,
        } = self;
        let fill_color = match fill_ir.len() == 0 {
            true => None,
            false => color.or_else(|| Some(draw.theme().fill_lin_srgba(p))),
        };
        let stroke_color = match stroke_ir.len() == 0 {
            true => None,
            false => stroke_color.or_else(|| Some(draw.theme().stroke_lin_srgba(p))),
        };
        let fill_vertices = VerticesFromRanges::new(fill_vdr, fill_color);
        let fill_indices = IndicesFromRange::new(fill_ir, min_index);
        let stroke_vertices = VerticesFromRanges::new(stroke_vdr, stroke_color);
        let stroke_indices = IndicesFromRange::new(stroke_ir, min_index);
        let vertices = (fill_vertices, stroke_vertices).into();
        let indices = (fill_indices, stroke_indices).into();
        let dimensions = spatial::dimension::Properties::default();
        let spatial = spatial::Properties {
            dimensions,
            orientation,
            position,
        };
        (spatial, vertices, indices)
    }
pub ( crate ) fn into_drawn_themed ( self , draw : Draw < S > , p : & theme :: Primitive ) -> DrawnPolygon < S > where S : BaseFloat , { let Polygon { position , orientation , color , stroke_color , vertex_data_ranges : ( fill_vdr , stroke_vdr ) , index_ranges : ( fill_ir , stroke_ir ) , min_index , } = self ; let fill_color = match fill_ir . len ( ) == 0 { true => None , false => color . or_else ( | | Some ( draw . theme ( ) . fill_lin_srgba ( p ) ) ) , } ; let stroke_color = match stroke_ir . len ( ) == 0 { true => None , false => stroke_color . or_else ( | | Some ( draw . theme ( ) . stroke_lin_srgba ( p ) ) ) , } ; let fill_vertices = VerticesFromRanges :: new ( fill_vdr , fill_color ) ; let fill_indices = IndicesFromRange :: new ( fill_ir , min_index ) ; let stroke_vertices = VerticesFromRanges :: new ( stroke_vdr , stroke_color ) ; let stroke_indices = IndicesFromRange :: new ( stroke_ir , min_index ) ; let vertices = ( fill_vertices , stroke_vertices ) . into ( ) ; let indices = ( fill_indices , stroke_indices ) . into ( ) ; let dimensions = spatial :: dimension :: Properties :: default ( ) ; let spatial = spatial :: Properties { dimensions , orientation , position , } ; ( spatial , vertices , indices ) }
The implementation of `into_drawn` that allows for the retrieval of different theming
defaults.
The implementation of ` into_drawn ` that allows for the retrieval of different theming defaults .
self
draw
Draw<S>
p
&theme::Primitive
self
draw
Draw<S>
p
&theme::Primitive