fn next_pe(&mut self, cp: &Point) -> &mut pa_elem {
        if self.path.is_empty() {
            let mut pe = pa_elem::default();
            pe.p[0] = *cp;
            self.path.push(pe);
            self.path.push(pa_elem::default());
            let len = self.len();
            return &mut self.path[len - 1];
        }
        let len = self.len();
        let mut pe = &mut self.path[len - 1];
        match pe.typ {
            PeType::MOVETO => {
                pe.p[0] = *cp;
            }
            PeType::LINETO => {
                if !pe.p[0].equal(cp) {
                    let mut pe = pa_elem::default();
                    pe.p[0] = *cp;
                    self.path.push(pe);
                }
            }
            PeType::CURVETO => {
                if !pe.p[2].equal(cp) {
                    let mut pe = pa_elem::default();
                    pe.p[0] = *cp;
                    self.path.push(pe);
                }
            }
            PeType::CURVETO_Y | PeType::CURVETO_V => {
                if !pe.p[1].equal(cp) {
                    let mut pe = pa_elem::default();
                    pe.p[0] = *cp;
                    self.path.push(pe);
                }
            }
            PeType::CLOSEPATH => {
                let mut pe = pa_elem::default();
                pe.p[0] = *cp;
                self.path.push(pe);
            }
            _ => {}
        }
        self.path.push(pa_elem::default());
        let len = self.len();
        return &mut self.path[len - 1];
    }
/* Do 'compression' of path while adding new path elements.
     * Sequantial moveto command will be replaced with a
     * single moveto. If cp is not equal to the last point in pa,
     * then moveto is inserted (starting new subpath).
     * FIXME:
     * 'moveto' must be used to enforce starting new path.
     * This affects how 'closepath' is treated.
     */
Do 'compression' of path while adding new path elements.
Sequantial moveto command will be replaced with a
single moveto. If cp is not equal to the last point in pa,
then moveto is inserted (starting new subpath).
FIXME:
'moveto' must be used to enforce starting new path.
This affects how 'closepath' is treated.
Do ' compression ' of path while adding new path elements . Sequantial moveto command will be replaced with a single moveto . If cp is not equal to the last point in pa then moveto is inserted ( starting new subpath ) . FIXME : ' moveto ' must be used to enforce starting new path . This affects how ' closepath ' is treated .
fn next_pe(&mut self, cp: &Point) -> &mut pa_elem {
        if self.path.is_empty() {
            let mut pe = pa_elem::default();
            pe.p[0] = *cp;
            self.path.push(pe);
            self.path.push(pa_elem::default());
            let len = self.len();
            return &mut self.path[len - 1];
        }
        let len = self.len();
        let mut pe = &mut self.path[len - 1];
        match pe.typ {
            PeType::MOVETO => {
                pe.p[0] = *cp;
            }
            PeType::LINETO => {
                if !pe.p[0].equal(cp) {
                    let mut pe = pa_elem::default();
                    pe.p[0] = *cp;
                    self.path.push(pe);
                }
            }
            PeType::CURVETO => {
                if !pe.p[2].equal(cp) {
                    let mut pe = pa_elem::default();
                    pe.p[0] = *cp;
                    self.path.push(pe);
                }
            }
            PeType::CURVETO_Y | PeType::CURVETO_V => {
                if !pe.p[1].equal(cp) {
                    let mut pe = pa_elem::default();
                    pe.p[0] = *cp;
                    self.path.push(pe);
                }
            }
            PeType::CLOSEPATH => {
                let mut pe = pa_elem::default();
                pe.p[0] = *cp;
                self.path.push(pe);
            }
            _ => {}
        }
        self.path.push(pa_elem::default());
        let len = self.len();
        return &mut self.path[len - 1];
    }
fn next_pe ( & mut self , cp : & Point ) -> & mut pa_elem { if self . path . is_empty ( ) { let mut pe = pa_elem :: default ( ) ; pe . p [ 0 ] = * cp ; self . path . push ( pe ) ; self . path . push ( pa_elem :: default ( ) ) ; let len = self . len ( ) ; return & mut self . path [ len - 1 ] ; } let len = self . len ( ) ; let mut pe = & mut self . path [ len - 1 ] ; match pe . typ { PeType :: MOVETO => { pe . p [ 0 ] = * cp ; } PeType :: LINETO => { if ! pe . p [ 0 ] . equal ( cp ) { let mut pe = pa_elem :: default ( ) ; pe . p [ 0 ] = * cp ; self . path . push ( pe ) ; } } PeType :: CURVETO => { if ! pe . p [ 2 ] . equal ( cp ) { let mut pe = pa_elem :: default ( ) ; pe . p [ 0 ] = * cp ; self . path . push ( pe ) ; } } PeType :: CURVETO_Y | PeType :: CURVETO_V => { if ! pe . p [ 1 ] . equal ( cp ) { let mut pe = pa_elem :: default ( ) ; pe . p [ 0 ] = * cp ; self . path . push ( pe ) ; } } PeType :: CLOSEPATH => { let mut pe = pa_elem :: default ( ) ; pe . p [ 0 ] = * cp ; self . path . push ( pe ) ; } _ => { } } self . path . push ( pa_elem :: default ( ) ) ; let len = self . len ( ) ; return & mut self . path [ len - 1 ] ; }
Do 'compression' of path while adding new path elements.
Do ' compression ' of path while adding new path elements .
&mut self
cp
&Point