// (c) MIT 2003.  All rights reserved.

////////////////////////////////////////////////////////////////////////////////
//
// FILE:	WQuadrilateral.java
//
// AUTHOR:	Manoj D. Muzumdar
//		archon@ai.mit.edu
//
// DATE:	07-XX-98
//
// COPYRIGHT:	Massachusetts Institute of Technology
//		All rights reserved.
//
// PURPOSE:     Drawing recognition
//
// HISTORY:     11-15-98 archon
//              Now aware of new rec.geo package
//
///////////////////////////////////////////////////////////////////////////////

package rec.core.widgets;

import java.awt.*;
import rec.util.*;
import rec.geo.*;
import rec.sys.*;

public class WQuadrilateral extends WPolygon
{

  public WQuadrilateral( GPoint[] points )
  {
    super( points );

    setEnglishName( "Quadrilateral" );
    Assert.check( points.length == 4, "quadrilaterals must have 4 sides" );
  }

  public WQuadrilateral( PolygonInfo pi )
  {
    super( pi );
    
    setEnglishName( "Quadrilateral" );
    Assert.check( pi.getNumberOfSides() == 4,
		  "quadrilaterals must have 4 sides" );
  }

  public WQuadrilateral( WPolygon pi )
  {
    super( pi );
    setEnglishName( "Quadrilateral" );
  }


  // for subclass use
  protected WQuadrilateral()
  {
  }


  /////////////////////////////////////////////////////////////////////////////

  public Object clone()
  {
    WQuadrilateral ret = new WQuadrilateral( this );

    return ret;
  }
}

///////////////////////////////////////////////////////////////////////////////
