////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 14JAN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * clip one region.
         *
         * @param input
         *            the region to be clipped.
         * @return the clipped region.
         */
        public ArrayList ClipRegion(GeoLatLng[] input)
        {
            ArrayList clipped = new ArrayList();

            clipped.Clear();
            _stageOut.SetDestination(clipped);

            for (int i = 0; i < input.Length; i++)
            {
                _stageRight.HandleVertex(input[i]);
            }
            // Do the final step.
            _stageRight.Finish();

            return(clipped);
        }
 public virtual void Finish()
 {
     HandleVertex(_pntFirst);            // Close the polygon.
     _nextStage.Finish();                // Delegate to the next stage.
     _bFirst = true;
 }