Added assert in cropPolygon()
Optimized cropRectangle() function
Added assert in cropRectangle()
Deleted function cropPolygon()