fn fill_geometry(&mut self, path: path::Path, fill_rule: FillRule, render::Rgba8(color): render::Rgba8, scale_factor: f64) -> VertexBuffers<render::Vertex2D, u16> {
        // Create the tessellator and geometry
        let mut tessellator     = tessellation::FillTessellator::new();
        let mut geometry        = VertexBuffers::new();

        // Set up the fill options
        let mut fill_options    = FillOptions::default();
        fill_options.fill_rule  = fill_rule;
        fill_options.tolerance  = FillOptions::DEFAULT_TOLERANCE * (scale_factor as f32);
        fill_options.tolerance  = f32::min(MAX_TOLERANCE, fill_options.tolerance);
        fill_options.tolerance  = f32::max(MIN_TOLERANCE, fill_options.tolerance);

        // Tessellate the current path
        tessellator.tessellate_path(&path, &fill_options,
            &mut BuffersBuilder::new(&mut geometry, move |vertex: FillVertex| {
                render::Vertex2D {
                    pos:        vertex.position().to_array(),
                    tex_coord:  [0.0, 0.0],
                    color:      color
                }
            })).unwrap();

        geometry
    }
///
/// Fills a path and returns the resulting render geometry
///
Fills a path and returns the resulting render geometry
Fills a path and returns the resulting render geometry
fn fill_geometry(&mut self, path: path::Path, fill_rule: FillRule, render::Rgba8(color): render::Rgba8, scale_factor: f64) -> VertexBuffers<render::Vertex2D, u16> {
        // Create the tessellator and geometry
        let mut tessellator     = tessellation::FillTessellator::new();
        let mut geometry        = VertexBuffers::new();
        // Set up the fill options
        let mut fill_options    = FillOptions::default();
        fill_options.fill_rule  = fill_rule;
        fill_options.tolerance  = FillOptions::DEFAULT_TOLERANCE * (scale_factor as f32);
        fill_options.tolerance  = f32::min(MAX_TOLERANCE, fill_options.tolerance);
        fill_options.tolerance  = f32::max(MIN_TOLERANCE, fill_options.tolerance);
        // Tessellate the current path
        tessellator.tessellate_path(&path, &fill_options,
            &mut BuffersBuilder::new(&mut geometry, move |vertex: FillVertex| {
                render::Vertex2D {
                    pos:        vertex.position().to_array(),
                    tex_coord:  [0.0, 0.0],
                    color:      color
                }
            })).unwrap();
        geometry
    }
fn fill_geometry ( & mut self , path : path :: Path , fill_rule : FillRule , render :: Rgba8 ( color ) : render :: Rgba8 , scale_factor : f64 ) -> VertexBuffers < render :: Vertex2D , u16 > { // Create the tessellator and geometry let mut tessellator = tessellation :: FillTessellator :: new ( ) ; let mut geometry = VertexBuffers :: new ( ) ; // Set up the fill options let mut fill_options = FillOptions :: default ( ) ; fill_options . fill_rule = fill_rule ; fill_options . tolerance = FillOptions :: DEFAULT_TOLERANCE * ( scale_factor as f32 ) ; fill_options . tolerance = f32 :: min ( MAX_TOLERANCE , fill_options . tolerance ) ; fill_options . tolerance = f32 :: max ( MIN_TOLERANCE , fill_options . tolerance ) ; // Tessellate the current path tessellator . tessellate_path ( & path , & fill_options , & mut BuffersBuilder :: new ( & mut geometry , move | vertex : FillVertex | { render :: Vertex2D { pos : vertex . position ( ) . to_array ( ) , tex_coord : [ 0.0 , 0.0 ] , color : color } } ) ) . unwrap ( ) ; geometry }
Fills a path and returns the resulting render geometry
Fills a path and returns the resulting render geometry
&mut self
path
path::Path
fill_rule
render::Rgba8
scale_factor
f64