Ejemplo n.º 1
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 13JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * Add curve to.
         * @param control
         * @param point
         */
        public void AddQuadTo(PointFP control, PointFP point)
        {
            if (control.Equals(point))
            {
                AddLineTo(point);
                return;
            }
            ExtendIfNeeded(1, 2);
            _cmds[_cmdsSize++] = CMD_QCURVETO;
            _pnts[_pntsSize++] = new PointFP(control);
            _pnts[_pntsSize++] = new PointFP(point);
        }
Ejemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 13JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         *
         * @param control1
         * @param control2
         * @param point
         */
        public void AddCurveTo(PointFP control1, PointFP control2, PointFP point)
        {
            if (_pnts[_pntsSize - 1].Equals(control1))
            {
                AddQuadTo(control2, point);
                return;
            }
            if (point.Equals(control2))
            {
                AddQuadTo(control1, point);
                return;
            }
            ExtendIfNeeded(1, 3);
            _cmds[_cmdsSize++] = CMD_CCURVETO;
            _pnts[_pntsSize++] = new PointFP(control1);
            _pnts[_pntsSize++] = new PointFP(control2);
            _pnts[_pntsSize++] = new PointFP(point);
        }
Ejemplo n.º 3
0
 ////////////////////////////////////////////////////////////////////////////
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 13JUN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  * Add curve to.
  * @param control
  * @param point
  */
 public void AddQuadTo(PointFP control, PointFP point)
 {
     if (control.Equals(point))
     {
         AddLineTo(point);
         return;
     }
     ExtendIfNeeded(1, 2);
     _cmds[_cmdsSize++] = CMD_QCURVETO;
     _pnts[_pntsSize++] = new PointFP(control);
     _pnts[_pntsSize++] = new PointFP(point);
 }
Ejemplo n.º 4
0
 ////////////////////////////////////////////////////////////////////////////
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 13JUN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  *
  * @param control1
  * @param control2
  * @param point
  */
 public void AddCurveTo(PointFP control1, PointFP control2, PointFP point)
 {
     if (_pnts[_pntsSize - 1].Equals(control1))
     {
         AddQuadTo(control2, point);
         return;
     }
     if (point.Equals(control2))
     {
         AddQuadTo(control1, point);
         return;
     }
     ExtendIfNeeded(1, 3);
     _cmds[_cmdsSize++] = CMD_CCURVETO;
     _pnts[_pntsSize++] = new PointFP(control1);
     _pnts[_pntsSize++] = new PointFP(control2);
     _pnts[_pntsSize++] = new PointFP(point);
 }