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

////////////////////////////////////////////////////////////////////////////////
//
// FILE:	WPentagon.java
//
// AUTHOR:	Manoj D. Muzumdar
//		archon@ai.mit.edu
//
// DATE:	Apr 99
//
// COPYRIGHT:	Massachusetts Institute of Technology
//		All rights reserved.
//
// PURPOSE:     Pentagon widget
//
// HISTORY:     Apr 99  archon  created
//
////////////////////////////////////////////////////////////////////////////////

package rec.core.widgets;

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

public class WPentagon extends WPolygon
{
  public WPentagon( GPoint[] points )
  {
    super( points );

    Assert.check( points.length == 5, "pentagons must have 5 sides" );
  }

  public WPentagon( PolygonInfo pi )
  {
    super( pi );

    Assert.check( pi.getNumberOfSides() == 5, "pentagons must have 5 sides" );
  }

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

  protected WPentagon()
  {
    // For subclass use.
  }

  public Object clone()
  {
    WPentagon ret = new WPentagon();

    ret.m_Polygon = new GPolygon( m_Polygon );

    return( ret );
  }
}

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