//////////////////////////////////////////////////////////////////////////// //--------------------------------- REVISIONS ------------------------------ // Date name Tracking # Description // --------- ------------------- ------------- ---------------------- // 14JAN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * constructor. * @param clipRect * clip region */ public SutherlandHodgman(GeoLatLngBounds clipRect) { _stageOut = new OutputStage(); _stageBottom = new ClipStage(_stageOut, 3, (clipRect.Y + clipRect.Height)); _stageLeft = new ClipStage(_stageBottom, 4, clipRect.X); _stageTop = new ClipStage(_stageLeft, 1, clipRect.Y); _stageRight = new ClipStage(_stageTop, 2, (clipRect.X + clipRect.Width)); _rectBounds = new GeoLatLngBounds(clipRect); }
// 1-Top,2-Right,3-Bottom,4-Left,5 out public ClipStage(ClipStage nextStage, int direction, double cord) { _nextStage = nextStage; _bFirst = true; _intDirection = direction; switch (_intDirection) { case 1: case 3: _dblY = cord; break; case 2: case 4: _dblX = cord; break; } }