Class Polygon

All Implemented Interfaces:
Iterable<HSLFTextParagraph>, IAdjustableShape, AutoShape<HSLFShape,HSLFTextParagraph>, PlaceableShape<HSLFShape,HSLFTextParagraph>, Shape<HSLFShape,HSLFTextParagraph>, SimpleShape<HSLFShape,HSLFTextParagraph>, TextShape<HSLFShape,HSLFTextParagraph>

public final class Polygon extends HSLFAutoShape
A simple closed polygon shape
Author:
Yegor Kozlov
  • Constructor Details

    • Polygon

      protected Polygon(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
      Create a Polygon object and initialize it from the supplied Record container.
      Parameters:
      escherRecord - EscherSpContainer container which holds information about this shape
      parent - the parent of the shape
    • Polygon

      public Polygon(ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
      Create a new Polygon. This constructor is used when a new shape is created.
      Parameters:
      parent - the parent of this Shape. For example, if this text box is a cell in a table then the parent is Table.
    • Polygon

      public Polygon()
      Create a new Polygon. This constructor is used when a new shape is created.
  • Method Details

    • setPoints

      public void setPoints(float[] xPoints, float[] yPoints)
      Set the polygon vertices
      Parameters:
      xPoints -
      yPoints -
    • setPoints

      public void setPoints(Point2D[] points)
      Set the polygon vertices
      Parameters:
      points - the polygon vertices